[jboss-jira] [JBoss JIRA] (WFLY-6381) CDI Event handler after transaction success fails to call transactional method

Ján Halaša (JIRA) issues at jboss.org
Wed Mar 16 08:47:00 EDT 2016


Ján Halaša created WFLY-6381:
--------------------------------

             Summary: CDI Event handler after transaction success fails to call transactional method
                 Key: WFLY-6381
                 URL: https://issues.jboss.org/browse/WFLY-6381
             Project: WildFly
          Issue Type: Feature Request
          Components: CDI / Weld, EJB, JCA
    Affects Versions: 10.0.0.Final
         Environment: Windows 7, Java 1.8.51
            Reporter: Ján Halaša
            Assignee: Stuart Douglas
         Attachments: AfterSuccessTest.zip, wildfly.log

Scenario:
# EJB transactional business method fires a CDI event
# The CDI event is handled by an event observer configured to receive event after its transaction succeeds (during = TransactionPhase.AFTER_SUCCESS)
# The event handler calls another EJB transactional method, but the call fails with a ResourceException, error code IJ000459 (last part of its stacktrace pasted below). Full log is attached as a file. I think, when the handler is called, the original transaction should not be there anymore and a new one should be created.

I attached a simple test web application with a servlet which triggers the sequence described before. I tried the test application on Weblogic 12.2.1 and it worked without problems. The application requires a data source - H2 in-memory is good enough, table will be created automatically by JPA.

{code:java}
Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction
	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:424)
	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)
	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
	... 196 more
Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffffac180a71:3fd5e4ea:56e93a24:184 status: ActionStatus.COMMITTED >
	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:408)
	... 198 more
{code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jboss-jira mailing list