Results 1 to 2 of 2
Thread: Oracle: Disconnection problem
- 10-24-2010, 08:07 PM #1Member
- Join Date
- Oct 2010
- Rep Power
Oracle: Disconnection problem
I have a java client and an oracle server. How can I restore disconnected oracle-session, when internet connection uncoupled, and then established again. Or at least how to close that dead session?
When I create a new instance of java.sql.Connection (after disconnection) then oracle serever generetes a new session for my application. It is not very appropriate way for me, becasue there are very strong limitations on opened sessions and with these dead sessions my application can quicly exceed the limit.
Thanks in advance.
- 10-25-2010, 01:48 AM #2
While I'm not sure how to cause the dead sessions closed, would there be a built in mechanism in oracle to query the "current open sessions", and some sort of marker for "last activity observed" for a given session. Then you could have a server side operation ran as a scheduled task (e.g. from cron?) that would connect to oracle, invoke this query to find the current open sessions and last activity times, and infer dead ones by the ones that have not seen any activity for some threshold of time (several hours?) and then close these ones.
Another idea, not sure if it's possible, but to have a server-side middleware to proxy the oracle connection. For example, the client could interact with a stateless HTTP kind of protocol to the middleware, where the network link is expected to be transiently unavailable, and the middleware would be on the same local network as the oracle server, so the session there would never drop due to network outages.
- By yatin in forum Enterprise JavaBeans (EJB)Replies: 2Last Post: 10-06-2010, 02:24 PM
- By jperson in forum JDBCReplies: 3Last Post: 03-19-2010, 01:59 AM
- By ulix83 in forum JDBCReplies: 3Last Post: 10-14-2009, 09:32 AM
- By javadev in forum JDBCReplies: 4Last Post: 08-09-2007, 02:21 PM
- By Peter in forum JDBCReplies: 1Last Post: 07-09-2007, 04:19 AM