>
> 1)       Which is faster JNDI Based Connection pool / ordinary JDBC based 
> connection / close ?

JNDI based connection pool.  The connections are potentially already
formed and ready for use when you call for one.  Ordinary JDBC would
explicitly create a new connection everytime you need one with all the
costs associated with that.

> conn.close() --> What does this code do ? (return connection to pool or close 
> the connection )

It's essentially pool implementation specific, but in most db pools, the
connection is simply returned to the pool and made available to the next
request for a connection.

--David

karthikn wrote:
> Hi
>
> Spec:
> O/s :  Unix HP 11i
> Tomcat : 6.0.18
> J2sdk : 1.6
> DB : Oracle 10g
>
> Question
>
> 1)       Which is faster JNDI Based Connection pool / ordinary JDBC based 
> connection / close ?
>
> 2)       In JNDI / context based  Connection pool  for the code given below
>
>        InitialContext ic = new InitialContext();
>        DataSource ODS 
> =(javax.sql.DataSource)ic.lookup("java:comp/env/jdbc/MYSCEMA");
>        Connection conn = ODS.getConnection()
>
>        // Insert /Update /Delete/...
>
>        conn.close() --> What does this code do ? (return connection to pool 
> or close the connection )
>
>     Googled /yahooed but non correct answers ....
>
> Please advice
> Karthik
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to