commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@sapo.pt
Subject expected behavior of the DBCP (when a db session is killed)
Date Wed, 24 Feb 2010 12:12:44 GMT
Good morning,

What is the expected behavior of the DBCP when I try to get a  
connection from the pool and the connection is invalid (eg a session  
kill was made in the database)?

Is it identified that the conn is invalid, the conn is refreshed and  
returned a valid connection or is returned an exception?


Context initContext = new InitialContext();
Context envContext  = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");


######### A session KILL is made in the database ###########

Connection conn = ds.getConnection();

######### what's happen here? ##############

Thanks,
Best Regards

Thanks
Best Regards





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message