[jboss-user] [EJB/JBoss] - Re: how to turn on ejb transaction demarcation?
mcandelo
do-not-reply at jboss.com
Thu Mar 5 09:53:49 EST 2009
One other thing I forgot was the @TransactionManagement and @TransactionAttribute, when injecting the UserTransaction for the thread, I set these items on the bean like so:
| @TransactionManagement(TransactionManagementType.BEAN)
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public class MyBean
| {
| ...
|
But this is for bean managed transactions, if you want to continue to use the container managed transactions which is the default, you don't need these, but you can specifically request CMT by doing this:
| @TransactionManagement(TransactionManagementType.CONTAINER)
| public class MyBean
| {
| ...
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215342#4215342
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215342
More information about the jboss-user
mailing list