tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Vysny <...@whitestein.com>
Subject Re: PersistenceContext and Hibernate session
Date Fri, 11 Jul 2008 14:03:20 GMT
On Fri, 2008-07-11 at 06:50 -0700, chawax wrote:
> 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

I think it's intended: Hibernate API is not part of JPA/EJB3
specification afaik.

Martin

Mime
View raw message