[jboss-user] [EJB/JBoss] - Re: transaction propagation
asookazian
do-not-reply at jboss.com
Mon Mar 23 15:59:11 EDT 2009
"semanticLance" wrote : similar issue for me and same exception. the difference for me is that i don't have a class-wide transaction attribute set. just one method calling another. caller does not support transactions and the called method requires a new transaction.
|
| my methods:
|
|
| | @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| | public void persistInt(SimpleInt myInt) {
| | persistIntImplementation(getUser(), myInt);
| | }
| |
| |
| | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| | private void persistIntImplementation(User user, SimpleInt myInt) {
| | myInt.setValue(myInt.getValue() + 1);
| | em.persist(myInt);
| | }
| |
this case is the same issue I posted and solved here:
[url]
http://www.seamframework.org/Community/EJB3AndSeamNonatomicTransactionsWithLoopScenario[/url]
bottom line: you can't use @TransactionAttribute annotation on private methods in a session bean. It just ignores it unfortunately which is what took me so long to figure this limitation out until I read JSR220.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220403#4220403
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220403
More information about the jboss-user
mailing list