Thursday, 15 September 2011

java - How to check jdbc connection and dbbool connection reach maximun or not? -



java - How to check jdbc connection and dbbool connection reach maximun or not? -

i go know jdbc connection exception , dbbool connection exception , how can avoid those.

if using apache commons pool library, genereicobjectpool provides 2 methods:

getmaxactive() returns amount of allowed connections getnumactive() returns number of used connections

if check getmaxactive() > getnumactive() can achive requirement without catching exceptions.

java exception jdbc error-handling

No comments:

Post a Comment