java - Ejb3 stateless bean with CMT -


is possible have this? client code in thread pseudo code :

transaction.begin(); ejb.method(); transaction.commit(); 

the method() belongs ejb3 stateless session bean, annotated transactionattributetype.required. method() set setrollbackonly().

if ejb method sets setrollbackonly(), should there checks before trying commit transaction?

thanks!

you set transaction attribute on called bean (method) transactionattributetype.requires_new force new transaction on method.

btw: make sure call proxied methods if specify transaction attribute on method. i.e., calling method of ejb has specific transaction attribute set within same ejb not work expect...


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -