This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi All, For Stateless bean with BMT: If a bean method in tx neither commits nor rollbacks the tx and throws an Application Exception, what happens to tx and what exception client receives? 1.From one side App Exception doesn't automaticly causes tx to rollback, 2.from another side Stateless must to end the tx before returning from the method. Spec says that App Exception is propagated to client always, but this is contradicting to side 2. So what is the answer? Thanks, :roll:
Diana<p>--------<br />SCJP<br />SCWD<br />Passed IBM Portal Multiplatform Implementation
If a stateless session bean instance starts a transaction in a business method, it must commit the transaction before the business method returns. The Container must detect the case in which a transaction was started, but not completed, in the business method, and handle it as follows:
Log this as an application error to alert the system administrator.
Thanks Andrew, It makes sense now. So even if bean throws an AppException without ending a tx, container will respond as you described instead of propagating AppException to the client. Am I right? Thanks, Diana
author and jackaroo