Bug 1098127 - [GSS] (6.4) "Failure while notifying an observer of event" in CDI transactional observer methods with remote EJB call using JTS
Summary: [GSS] (6.4) "Failure while notifying an observer of event" in CDI transaction...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CDI/Weld, Transaction Manager
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: DR13
: EAP 6.4.0
Assignee: Amos Feng
QA Contact: Matous Jobanek
URL:
Whiteboard:
Depends On: 1167917
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-15 11:10 UTC by Matous Jobanek
Modified: 2019-08-19 12:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, firing a CDI event from a remote EJB client using JTS transactions resulted in a failure in invocation of transactional observers on the server. This was fixed by correcting the JNDI namespace selection for transaction synchronization callbacks in the Weld integration code. Transactional observers are now properly invoked in distributed transaction scenarios.
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
reproducer (30.22 KB, application/empty)
2014-05-15 11:11 UTC, Matous Jobanek
no flags Details
server log 1 (35.22 KB, text/x-log)
2014-06-17 15:12 UTC, Matous Jobanek
no flags Details
server log 2 (35.27 KB, text/x-log)
2014-06-17 15:13 UTC, Matous Jobanek
no flags Details


Links
System ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-3548 Major Closed JTA synchronization for a distributed transaction called with incorrect TCCL 2018-03-16 11:06:24 UTC

Description Matous Jobanek 2014-05-15 11:10:25 UTC
Consider following scenario:
I've got two EAP instances:
EAP1
EAP2

On EAP2 there is remote EJB "InvoiceManagerEJBHome" which has one method "fireInvoiceEvent" which fires an CDI event "InvoiceEvent"
On EAP2 there are also transactional observers methods for all transaction phases which receive event notifications during, before or after completion phase of the transaction in which the event "InvoiceEvent" was fired.

On EAP1 the remote EJB is injected (with the aid of JNDI lookup) and the method "fireInvoiceEvent" is called in container managed transaction.

JTS is used for transaction and servers are properly configured.

Expected result:
The transactional observer methods should be invoked.

Actual results:
Only one transactional observer method is invoked - for the phase IN_PROGRESS, for the rest of the phases there will appear this ERROR message in the server log of EAP2:
11:47:01,034 ERROR [org.jboss.weld.Event] (RequestProcessor-14) WELD-000401 Failure while notifying an observer of event org.jboss.as.quickstarts.cmt.jts.ejb.InvoiceEvent@564d9b1f


How reproducible:
I attached a reproducer example - it is a modified "jts" EAP quickstart


Steps to Reproduce:
1. Download the reproducer example and unzip it
2. follow the parts "Configure the JBoss Servers", "Start the JBoss servers" and "Build and Deploy the Quickstart" of the jts EAP quickstart:
http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/jts/
(no Postgres configuration is needed)
3. open the page http://127.0.0.1:8080/jboss-jts-application-component-1
4. click on the button "fire"
5. look at the server log

Comment 1 Matous Jobanek 2014-05-15 11:11:12 UTC
Created attachment 895842 [details]
reproducer

Comment 2 Matous Jobanek 2014-06-17 15:12:43 UTC
Created attachment 909631 [details]
server log 1

Comment 3 Matous Jobanek 2014-06-17 15:13:10 UTC
Created attachment 909632 [details]
server log 2

Comment 4 Matous Jobanek 2014-06-17 15:13:29 UTC
added the whole server logs - the failure is on the bottom

Comment 6 Amos Feng 2014-12-08 06:40:58 UTC
I think this issue should be resolved with upgrading the jbossts to 4.17.25.Final with fixing JBTM-2272.

It would be useful to backport the fix of NameNotFound Exception in the upstream WFLY-3548 PR
https://github.com/wildfly/wildfly/pull/6988 although it looks like related to the iiop thread problems. It happens if the Observer class injects the UserTransaction by JNDI "java:comp/UserTransaction"

Tom, feel free to assign the BZ to me if you think it makes sense.

Comment 7 tom.jenkinson 2014-12-08 10:11:00 UTC
Thanks Amos - much appreciated. I am going to add the Transaction Manager component to this too as I had completed missed it.

Comment 9 Matous Jobanek 2014-12-12 14:54:47 UTC
Verified in EAP 6.4.0.DR13


Note You need to log in before you can comment on or make changes to this bug.