commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <ja...@carmanconsulting.com>
Subject Re: expected behavior of the DBCP (when a db session is killed)
Date Wed, 24 Feb 2010 13:14:59 GMT
Do you have the validation query set?

On Wed, Feb 24, 2010 at 7:12 AM,  <couva@sapo.pt> wrote:
> 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
>
>

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


Mime
View raw message