Bug 996136

Summary: RTGov does not store activities when an exception is thrown
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jiri Pechanec <jpechane>
Component: RT GovernanceAssignee: Gary Brown <gbrown>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Sedlacek <jsedlace>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: atangrin, oskutka, soa-p-jira
Target Milestone: ER2Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-12 16:43:32 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:
Attachments:
Description Flags
Reproducer none

Description Jiri Pechanec 2013-08-12 13:37:06 UTC
See attached reproducer

Post a message to url http://localhost:8080/camelbinding

LogginServiceBean will throw an exception

Run a query {"expression": "SELECT act FROM RPCActivityType act LEFT JOIN FETCH act.context LEFT JOIN FETCH act.properties" }  on http://localhost:8080/overlord-rtgov/activity/query

No activities are stored in the server so the problematic transaction is not recorded.

Comment 1 Jiri Pechanec 2013-08-12 13:38:18 UTC
Created attachment 785686 [details]
Reproducer

Comment 2 Gary Brown 2013-08-12 16:43:32 UTC
Sorry Jiri, going to push back on this one aswell. Reasons being:

1) Technical: If switchyard doesn't invoke the event listener when unwinding the stack, then there is no way to determine when the business transaction has completed - so if this functionality was required, then switchyard would need to be fixed to notify the event listener.

2) RTGov is primarily interested in successful transactions - not failed transactions that may be retried - hence for xa transactions, it uses commit notification to do the endScope.

However I agree that non-transaction failed business transactions are a tricky issue, as they potentially have changed state, or triggered further activity, but would not be recorded. However not sure how we could tell if the business transaction would be retried after a fix.

Comment 3 Jiri Pechanec 2013-08-13 04:34:44 UTC
I am afraid we cannot close the bug without further discussion - maybe on PM meeting.

IF RTGov is not interested in failed transactions how administrator could be informed that something is wrong? I can envision to have an active collection that emits JMX notifications that are converted to SNMP traps that goes to a central monitoring console.

Comment 4 Gary Brown 2013-08-13 07:58:22 UTC
Have been thinking further about this, and agree it would be useful to know. The only situation where we wouldn't know is if xa transaction is used - and in that case I think it is valid for no activity to be reported, as it is as if the transaction had not occurred.

Therefore the issue is how to capture a failed business transaction. I think the only way this can be achieved is if switchyard reports an ExchangeFailedEvent (or equivalent) event to indicate that the exchange terminated badly.

Once this is done, RTGov switchyard integration can be enhanced to use this event to close off the correlation with the matching request.

Can you create a bz for switchyard to create this event and make this issue dependent upon it?

Comment 5 Gary Brown 2013-08-14 16:47:42 UTC
Investigated further, and the exception is carried in the response exchange, but the problem is there is no 'replyTo' message information to correlate it back to the request.

Comment 6 JBoss JIRA Server 2013-08-16 14:35:27 UTC
Gary Brown <gary> updated the status of jira RTGOV-253 to Resolved

Comment 7 Jiri Pechanec 2013-09-16 10:53:26 UTC
Verified in ER2

Comment 11 JBoss JIRA Server 2014-07-02 09:19:40 UTC
Gary Brown <gary> updated the status of jira RTGOV-253 to Closed