This content has been marked as final.
Show 3 replies
-
1. Re: trying to downstep to hibernate API
patrick_ibg Oct 12, 2005 5:30 PM (in response to patrick_ibg)I cast EntityManager to HibernateEntityManager.
I should add that I do this to get the current Hibernate session. -
2. Re: trying to downstep to hibernate API
patrick_ibg Oct 12, 2005 9:50 PM (in response to patrick_ibg)Never mind, after some more searching, I figured it out.
I was doing
Session session = ((HibernateEntityManager) entityManager).getCurrentSession();
When I should've used
HibernateSession session = (HibernateSession) entityManager ;
(or something like that...)
I did notice that the HibernateSession is still packaged under the jboss package hierarchy, as opposed to org.hibernate. -
3. Re: trying to downstep to hibernate API
gavin.king Oct 13, 2005 5:43 AM (in response to patrick_ibg)You can also inject a Hibernate session directly, by doing something like:
private @PersistenceContext Session session;
Check the JBoss EJB3 docs.