|
I'm not exactly sure of your environment. It seems like you should be able to set up the AS400ConnectionPool in a static initializer in your SOAP service class. You could code something like: private static AS400ConnectionPool _testPool; static { _testPool = new AS400ConnectionPool(); _testPool.setMaxConnections(10); } Then, in your SOAP method, just grab a connection out of the pool, do your PCML thing and return the connection to the pool. Like this: AS400 a = _testPool.getConnection("my.system.name", "userid", "password"); ProgramCallDocument pcmlDoc = new ProgramCallDocument(a, "myPcmlDoc"); pcmlDoc.setValue(...); pcmlDoc.callProgram("foo"); _testPool.returnConnectionToPool(a); HTH, Gary > -----Original Message----- > From: java400-l-bounces+garyp=firstech.com@xxxxxxxxxxxx > [mailto:java400-l-bounces+garyp=firstech.com@xxxxxxxxxxxx] On > Behalf Of Niall Mcloughlin > Sent: Sunday, September 21, 2003 10:12 PM > To: java400-l@xxxxxxxxxxxx > Subject: Applying AS400ConnectionPool > > > All > > I'm using Tomcat to expose java methods via SOAP ( > Apache AXIS ) which call RPG programs via PCML on the > iSeries. Currently, I'm creating a connection object > each time the client calls the SOAP method, which is > an overhead I'd like to avoid. > > AS400ConnectionPool provides is exactly what I need, > but I can't see how to apply it in this case. > > I'd need the AS400ConnectionPool object to be > instantiated prior to the call to the SOAP method and > the connections established, then use the > getConnection method in the AS400ConnectionPool to > pass a connection to my SOAP service. > > Could someone point me in the right direction ? > > Regards > > Niall > > > > > > > > > ______________________________________________________________ > __________ > Want to chat instantly with your online friends? Get the > FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk > _______________________________________________ > 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. >
As an Amazon Associate we earn from qualifying purchases.
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.