Hi list,
        I used to encountered the same "exhausted pool" with tomcat
redeployment. To solve this I build a:
        DevDataSourceFactory returning DevDatasource ( with a cleanPool()
method )
        A lifecycle listener who on webapp stop do walk the JNDI tree and call
"cleanPool()" on every "DevDatasource" it founds.

hih
 
Le sam 14/02/2004 � 19:11, Armin Waibel a �crit :
> Hi Rainer,
> 
> Rainer Klute wrote:
> 
> > I use the OJB implementation of the ODMG API in a web application environment with 
> > Tomcat 5 and PostgreSQL 7.4. During development I often redeploy my application 
> > into the running Tomcat. When the servlet context is shutdown, I call 
> > org.odmg.Database.close() to close the database connection.
> > 
> > However, the connection is still hanging around which can be noticed by 
> > PostgreSQL's postmaster processes. (PostgreSQL has one process per database 
> > connection.) After several edit-compile-deploy cycles I have a lot of them. Only 
> > when I shutdown Tomcat the processes and the connections disappear. I suspect that 
> > org.odmg.Database.close() does not really close the database connection.
> > 
> 
> you are right odmg.Database implementation does not close any 
> connections. By default OJB use a connection pool, thus connections will 
> never be closed by OJB (configurabale by 'ConnectionFactoryClass' in 
> OJB.properties).
> 
> For development you can try a workaround like this
> ((ConnectionManagerImpl)broker.serviceConnectionManager()).getUnderlyingConnectionFactory().releaseAllResources()
> 
> regards,
> Armin
> 
> > Best regards
> > Rainer Klute
> > 
> >                            Rainer Klute IT-Consulting GmbH
> >   Dipl.-Inform.
> >   Rainer Klute             E-Mail:  [EMAIL PROTECTED]
> >   K�rner Grund 24          Telefon: +49 172 2324824
> > D-44143 Dortmund           Telefax: +49 231 5349423
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to