|
Marady -- Are you asking how to use connection pooling with iSeries WAS or in some other environment. If you're interested in the iSeries WAS implementation, see http://publib.boulder.ibm.com/was400/40/AE/english/docs/datcpovr.html, for example. HTH, Gary > -----Original Message----- > From: java400-l-admin@midrange.com > [mailto:java400-l-admin@midrange.com] On Behalf Of > MaradyPrak@BigLots.com > Sent: Monday, March 25, 2002 12:00 PM > To: java400-l@midrange.com > Subject: Re: JDBC Connection pooling > > > > Dave, > > This is great if I have a long running application that needs > to hit the database back end multiple times. Do you know of > a way to incorporate datasource connection pooling with JNDI > or something similar. What I'm interested is something that > always running and can give out connections to the database > through the JNDI look-up. So, my other applications running > can get connection from the same central naming directory > services. This way all other applications do not have to > insatiate the classed with the connections and datasource > up-front every time. For example, like the Websphere > Application server, it have a central datasources, an all the > applications can use it when ever and never have to worry > about creating datasource or connection to the database for > every execution. I don't know if I'm explaining my-self > clearly or not. But let me know if you want me to explain it > in another way. > > > Kind Regards, > Marady Prak - Technical > Specialist/Administrator, Himalaya System Big Lots, Inc 300 > Phillipi Road Columbus, OH 43228 > Phone: 614-278-7186 Fax: 614-278-4769 > http://www.eonestopshop.com > > > > > David Gibbs > <dgibbs@mks.com> To: > "'JAVA400 List'" <JAVA400-L@midrange.com> > Sent by: cc: > java400-l-admin@mi Subject: Re: > JDBC Connection pooling > drange.com > > > 03/25/2002 01:21 > PM > Please respond to > java400-l > > > > > > > Mike Silvers said: > > Does anyone have a working example of using JDBC connection > pooling? > > I have done several searches on the web and found article after > > article, but I would like to see a real working example of JDBC > > connection pooling.. > > Yes, as a mater of fact, I just figured this out a few weeks ago. > > I think that the reason you couldn't find much is, connection > pooling is not part of Java 2 1.3 (I think). It might be in > 1.4, but I'm not sure. JDBC connection pooling is database > and/or environment specific. > > Here's what I did to create a JDBC connection pool using JT400... > > // build your connection pool ... > > AS400JDBCConnectionPoolDataSource dataSource = > new AS400JDBCConnectionPoolDataSource(hostId, > userid, password); dataSource.setLibraries(fileLibrary); > dataSource.setTransactionIsolation("none"); > AS400JDBCConnectionPool pool = new > AS400JDBCConnectionPool(dataSource); > pool.setMaxConnections(poolSize); > > // to get a connection > Connection con = pool.getConnection(); > > // to give the connection back > con.close(); > > david > > -- > David Gibbs > Sr. Software Engineer / R&D / MKS Inc., www.mks.com > Lombard, IL, USA; tel: 630-495-2108; fax: 630-495-3591 > Build Better Software
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.