tomee-users mailing list archives

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

Hi,

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 ?

Olivier
-- 
View this message in context: http://www.nabble.com/PersistenceContext-and-Hibernate-session-tp18404318p18404318.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message