What's dbConnectionBroker?

At 2002-09-27 15:36:00 you wrote:
>miagi,
>Yes, that's what I m doing now and it is working fine.  I gave up on using
>JNDI and now I realize that I don't really need to use JNDI.
>I will also try your second alternative using dbConnectionBroker.  This way
>i can use it for nay database.
>
>Thanx a lot.
>Zeeshan
>
>
>----- Original Message -----
>From: "Luciano Kiniti Issoe" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Friday, September 27, 2002 12:06 PM
>Subject: Re: JDBC Connnection Pool for Oracle
>
>
>Zeechan, I use this in my code and it works fine doing both pooling and
>connection cache. Read more about it at the Oracle docs.
>
>import oracle.jdbc.pool.*;
>           oracle.jdbc.pool.OracleConnectionPoolDataSource ocpds = new
>OracleConnectionPoolDataSource();
>            ocpds.setURL(hotstring); // jdbc:oracle:oci8:@<SID> or
>jdbc:oracle:thin:@<HOST>:<SID>
>            ocpds.setUser(user); //scott
>            ocpds.setPassword(password); //tiger
>            oracle.jdbc.pool.OracleConnectionCacheImpl occi = new
>OracleConnectionCacheImpl(ocpds);
>            //set the caching size from 3 to 10 growing in a DYNAMIC SCHEME
>(create connections as needed and closes then as they become uneeded )
>            occi.setMaxLimit(10);
>            occi.setMinLimit(3);
>            occi.setCacheScheme(OracleConnectionCacheImpl.DYNAMIC_SCHEME);
>
>another option if you don't want to stick with Oracle your project's entire
>life is using com.javaexchange.dbConnectionBroker.DbConnectionBroker,
>
>you can find examples at http://www.javaexchange.com , but is simple as
>follows:
>
>        // The below statement sets up a Broker with a minimun pool size of
>2 connections
>        // and a maximum of 10.  The log file will be created in
>        //  /tmp/DBConnectionBroker.log and the pool connections will be
>        // restarted once a day.
>
>        DBConnectionBroker broker = new DBConnectionBroker(dbDriver, dbURL,
>userId, password,2,10, "//tmp//DBConnectionBroker.log",1.0);
>        Connection conn = broker.getConnection();
>
>
>
>hope it helps
>Regards
>
>miagi
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303328




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to