× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



+1 on your suggestion Dieter. Server centric can be much more efficient than one-off JVM instantiations.

Pete

On 11/19/2014 2:35 AM, D*B wrote:
<Pete>
CLASSPATH and class loading seems to be a "black art" in many ways. Tomcat does it one way, Glassfish another, I am sure JBoss and others have quirks as well.
</Pete>

... nothing mysterious. Java Servers provide diffrent settings on application level (diffrent applications running on the same server could have diffrent classpath settings) and the ability for dynamic class loading (you could exchangge a jar with a diffrent one without restarting the server.

One of the big problems with calling java from RPG via JNI support of the compiler is controll over the java settings.
- if you start the JVM with your needed settings before calling java, it might blow up, if another programm has started the jvm before with incompatible settings.
- if you make your java settings global (java extension mechanism, or better setting classpath via global environment variable. it might not fit for all purposes.
- if you start the jvm at the very beginning of an interactive session, its eating up all memory, needed or not.

My recommendation: use server centric approaches, one JVM serves multiple (rpg) clients needing java assistance. I made AppServer4RPG open source to make life easier at this point. You could have multiple instances of it, if you need diffrent environments (even diffrent java versions at a time. Starting Java command line utilities (:= little java programms with a main method) we've had improvements > 10 times faster (e.g. transforming a xml file with a stylesheet to PDF: subsecond instead > 15 sec.). CommandGate (running on appserver4RPG has an os/400 command RUNJAVARUN, very similar to RUNJVA to start commandline utilities without any additional programming.

D*B


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.