[jboss-user] [EJB 3.0] - Re: JTA EntityManager cannot access a transactions

oskar.carlstedt do-not-reply at jboss.com
Wed Sep 19 16:36:30 EDT 2007


Hello!

I'm not sure , but if I look at your code you instantiate the em by yourself. Examples I've seen do not do that, they leave that part to JBoss, like the following code. Are you sure you get the correct entity manager?


  | 
  | @Stateless
  | @TransactionManagement(TransactionManagementType.BEAN) 
  | public class MySessionBean implements MyInterface {
  | 
  |    @Resource
  |    private EntityManager em;
  | 
  | }
  | 
  | 

Kind regards
/Oskar


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

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



More information about the jboss-user mailing list