db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leandro Rodrigo Saad Cruz <lean...@ibnetwork.com.br>
Subject Testing old connections on ConnectionFactoryDBCPImpl
Date Thu, 22 Jan 2004 14:27:45 GMT
Hi all. I'm not sure how to test if the ConnectionFactoryDBCPImpl
is closing the connection after the configured timeout.

my conf is :

<connection-pool logAbandoned="true" 
		removeAbandoned="true" 
		removeAbandonedTimeout="5"/>

Is this code right ?

public void testGetConnection() 
    	throws Exception
{
    ConnectionManagerIF manager = broker.serviceConnectionManager();
    Connection con = manager.getConnection();
    assert(!con.isClosed());
    Thread.sleep(6000);
    assertTrue(con.isClosed());
}
-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://db.apache.org/ojb
http://xingu.sourceforge.net



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message