PCML and RPG Problem? - Websphere
This is a discussion on PCML and RPG Problem? - Websphere ; Beginner w/ WDSC, Java, Web and such, so this could be very simple
answer. I am calling a RPG program from JSP using PCML. The intent of
the JSP is to call the RPG program multiple times with the 1st.
...
-
PCML and RPG Problem?
Beginner w/ WDSC, Java, Web and such, so this could be very simple
answer. I am calling a RPG program from JSP using PCML. The intent of
the JSP is to call the RPG program multiple times with the 1st.
parameter as the function desired. I return from RPG with LR *OFF,
but it appears that the program is reinstantiated each time its
called. The files are always closed (after opening then the 1st. time
thru) and *INZSR is processed each time. I tried to serialize PCML,
but no help. I can simulate the Java call using CL and it works OK.
Am I missing something here?
-
Re: PCML and RPG Problem?
I'm afraid we don't use PCML to access legacy (COBOL) code - we use the
com.ibm.as400.access.ProgramCall class instead - but my guess would be
that the problem lies on the Java side, and you need to be reusing an
object / AS400 connection for each call but are in fact generating a
new one each time. Sorry not to be more help.
Walker.
-
Re: PCML and RPG Problem?
A further comment: I have been thinking about your problem a little
more, and I suddenly remembered your second sentence "I am calling a
RPG program from JSP..." - that's not a very standard way of doing
things, JSPs are generally only used for presentation logic, and do not
have business logic or program / database calls in them.
The standard Model - View - Controller architecture has the business
logic written in Java, the screens are written as JSPs, and the
navigation handling and Java - JSP interaction is written as servlets.
-
Re: PCML and RPG Problem?
Thanks for the help. As I said I'm a rookie with this stuff and may
not have described the situation accurately.
I did resolved the problem though - by setting the Server Application
Class Loader Policy to SINGLE from MULTIPLE. Again, I don't have a
clue what I'm doing. but it now works.
Thanks.
-
Re: PCML and RPG Problem?
Well I don't have a clue what you are doing either. :-)
In 5 years of doing this sort of thing I've never had to mess with the
ClassLoader policy.
But if it is working for you, you might as well stick with it for the
time being (until you find a problem caused by that ClassLoader
policy!).
Your application architecture is still ugly though. :-)