IBM


Transactions started in a different method from database access

When a transaction is begun in a method different from where a database connection is accessed, an exception needs to be thrown from the database access method, to indicate a failure. In an ideal situation, a method can throw an application-defined exception, indicating that the transaction logic can be retried. However this is not always allowed, and often a method is defined only to throw a particular exception. This is the case, for example, in the ejbLoad and ejbStore methods on an enterprise bean.


Redbooks ibm.com/redbooks

Next