- A SLSB is executing code without CMT or BMT
- The SLSB instantiates and calls a method in a POJO with its javax.ejb.SessionContext as a parameter.
- The POJO uses context.getUserTransaction() to start a transaction, then performs a database update.
- The POJO then instantiates and calls a method in a different POJO which then executes some code in the same transaction.
- The second POJO returns to the first where the transaction is either rolled back or committed
I wanted to commit an update in one use case, and then continue on and commit a second update.
I also wanted (if possible) to use only one SLSB per round trip from client to server and back to client. I did not want one use case facade calling another use case facade. I am hoping this design choice provides better response time and is worth the extra effort. What do you think?
pay {
try{
nonTransactionalTask();
transactionalTask();
}catch (SystemException se){
undoTransactionalTask();
throw se;
}
}
Stop it! You're embarassing me! And you are embarrassing this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|