MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-254

support entity-manager injected via @PersistenceContext

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.0.3
    • Component/s: JEE-JPA1-Module
    • Labels:
      None

      Description

      it should

      //...
      public class MyBean
      {
      @PersistenceContext(unitName = "myPersistenceUnit")
      private EntityManager entityManager;

      @Transactional
      public void delete(Entity entity)

      { this.entityManager.remove(em.merge(entity)); }

      @PreDestroy
      public void cleanup()
      {
      if(this.entityManager.isOpen())

      { this.entityManager.close(); }

      }
      }

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Gerhard Petracek
              Reporter:
              Gerhard Petracek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development