× 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.



> From: Niall Mcloughlin
> 
> I have a batch job running as a daemon during the day.
> Whenever certain conditions are met, a java class is
> called. Each call appears to start up a separate JVM
> which obviously creates an unnecessary overhead.
> 
> Is there a way to create a JVM at the start of the
> batch job and have each java call use that JVM ?

It would help to have a little more information, because the short
answer is "No" you can't reuse the JVM.  However, there are ways around
that.  But first I have to make some assumptions about your environment.

My guess is that the batch job is waiting on a queue, waking up
periodically and testing some conditions.  The batch job then invokes
the Java class using QShell.

This is guaranteed to cause you pain and suffering.

The easiest way around it is to put the wait in a Java program.  The
Java program can use the Java Toolbox to wait on a queue, or even call a
program to do the wait and test conditions.  Then, if the conditions are
met, the other class is called.

Another way is to use RPG to directly call the Java class.  If the RPG
program doesn't end, I believe it will use the same JVM over and over,
but I haven't played with that architecture much.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.