Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1233

Persistence injection could support casting to OpenJPA types

    Details

    • Type: Wish
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: connectors
    • Environment:
      Any

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              brainchild Eric Levy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: