lundi 3 août 2015

Gracefully handling DB Node reboot in J2EE application

In my organization, Oracle database is a 2 node RAC database. Each member of the cluster is on a reboot schedule that is:

Node 1 - First Sunday of each month at 1:00am Node 2 - Second Sunday of each month at 1:00am

Whenever these node gets rebooted, I see below exception in my J2EE application log file:

org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:209)
... 154 more
Caused by: java.sql.SQLRecoverableException: ORA-01089: immediate shutdown in progress - no operations are permitted

                    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
                    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
                    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
                    at oracle.jdbc.driver.T4C7Ocommoncall.processError(T4C7Ocommoncall.java:93)
                    at oracle.jdbc.driver.T4CTTIfun.receive

Our DBAs said that "We do a shutdown transactional local. It is supposed to try to wait for in flight transactions to finish and not allow new transactions. "

As I mentioned above, out of 2 nodes, only one node gets rebooted at a time, and considering DBAs answer.. our app should never block on database during reboot process.

My question is, why my application is throwing this exception then? And why my application is trying to connect to a DB node for which shut down is in progress?

Aucun commentaire:

Enregistrer un commentaire