Announcement Announcement Module
Collapse
No announcement yet.
Recovering from Transient Database Outages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recovering from Transient Database Outages

    Hi,

    I have set up a test application based on the JPetstore application. It uses the iBatis database mapping layer with a Commons basic data source. The database is MS SQL Server.

    If I shutdown the database and execute an application request, I get an exception that the database connection is reset. So far, so good. However, if I restart the database, the connection is never refreshed until the application is redeployed.

    What should the calling DAO do so that recovery will occur automatically when the database is restarted (without redeploying the application)?

    Thanks,

    Alan

  • #2
    Look in the documentation for the connection pool that you are using. There should be functionality to deal with this issue at the connection pool level.

    Comment


    • #3
      Hi all,

      I have exactly the same problem apolk had when he sent his post in 2004...
      I am actually planning to refresh the connections in a case of a database crash/recovery by catching the exception, but I would like to know if someone knows some more elegant way of doing it using conf files or properties in iBatis (which would prevent me from having to code )

      Thanks in advance!!!

      Comment


      • #4
        This might be useful.

        http://forum.springframework.org/showthread.php?t=30612

        Comment


        • #5
          Looks interesting... I will probably try to use the testOnBorrow + validationQuery thing. But it might add some non negligeable process time to my global application which has to answer fast to queries ; so I am not sure about this solution...
          Otherwise, what does the object evictor thread exactly and how to use it and to define it???

          Comment

          Working...
          X