Hi Bob,

Bob Damato wrote:
Hello Armin, Thank you for the information. I extended the ConnectionFactoryPooledImpl and I was able to gain access to the connection pool information.

Another question: Is there a way that I can set up the pool to notify me
(log entry, email, electric shock etc) if a broker is evicted from the pool?


you have to differ between the connection-pool and the PB pool. The PB-pool was setup in PersistenceBrokerFactoryDefaultImpl.
Think commons-pool does not provide any Listener to get notification of pooling actions.


I think you can ask for the number of active PB directly in OJB doing

int active = PersistenceBrokerFactoryFactory.instance().activePersistenceBroker()

If you need more detailed control have a look in PersistenceBrokerFactoryDefaultImpl and extend it if possible.

I will try to implement some basic monitor methods for connection/PB pool in OJB 1.1 - suggestions are welcome.

regards,
Armin


-----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 4:07 PM To: OJB Users List Subject: Re: Pool Info?


Hi Bob,

currently there are no methods to access the used commons-pool instances in ConnectionFactoryPooledImpl. I recommend to extend ConnectionFactoryPooledImpl and override method #createConnectionPool.

public ObjectPool createConnectionPool(JdbcConnectionDescriptor jcd)
{
   ObjectPool pool = super.createConnectionPool...
   // add 'pool' instance to list or map, ObjectPool has methods to
   // lookup active connections, idle connections ...
   return pool;
}

regards,
Armin

Bob Damato wrote:

I'm using ConnectionFactoryPooledImpl and I'm trying to find run time information about 
the pool such as the current number of connections "checked out", and the 
number of connections that were timed out etc. Is there any way to get this data?





---------------------------------------------------------------------
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