tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Conrad" <andrewcon...@attbi.com>
Subject RE: connection pooling
Date Tue, 27 Aug 2002 12:53:54 GMT
Monitor the database connectivity at your RDBMS.  Most of the time you
can watch the connection construction and all the queries running across
one connection.  



- Andrew

> -----Original Message-----
> From: Pop Marius [mailto:pop@regens.hu] 
> Sent: Thursday, July 25, 2002 5:00 AM
> To: tomcat
> Subject: connection pooling
> 
> 
> 
> Hi everybody !
> 
> I'm using Tomcat 4 and my application works. To get a 
> connection to database I have the following code:
> 
>   Context initCtx = new InitialContext();
>   Context envCtx = (Context) initCtx.lookup("java:comp/env");
> 
>   DataSource ds = (DataSource)envCtx.lookup("jdbc/orgDB");
>   return  ds.getConnection();
> 
> and of course in the server.xml the necessary resource 
> requirements ! The application works fine, but How could I 
> ensure myself that the connections provided are reused, that 
> the pooling machine works, and I really have a pooling mechanism.
> 
> How can I test it ! The documentation sais that 
> ds.getConnection() gets a connection from the pool (which 
> pool, how) but I'm not sure that !
> 
> Any idea would be helpful !
> 
> 
> 
> 
> Pop Marius Lucian
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message