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
Post a Comment