I would like to run a JUnit test and access the EntityManager of the EJB I am unit testing in order to persist some records in my Unit Test. The EntityManager in the SessionBean that is being tested has a name defined by: @PersistenceContext(name="foo", unitName="bar"). I then try to retrieve the EntityManager using the name via a jndi lookup but i am unable to retrieve the EntityManager.
Is there another way to do this? How can i persist data in my UnitTest via JPA? -- View this message in context: http://www.nabble.com/JPA-from-Unit-Test-tp25645402p25645402.html Sent from the OpenEJB User mailing list archive at Nabble.com.
