tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chawax <>
Subject PersistenceContext and Hibernate session
Date Fri, 11 Jul 2008 13:50:21 GMT


In my application, I have two persistence contexts for the same persistence
unit, one for JPA, the other for Hibernate :

     * Inject persistence context t4Seam     
    @javax.persistence.PersistenceContext(unitName = "t4Seam")    
    protected javax.persistence.EntityManager emanager;

     * Inject Hibernate Session
    @javax.persistence.PersistenceContext(unitName = "t4Seam")    
    protected org.hibernate.Session hibernateSession;

It used to work with JBoss. But with OpenEJB, I have the following error:
"Use of @PersistenceContext only applies to EntityManager references"

Is it intented or is it a bug ?

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message