[jboss-user] [EJB/JBoss] - Re: transaction propagation

semanticLance do-not-reply at jboss.com
Mon Mar 23 14:49:38 EDT 2009


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);
  |     }
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220380#4220380

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220380



More information about the jboss-user mailing list