13 Replies Latest reply on Apr 2, 2002 8:45 AM by Lars Bergmann

    What to do when an Oracle connection dies?

    David Nash Newbie

      I've been developing a small web app in jBoss with Oracle as the DB. When the database goes down for backups at night, the DB connection in the jBoss connection pool becomes invalid. Then the next morning, the first person using the application gets a javax.transaction.HeuristicRollbackException (root cause: Connection reset by peer).

      Possible solutions:

      (1) For every transaction which accesses the database I can check for this exception and try a second time.

      (2) I can take down jBoss before the database backups start and bring it back up when they complete.

      I'm not thrilled with either solution. Can anyone suggest a better way to deal with this?

      Thanks,

      -David