Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3137

logging errors in destroying a requestscoped entitymanager

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 8.0.0.Final
    • CDI / Weld
    • None
    • window 7 64bits, javaee 1.7

      I have a simple producer for a requestscoped entitymanager:

      @PersistenceContext(unitName = mydatasource)
      private EntityManager em;
      @Produces
      @myEM
      @RequestScoped
      protected EntityManager createEntityManager()

      { return em; }

      protected void closeEntityManager(
      @Disposes @myEM EntityManager entityManager) {
      if (entityManager.isOpen())

      { entityManager.close(); }

      }

      I inject this to applicationScoped bean. In the log, I see for each close of entityManager, wildfly logs an error:
      WELD-000019: Error destroying an instance org.jboss.as.jpa.container.TransactionScopedEntityManager@7c213180 of Producer Method [EntityManager] with qualifiers [@myEM @Any] declared as [[BackedAnnotatedMethod] @Produces @myEM @RequestScoped protected createEntityManager()]

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              yangju Richard Yang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: