0 Replies Latest reply on Aug 3, 2012 9:13 AM by Anton Huba

    Why does EntityManager injection work in 5.1 but not in 7.1.1?

    Anton Huba Newbie


      My application gets the EntityManager and UserTransaction in each JSP file using the injection feature:


      <%! @PersistenceContext(unitName = "SSIS2")
      public EntityManager em;

      UserTransaction utx;


      I am not using the em and utx there, I distribute it to my controller classes to access the database.

      Why did this work in JBoss 5.1 but not in the new JBoss 7.1.1? According to the JSP specs it should not be permitted.


      How can I now retrieve the EntityManager and the UserTransaction?