|
The best thing is it takes out the odd nature of trying to map out calls to Java types andmethods in an RPG program and loading only a single copy of the JVM in an RPG app. We had some programming we had done this was that fellthis sort of "embedded Java" in RPG is hard to maintain and it's near to impossible to controll the settings of the JVM, mostly ending up in making all settings global, hoping never coming into incompatibility.
apart at V7R1 so we removed RPG from the Java calling equation because it was not easily debuggable.
I agree with your point on performance if I'm running thousands of these types of calls at a time, but most people aren't. If they are a pre-start approach or NEP app may be warranted as you suggested.This was the starting point for writing AppServer4RPG. It's a generic Java NEP sitting on a DataQ, waiting for entries. If an entry (consisting of a type and a RPG Datastructure) comes in, it's passed to an EventHandler (it's an Inetrface with a method performWork). AppServer4RPG provides some sessionhandling and gives every event a thread of its own.
Also writing NEPS like you are describing would be pretty easy because the Java class just has to simply loop until some defined condition occurs. I'm guessing that's probably similar to how ArdGate works as you are describing it.ArdGate and CommandGate are only 2 EventHandlers running under AppServer4RPG. All looping, DataQ handling, packaging data, threading, session handling is done by AppServer4RPG and on teh native side there is one SRVPGM providing a procedure fireEventP.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.