[jboss-user] [EJB/JBoss] - Atomic process in Local SSB -Urgent !!!!!!!
sankul123
do-not-reply at jboss.com
Sun May 18 14:03:53 EDT 2008
Hi ALL,
I have a following process, to be done by (Local)SSB[Stateless Session Bean]-
<atomic operations in a method in SSL>
1. Persist [update] some values in database.
2. Some file operations , write some data to file.
</atomic operations>
I want both operations to be atomic. My Local SSL EJB is a CMT and its method 'transaction' attribute is marked for new transaction.
void myAtomicProcess(String a, String b)throws MyException{
|
| //1. update db...
|
| //2. update file ...
|
| }
If there is any exception while comitting[at the end of method] , I want to rolback my changes done to file i,e restore the file as it was.
Please help me to achieve this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151631#4151631
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151631
More information about the jboss-user
mailing list