Bug 1435549

Summary: [GSS](6.4.z) Exception coming from a transaction resource has to be provided to client when transaction failure occurs on server
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ondrej Chaloupka <ochaloup>
Component: EJB, Transaction ManagerAssignee: Ondrej Chaloupka <ochaloup>
Status: CLOSED CURRENTRELEASE QA Contact: Jiří Bílek <jbilek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.14CC: bmaxwell, david.lloyd, fmarchio, jbaesner, jbilek, msochure, ochaloup, rstancel
Target Milestone: CR1   
Target Release: EAP 6.4.16   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-22 09:24:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1316270, 1406552, 1441888, 1441890    
Bug Blocks: 1406866, 1434495, 1441887, 1459942, 1467688    
Attachments:
Description Flags
Test case to reproduce the issue none

Description Ondrej Chaloupka 2017-03-24 08:01:11 UTC
The problematic scenario is following

1. a client server starts a transaction and call other server with the txn context
2. the other server makes some actions (resources are enlisted and some work is done)
3. the client server calls prepare/commit for ejb remoting resource pointing on the other server
4. the other server tries to prepare/commit its subordinate transaction but it fails
   - a resource has a trouble and throws an exception
5. server should pack the txn exception and put there the exception that was thrown by resource
5. the client server should see the exception, exception cause and suppressed exceptions
   (suppressed exceptions contains the exception thrown by client)

This behavior is expected by customer.

Current behavior (6.4.CP14) works well for init cause
but the server does not pack the exception thrown
from resource and not sending it to client as suppressed exception part.

Now, here we come an additional trouble. Suppressed exception capability was added to Throwable API
in JDK7. EAP6 code is based on JDK6. The fix of this issue can work *only on JDK7*.
Because the suppressed exception is part of the JDK7 there is no support for the suppressed
part being printed by jboss logmanager. There is need a backport of LOGMGR-148[3] being part
of the release. The backport is covered by logmanager release version 1.5.7.Final.

This issue follows the other previous ones [1][2] which were solving the part where Narayana has to gather exceptions from the resource.
This issue has to solve the trouble where those gathered exceptions are passed from server to client.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1316270
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1406866
[3] https://issues.jboss.org/browse/LOGMGR-148

Comment 1 Ondrej Chaloupka 2017-04-12 03:54:13 UTC
Just linking here created PR for this bz to 6.x stream. I'm not sure what is correct branch where the PR should be pointed to but the fix should be just about cherry-picking then
https://github.com/jbossas/jboss-eap/pull/2967

Comment 2 Ondrej Chaloupka 2017-04-13 06:51:13 UTC
PR replaced by https://github.com/jbossas/jboss-eap/pull/2971

Comment 4 Francesco Marchioni 2017-04-19 07:39:50 UTC
Created attachment 1272517 [details]
Test case to reproduce the issue

Test case to reproduce the issue

Comment 8 Jiří Bílek 2017-06-12 09:08:18 UTC
Verified with EAP 6.4.16.CP.CR1

Comment 9 Petr Penicka 2017-06-22 09:24:07 UTC
Released on June 20 2017 as part of the EAP 6.4.16 maintenance release.