commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryunix <budianto.chu...@gmail.com>
Subject Re: Using DBCP with Hibernate - How to reconnect if the poolable connection is closed
Date Sat, 18 Apr 2009 15:42:16 GMT

Hi Carman and Phil,
thanks for the effort put for this issue.
please excuse my lengthy explanation on the problem which lead me my
question.

Our application provides webservices to be used by various application in
our client's environment and generally works fine. However, if there is a
firewall between our application and the database, some problem occur. at
certain webservice call, it will throw the error message 'no more data to
read from socket', and we found out that this is because of the firewall
will interrupt inactive connection between the app server and the DB after
120 minute.

To resolve this, we suggested to update the idle time setting in the oracle
to 90, with the hope that the oracle will terminate the connection before
the firewall, and let the 'testOnBorrow' of dbcp to validate the connection
before it is used. However, this does not resolve our problem. :(:confused:. 

Our next action was to enable the 'removeAbandoned' of the dbcp, suspecting
that the unclosed unconnection was the one contributing to the whole issue.
Even though enabling this feature does not resolve our problem, it does
gives us some clue on the issue. My removeAbandoned does not take effect
because it did not meet the condition where numActive > maxActive -3, hence
I tested in my local with a low 'maxActive' setting and found out that there
is a function which indeed create unclosed connection on certain occasion.
This had finally led me to the finding that when the poolable connection is
closed, i am not able to obtain a new poolable connection within the same
webservice invocation.

It is important to me to know how to obtain the new connection as we would
like the webservice to be able to obtain a new connection if the current
connection is not active.


Thanks million for your help guys:working:



-- 
View this message in context: http://www.nabble.com/Using-DBCP-with-Hibernate---How-to-reconnect-if-the-poolable-connection-is-closed-tp23102913p23114238.html
Sent from the Commons - User mailing list archive at Nabble.com.


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


Mime
View raw message