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

Persistence injection could support casting to OpenJPA types

Attach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment Visibility
    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.2
    • None
    • connectors
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            brainchild Eric Levy

            Dates

              Created:
              Updated:

              Slack

                Issue deployment