BEA Weblogic Question:

Download Job Interview Questions and Answers PDF

Why did my JDBC code throw a rollback SQLException?

BEA Weblogic Interview Question
BEA Weblogic Interview Question

Answer:

Your JDBC code may throw the following exception:
"The coordinator has rolled back the transaction.
No further JDBC access is allowed within this transaction."

The WebLogic JTS JDBC driver throws this exception when the current JDBC connection transaction rolls back prior to or during the JDBC call. This exception indicates that the transaction in which the JDBC connection was participating was rolled back at some point prior to or during the JDBC call.
The rollback may have happened in an earlier EJB invoke that was part of the transaction, or the rollback may have occurred because the transaction timed out. In either case, the transaction will be rolled back, the connection returned to the pool and the database resources released. In order to proceed, the JTS JDBC connection must be closed and reopened in a new transaction.

Download BEA Weblogic Interview Questions And Answers PDF

Previous QuestionNext Question
How do stubs work in a WebLogic Server cluster?Which of the following are recommended practices to be performed in the ejbPassivate() method of a stateful session bean?