Results 1 to 2 of 2
  1. #1
    LymonAdd is offline Member
    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    Default Oracle: Disconnection problem

    Hello!
    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.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    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.

Similar Threads

  1. EJb lock problem with oracle 10g
    By yatin in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 10-06-2010, 02:24 PM
  2. Replies: 3
    Last Post: 03-19-2010, 12:59 AM
  3. Replies: 3
    Last Post: 10-14-2009, 09:32 AM
  4. problem with hibernate and oracle 8i
    By javadev in forum JDBC
    Replies: 4
    Last Post: 08-09-2007, 02:21 PM
  5. oracle problem
    By Peter in forum JDBC
    Replies: 1
    Last Post: 07-09-2007, 04:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •