Persistence injection could support casting to OpenJPA types
------------------------------------------------------------

                 Key: OPENEJB-1233
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1233
             Project: OpenEJB
          Issue Type: Wish
          Components: connectors
    Affects Versions: 3.1.2
         Environment: Any
            Reporter: Eric Levy


As given in the EJB 3 specification, if a PersistenceContext annotation is used 
on a EntityManager field, or a PersistenceUnit is used on a 
EntityManagerFactory field, OpenEJB injects the appropriate object.  However, 
developers may want to want to leverage the additional methods provided by 
OpenJPA.  Currently, if the annotated types are OpenJPAEntityManager or 
OpenJPAEntityManagerFactory, OpenEJB leaves the fields as null.  To obtain 
OpenJPA types, developers must call the OpenJPAPersistence.cast() method, 
generally in a PostContruct annotated method.  OpenEJB could detect that the 
annotated types are of OpenJPA and perform appropriate casting and injection.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to