closing a connection that you obtained through a pooled DataSource will
merely return it to the pool, and not actually close it.


> -----Original Message-----
> From: Randy [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 27, 2004 3:55 PM
> To: 'Tomcat Users List'
> Subject: RE:JNDI question
> 
> 
> Hello,
> 
> I have an easy question about using JNDI in tomcat 5
> 
> I am using the example @ 
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources
> -howto.html
> 
> Below is my server.xml entry
> 
> Here is what I do not quite understand.
> 
> In this little bit of code do I have to do anything to use the pooling
> 
> When I do a conn.close, does that actually close the db 
> connection, or does it just release it to the pool
> 
> Thanks
> 
> Sorry if this is an obvious question
> 
> Randy
> 
> 
> Context initCtx = new InitialContext();
> DataSource ds = 
> (DataSource)envCtx.lookup("java:comp/env/jdbc/UnitNet");
> 
> Connection conn = ds.getConnection();
> ... use this connection to access the database ... conn.close();
> 


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

Reply via email to