Some things to be very aware of and to keep in mind.
1. Once an iSeries interactive job runs a JVM, the interactive job can not end the JVM or reset the Java environment. The only way to end the JVM or update the environment is to log off and back on.
2. NEVER and I mean NEVER EVER put a jar into /QIBM/UserData/Java400/ext. It is used by all JVMs installed on the iSeries and if you put a jar file in there that is not compatible with the default version of the JVM your machine is using, IBM software including WebSphere Application Server will just not work. I know this from 3 weeks of support calls with IBM trying to get WAS 7 Express running on our machine.
3. Always use a SystemDefault.properties file to set Java properties and not environment variables. There are significant limitations to using environment variables on an iSeries. Set your copy of this file into the home directory of the user profile running the job that starts the JVM and do not edit /QIBM/UserData/Java400/SystemDefault.properties as once again EVERY JVM on the iSeries reads this file on startup.
4. Last but not least: DO NOT call Java from a program that adopts authority or swaps profiles without carefully reading and rereading the information in the V7R1M0 information center about compiling programs to use the PASE environment. The Classic JVM is going away and all of your programming should be done to the new J9 JVMs. The J9 JVMs do not always follow IBM system behaviors as they are the AIX JVMs ported to the iSeries using PASE. This effects adopted authority, profile swapping, debugging, job control and environment setup.
These are all thing I have learned over the last 4 months preparing our system to upgrade from V5R4M0 to V7R1M0. Java on V5R4M0 is awful just awful. Java is much better on V7R1M0.
Hope this helps.
From: D*B [mailto:dieter.bender@xxxxxxxxxxxx]
Sent: Friday, September 28, 2012 3:29 AM
Subject: Re:Newbie to RPG calling Java....what's a good reference to startlearning!
... synchronous calls from RPG to java won't scale well in most circumstances. Calling the java method once, you will earn lots of overhead, calling diffrent java methods from diffrent programms tends to become instable, calling java methods in every job makes IBM happy, but not the customer and the users sitting and waiting.
I would strongly recommend to do this stuff asynchronously. Doing it the right way, not longer needed ressources are freed up automatically by the java garbage collector. For asynchronous calls you could use my Open Source AppServer4RPG (which is the base layer for ArdGate as well).
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: Newbie to RPG calling Java....what's a good reference to start learning!, (continued)
This mailing list archive is Copyright 1997-2022 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
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.