Uploaded image for project: 'MyFaces CODI'
  1. MyFaces CODI
  2. EXTCDI-254

support entity-manager injected via @PersistenceContext

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.2
    • 1.0.3
    • JEE-JPA1-Module
    • 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(); }

      }
      }

      Attachments

        Issue Links

          Activity

            People

              gpetracek Gerhard Petracek
              gpetracek Gerhard Petracek
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: