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



Don,



Thanks for the thoughts. I can see that being a very elegant solution for a
large-scale use process. Unfortunately, this one will have a maximum of
three users at any given time, usually just one with the other two being
back-ups, so I'm not overly worried about it.



Since this will obviously create the "why a web service" question based upon
my reply, I know I would ask that, the issue is the same Java code needs to
execute from a job scheduler within the IBM i (an RPG job inside robot) and
also be dynamically called from a web menu. The common point for the two
to meet is the web service.



Thanks,



Steve



From: Don Brown <DBrown@xxxxxxxxxx>
Sent: Wednesday, April 15, 2020 17:18
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>; Steve M
<txpenguin1@xxxxxxxxxxx>
Subject: Re: RPG Web Service Program



Steve, I had a similar problem with PHP calling a service program that had
java calls.

While I did not solve the cause of that I finally looked more closely at my
design and realised that I could end up with many JVM's running based on the
number of users accessing the web page.

What I did was to move the java calls to a separate program and used data
queue's to send the request and receive the reply. Now I have a single
(monitor) JVM processing the requests and performance was fine. I can also
scale this by starting a second or more monitors to process the requests on
the data queue.

Your application design may be totally different and the problem I had may
not exist but your question just reminded me of the issue I had and how I
resolved it.

Cheers

Don



From: "Steve M via RPG400-L" <rpg400-l@xxxxxxxxxxxxxxxxxx
<mailto:rpg400-l@xxxxxxxxxxxxxxxxxx> >
To: "'RPG programming on IBM i'" <rpg400-l@xxxxxxxxxxxxxxxxxx
<mailto:rpg400-l@xxxxxxxxxxxxxxxxxx> >
Cc: "Steve M" <txpenguin1@xxxxxxxxxxx <mailto:txpenguin1@xxxxxxxxxxx>

Date: 16/04/2020 06:22 AM
Subject: RPG Web Service Program
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx
<mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> >

_____




All,

I write RPG (and SQLRPGLE) programs all of the time that I then attach to be
used as Web Services. No issues there.

However, I now have a need for the web service program to call a Java
process. When I compile the program as a "regular" program I receive no
errors. However, when I change the Ctl-Opt to read PgmInfo(*PCML:*Module),
as I do for all of my other web service's programs, I receive a RNF0302,
Errors were found while generating the program information to be placed in
the module.

That's the entire extent of the information. No more. Unlike my previous
RPG service programs that were "pure RPG", this does have prototypes for the
Java, Java class declarations, creation of Java objects, and such, but that
is all needed for RPG to make the call to the Java class.

Has anyone successfully created an RPG program, as a web service, where that
web service then directly calls a Java class in the IFS? This must be
possible, right? I feel like I am missing something very obvious inside of
my RPG program but can't figure out what.

Any and all thoughts and ideas, as always, are very welcomed. I really
don't want to have to add another layer: an RPG program as a web service,
calling another RPG program that call the Java process - that seems really
silly, but at this point it also seems like the only possible way to succeed
in this process.

Hope that everyone is staying safe and healthy.

Thanks,

Steve Meisinger



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.