Use @PersistenceContext if you are using EJB3 and if you need a new transaction 
(@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) ) - Seam ref:

anonymous wrote : 
  | If you are using EJB3 and mark your class or method 
@TransactionAttribute(REQUIRES_NEW) then the trans- 
  | action and persistence context shouldn't be propagated to method calls on 
this object. However as the Seam- 
  | managed persistence context is propagated to any component within the 
conversation, it will be propagated to 
  | methods marked REQUIRES_NEW. Therefore, if you mark a method REQUIRES_NEW 
then you should access the en- 
  | tity manager using @PersistenceContext. 
  | 

otherwise use SMPC.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127255
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to