Paul O'Leary wrote:
> 
> I don't have time to run this down today but this behavior is most likely
> caused by DBBroker's singleton implementation.
> 
> DBBroker.getInstance caches a global instance of DBBroker in a class static
> variable.  Since I assume that DBBroker is loaded as a system class, unless
> the VM instance is cycled you'll always be looking at the same copy of the
> class info and, therefore, the same static variable.

Ahb, that certainly makes sense...the pooled connections may not be
closed out in a timely fashion without stopping the VM.

> If this is a serious problem, one solution may be to have an explicit
> tear-down of the connection pool when Turbine shuts down.  Probably want to
> do this anyway because, as I noted in a previous mail, the pool currently
> shuts itself down in DBBroker's finalize() method which is a bad idea.

+1 on adding a shutdown() method to DBBroker, called when Turbine shuts
down.  Would you anticipate any problems with calling shutdown() from
DBBroker's finalize() method as well?

> I'll have some more time soon to look at this in more detail...

I look forward to it.  :)

Daniel Rall


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to