[jboss-jira] [JBoss JIRA] (WFLY-3137) logging errors in destroying a requestscoped entitymanager
Stuart Douglas (JIRA)
issues at jboss.org
Wed Mar 19 19:08:10 EDT 2014
[ https://issues.jboss.org/browse/WFLY-3137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas resolved WFLY-3137.
----------------------------------
Resolution: Rejected
> logging errors in destroying a requestscoped entitymanager
> ----------------------------------------------------------
>
> Key: WFLY-3137
> URL: https://issues.jboss.org/browse/WFLY-3137
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: CDI / Weld
> Affects Versions: 8.0.0.Final
> Environment: window 7 64bits, javaee 1.7
> Reporter: Richard Yang
> Assignee: Stuart Douglas
>
> 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 at 7c213180 of Producer Method [EntityManager] with qualifiers [@myEM @Any] declared as [[BackedAnnotatedMethod] @Produces @myEM @RequestScoped protected createEntityManager()]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list