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



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


_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
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 thread ...

Follow-Ups:

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.