[
https://issues.apache.org/jira/browse/OPENEJB-2120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980119#comment-14980119
]
Romain Manni-Bucau commented on OPENEJB-2120:
---------------------------------------------
Think a copy/paste failed in your comment but you will always get a
JtaEntityManager from openejb using @PersistenceContext. If you want to inject
the unwrapped hibernate impl just add to your code a:
{code}
public class MyEmProducer {
@PersistenceContext(unitName = DBDefinitions.ORACLE_PERSISTENCE_UNIT)
EntityManager oracleEntityManager;
@Produces @Named EntityManager em() { return em; }
}
{code}
And use instead of @PersistenceContext:
{code}
@Inject
@Named("em")
EntityManager em;
{code}
> JPA 2.1 Support
> ---------------
>
> Key: OPENEJB-2120
> URL: https://issues.apache.org/jira/browse/OPENEJB-2120
> Project: OpenEJB
> Issue Type: Wish
> Components: general
> Reporter: Pascal Knüppel
> Assignee: Romain Manni-Bucau
> Labels: jpa21
>
> It would be really great if support for JPA 2.1 was provided. Is there any
> chance that support for this api level will come soon?
> In order to keep my Unit-Tests alive I need to downgrade all the requests to
> the database to jpa 2.0 which makes working on my project very difficult...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)