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



Hi,
this question is more theoretical and mybe confusing but I have to ask.

I wonder what hapens when an subprocedure within service program is called 
from Toolbox ServiceProgramCall, what realy hapens on as400 side.

As I imagined, process flow should be like this:
-probably there is an resident IBM predefined job waiting for srvpgm 
request inside which srvpgm is activated.
-on first request for subproc in particular srvpgm A is ACTIVATED in 
probably *CALLER ACTGRP
-any other subsequent request reuses already active instance of srvpgm A

Now, if my presumptions are correct , there are numerous questions 
necessary to know answers if you are building in example web application 
with many parallel sessions active.

Are there any recomandations for developers whose service pgms will be 
called from web apps?
What if I created srvpgm that will be activated in NAMED activation group 
(does it make sense?)??
If evry ServiceProgramCall instance has its own job on as400 then I wont 
think about synchronisation?
Is it good to have an singleton with synchronized accessor methods to 
srvpgm calls - allways use one instance of ServiceProgramCall?
In which cases synchronisation isn't necessary?


this is example of srvpgm that makes me think about questions above:

all stuff is much complicated, I simplified all thing to make all it more 
clar

RPG side:
SrvPgmProd - gives info about 3 things related to customer

subProc
analyzeCustomer(CUSTID) - setups srvpgm data to related ID
getCustThing01() - gets Thing01 related stuff
getCustThing02() - gets Thing02 related stuff
getCustThing03() - gets Thing03 related stuff

JAVA side: (order of calling sub proc is important)
USER1 instantiate and setup ServiceProgramCall
USER1 first calls analyzeCustomer(CUSTID)
then in any order calls rest of three subproc
USER1 uses SpecialClass that performs described actions and returns all 
gathered data in Element object.

What will happen if paralel USER2 of WEB APP using its own SpecialClass 
calls analyzeCustomer with diferent CUSTID moment  after USER1 did the 
same thing and USER2 doesn't use SAME INSTANCE of ServiceProgramCall???? 
Is USER1 than going to grab wrong data??

I've already realized WEB app that invokes srvpgm trough XMLHTTPRequests 
and all work fine but all the time I have doubt that everything went soo 
fine, there must be something.... 

I'm missing lot of theory related to interaction between WEB APPS and 
srvPgms so if you have some good suggestion, link, advice, anything 
please.....

PS.
Is it good to wrap this SrvPgmCall in Web Service??? What about 
synchronization then?? Does it make sense??? When?

Best regards,
dipl.ing. Igor Bešlić,
IBM Certified Specialist ILE RPG Programmer
VOLKSBANK d.d.
OJ Informatika
Varšavska 9, 10000 Zagreb
tel: +385 1 4801 895

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.