jpa-spec
  1. jpa-spec
  2. JPA_SPEC-72

Allow @PersistenceContext to be used on parameters ot enable constructor injection of EntityManagers

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Labels:
      None

      Description

      Currently it's not possible to inject EntityManagers into constructors as @PersistenceContext is defined to not be allowed on parameters. it would be cool to enable this as users could then design application components using constructor injection only.

        Activity

        Oliver Gierke created issue -
        Hide
        arjan tijms added a comment -

        Wouldn't this automatically be possible when those contexts can be injected with @Inject?

        Show
        arjan tijms added a comment - Wouldn't this automatically be possible when those contexts can be injected with @Inject ?

          People

          • Assignee:
            Unassigned
            Reporter:
            Oliver Gierke
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: