Link to home
Start Free TrialLog in
Avatar of ruby_srinivas
ruby_srinivas

asked on

Maximum database connection Problem


Hi,

I am using a middle ware integration tool which gets connected to oracle database.

But in the code(Java) there is no where that we are trying to close the result set and the connections . The conenctions are always open.

When the DB is down, still the tool assumes the DB is up and tries to hit the database again and again increasing the number of connections. Once it reaches to the highest level the whole DB is down.

So I just want to know is there any way in java which verifes the connection is up or not  . if the DB is not up we try to connect to the database for three time or may four times, if by that time DB is up it should get connnected  other wise we ask it to sleep for say 3 hours and then try again..

Please help me with this situation.

Srini
Avatar of Mick Barry
Mick Barry
Flag of Australia image

if the db is not then you cannot get a connection to it. it will throw an exception.
Avatar of ruby_srinivas
ruby_srinivas

ASKER


Yes thats right I get an exception saying that Oracle is not avaliable. But I wan to restrict the number of times it tries to connect to the DB , Say only 4 times and even then if DB is not up then it should sleep for 3 hours and try again..

Srini
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial