This content has been marked as final.
Show 3 replies
-
1. Re: Using the JPA delegate
gavin.king Feb 27, 2007 5:13 PM (in response to eirirlar)This was a bug in older versions of HEM. It *should* work right in JBoss 4.0.5....
-
2. Re: Using the JPA delegate
eirirlar Feb 27, 2007 6:24 PM (in response to eirirlar)It seems that the entityManager.getDelegate() returns either a SessionImpl or a EntityManagerImpl, depending on wether or not you have the following set up in your components.xml:
<core:managed-persistence-context name="bookingDatabase" auto-create="true" persistence-unit-jndi-name="java:/EntityManagerFactories/bookingData"/>
and persistence.xml:<property name="jboss.entity.manager.factory.jndi.name" value="java:/EntityManagerFactories/bookingData"/>
That is - if this is set up, SessionImpl is returned. Otherwise EntitiyManagerImpl is returned.
I can't really find a logical explanation for this, but it's not a problem as long as I know about it. -
3. Re: Using the JPA delegate
gavin.king Feb 27, 2007 6:26 PM (in response to eirirlar)Perhaps it was an EJB3 container bug - in which case I'm sure the fix will be in JBoss 4.2.