|
From an RPG program I run RUNJVA command (using QCMDEXC); this commandhas a parameter named CLASS where I put the "tool" I need (I perform a
-----Original Message-----the
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 a
standalone app that uses Java inside of RPG and you want to ensure
aclasspath is set properly when your application runs, no matterwhat else
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
great idea.job
Personally I would suggest you start the java process up in a daemon
and communicate to it with data queues. Simply have the java processrequests
monitor a queue for commands and have your RPG send the command
through the queue.quite
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
a while with great success (using sockets though, not data queues ...data
given a chance to rework the implementation, I would probably use a
queue).list
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
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.