× 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 Ashish,

On Montag, 12. Januar 2004 22:45, Ashish Kulkarni wrote:
> Hi
> Calling RPG programs from java is very stable and i am
> using it in production envoirnment, also stored
> procedures in RPG program which return resultset
> cursor  is also possible and using it in production
> envoirnment.

Problems will arise, if the java application is multithreaded, then the 
stability is gone. And if you have a mixup of java and rpg (rpg call java and 
this java calls back rpg, or java calls rpg and this calls back java) then 
the situation gets instable. (without synchronisation wrong results, with 
synchronisation deadlocks).

> I know writting a new application in one language is
> the best way to do, but it is often not possible to do
> it, so have to mix different languages to get
> advantage of each language.

In my opinion and my experience its nearly impossible to get advantage of each 
language, whatever this should be. Java is object oriented and rpg is 
procedural (and quite a lot of rpg programms look like written for punching 
cards) and mixing up procedural and OO languages leads to poore design. 
Writing procedural java programs is poor design and to try writing OO RPG 
programms as well. 
In most cases it would be less afford to take an open source framework (only 
available in Java) and write the application in this language.
>
> So far i am able to call java programs from RPG and
> create PDF file etc, and just wanted to find way if i
> can improve the process,
>

The problem in this case is to avoid creating a JVM for every user Job. This 
could be done by using some asynchronous mechanism. The toolbox might contain 
an appropriate server programm or you have to write one of your own using 
sockets or DTAQs or Messages.


> Ashish
>
> --- Joe Sam Shirah <jshirah@xxxxxxxxxxxxx> wrote:
> >     There are a lot of issues involved in this
> > thread, but to really
> > oversimplify, I normally use messages.  By building
> > a couple of front ends,
> > you can start with standard AS/400 message queues
> > and later, if necessary,
> > go to full blown messaging, JMS and so on.  It eases
> > portability or changing
> > service providers ( read called programs or
> > decoupling here ), allows one or
> > your choice of how many VMs to run, a form of
> > logging and even allows for
> > more graceful RPG, Java or any other language
> > programs that can access
> > messages ( restart, pause, shutdown, etc ).
> >
> >
> >
> >     Joe Sam
> >
> > Joe Sam Shirah -        http://www.conceptgo.com
> > conceptGO         -
> > Consulting/Development/Outsourcing
> > Java Filter Forum:
> > http://www.ibm.com/developerworks/java/
> > Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
> > Going International?
> > http://www.jguru.com/faq/I18N
> > Que Java400?
> > http://www.jguru.com/faq/Java400
> >
> >
> > ----- Original Message -----
> > From: <meovino@xxxxxxxxxxxxxxxxx>
> > To: "Java Programming on and around the iSeries /
> > AS400"
> > <java400-l@xxxxxxxxxxxx>
> > Sent: Monday, January 12, 2004 3:47 PM
> > Subject: RE: starting JVM is slow
> >
> > > > Just curious, what are your reasons for not
> >
> > calling RPG from Java?  I
> >
> > > have a
> > >
> > > > Servlet in production calling an RPG program
> >
> > with PCML as the
> >
> > > intermediary,
> > >
> > > > and it is very very fast.
> > >
> > > Aaron, are you using this in production?  Sounds
> >
> > like you're pretty happy
> >
> > > with it.  I've only used the RPG Program Call
> >
> > wizard in WSDCi and run it
> > in
> >
> > > the test environment, but it seems to execute
> >
> > pretty well.  Have you done
> >
> > > anything with calling an RPG program that returns
> >
> > an SQL result set?  I'd
> >
> > > be interested to know if it's possible to call an
> >
> > RPG program that returns
> >
> > > a result set from a servlet.  I guess if you call
> >
> > the RPG program as a
> >
> > > stored procedure...
> > >
> > > > I agree that calling Java from RPG is pretty
> >
> > much useless unless it is a
> >
> > > > batch process or if you have a huge machine.
> > >
> > > We have an 8-way 830, and the performance on the
> >
> > first call still blows.
> >
> > > We were using this to use JavaMail, and now that
> >
> > we bought a package that
> >
> > > sends mail with a CL command, everyone is
> >
> > abandoning the JavaMail/RPG
> > stuff
> >
> > > we wrote (at my suggestion).  You have to have
> >
> > some way to create the JVM
> >
> > > before the initial call.  I think someone once
> >
> > suggested using socket
> >
> > > servers, data queues would be another way.
> > >
> > > > People will tell you to use a
> > > > data queue or something similar, but that means
> >
> > you most likely need to
> >
> > > > write your Java interface so it can run off of a
> >
> > completely validated
> >
> > > data
> > >
> > > > queue record (meaning you don't collaborate with
> >
> > all the different
> >
> > > methods
> > >
> > > > in a Java class).
> > >
> > > Mike E.
> >
> > _______________________________________________
> > This is the Java Programming on and around the
> > iSeries / AS400 (JAVA400-L) mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> > http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/java400-l.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> _______________________________________________
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
> mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.

-- 
mfG

Dieter Bender


DV-Beratung Dieter Bender
Wetzlarerstr. 25
35435 Wettenberg
Tel. +49 641 9805855
Fax +49 641 9805856
www.bender-dv.de
eMail dieter.bender@xxxxxxxxxxxx


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.