× 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

the problem with mixing rpg and java is maintenance and stability. You need 
programmers with knowledge in both worlds. Java only runs in multithreaded 
context and rpg doesn't run well in multithreaded context. If you have 
requirements (e.g. reuse of available components), best practice is to 
seperate both worlds as good as possible.

First case calling RPG from java: 
best choice 1: write the entire application in java

next better choice: wrap the rpg code in stored procedures or user defined 
functions. advantages: better decoupling, standard parameter mapping, 
Connection pooling available, rpg runs in its normal job context, java uses 
standard jdbc drivers.

Second case generating PDF from RPG applications:

Best practice from a java perspective: write the entire application in java.

Next best choice: rpg application generates its output to database or 
streamfile. java application generates pdf from this intermediate output. 
advantage: better decoupling from rpg and java, no need for starting multiple 
JVMs for generating prints, standard open source frameworks available.

Dieter Bender 

On Montag, 12. Januar 2004 21:17, Ashish Kulkarni wrote:
> Hi
> I have been calling RPG programs from java using PCML
> with great success,
> I have a requirement where i have to create a PDF
> file, which can later be faxed, emailed or printed
> so i call a java program from RPG which builds a PDF
> file
> Any better ideas of doing this
>
> Ashish
> --- "Bartell, Aaron L. (TC)"
>
> <ALBartell@xxxxxxxxxxxxxx> wrote:
> > 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.
> >
> > I agree that calling Java from RPG is pretty much
> > useless unless it is a
> > batch process or if you have a huge machine.  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).
> >
> >
> >
> > Aaron Bartell
> >
> > -----Original Message-----
> > From:
>
> java400-l-bounces+albartell=taylorcorp.com@xxxxxxxxxxxx
>
> [mailto:java400-l-bounces+albartell=taylorcorp.com@xxxxxxxxxxxx]On
>
> > Behalf Of Dieter Bender
> > Sent: Monday, January 12, 2004 11:08 AM
> > To: Java Programming on and around the iSeries /
> > AS400
> > Subject: Re: starting JVM is slow
> >
> >
> > Hi,
> >
> > IMHO best practice is: not to call java from RPG and
> > vice versa.
> >
> > Dieter Bender
> >
> > On Montag, 12. Januar 2004 17:35, Ashish Kulkarni
> >
> > wrote:
> > > Hi
> > > I am calling Java program from RPG, and for the
> >
> > first
> >
> > > time it is very slow, as it has to start the JVM
> >
> > etc,
> >
> > > is there a way to imporve performance , what are
> >
> > the
> >
> > > best practice to call java from RPG,
> > >
> > > Ashish
> > >
> > > __________________________________
> > > 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
> >
> > _______________________________________________
> > 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.
> > _______________________________________________
> > 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 ...

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.