|
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of David Gibbs
Sent: Thursday, June 12, 2008 8:34 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: RPG, Java and Classpath practices
Bradley V. Stone wrote:
So, looking for ideas on handling this. In a nutshell, you have awhat else
standalone app that uses Java inside of RPG and you want to ensure the
classpath is set properly when your application runs, no matter
they are running or if the JVM is already running for that job.
Brad:
FWIW, I'm not a big fan of invoking Java directly from RPG. I know it
can be done but, for the same reasons you mention, I don't think it's a
great idea.
Personally I would suggest you start the java process up in a daemon job
and communicate to it with data queues. Simply have the java process
monitor a queue for commands and have your RPG send the command requests
through the queue.
That way you only have the JVM startup penalty once ... and the job is
running in batch. Your RPG program suffers no performance impact
because the data queue api is relatively light weight.
Obviously all ther java code would have to be in your daemon job's
classpath.
JMO, obviously.... but I've been using this kind of technique for quite
a while with great success (using sockets though, not data queues ...
given a chance to rework the implementation, I would probably use a data
queue).
david
--
IBM System i - For when you can't afford to be out of business
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.