Bug 768374

Summary: TCK: com.sun.ts.tests.jms.ee.all.closedQueueConnection.ClosedQueueConnectionTests.closedQueueConnectionCommitTest fails due to incorrect exception
Product: Red Hat Enterprise MRG Reporter: Jiri Pechanec <jpechane>
Component: qpid-jcaAssignee: Weston M. Price <wprice>
Status: CLOSED CURRENTRELEASE QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DevelopmentCC: cdewolf, iboverma, jross, tross
Target Milestone: 2.1.2   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-jca-0.14-6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Patch for incorrect exception being thrown for call to commit() on a closed connection none

Description Jiri Pechanec 2011-12-16 13:30:18 UTC
Commit on close connection throws JMSException but IllegalStateException is expected.
The same issue is with com.sun.ts.tests.jms.ee.all.closedTopicConnection.ClosedTopicConnectionTests.closedTopicConnectionCommitTest

Comment 1 Weston M. Price 2011-12-20 19:26:32 UTC
Tracking from upstream:

https://issues.apache.org/jira/browse/QPID-3700

Comment 2 Weston M. Price 2011-12-20 23:33:09 UTC
Just a bit of research for clarity. The relevant portion of the JMS spec to which this issues applies is Section 4.3.5

'Once a connection has been closed, an attempt to use it or its sessions or their message consumers and producers must throw an IllegalStateException (calls to the close method of these objects must be ignored). It is valid to continue to use message objects created or received via the connection, with the exception of a received message’s acknowledge method.'

I am also attaching the patch that I provided upstream just as a backup.

Comment 3 Weston M. Price 2011-12-20 23:34:11 UTC
Created attachment 548955 [details]
Patch for incorrect exception being thrown for call to commit() on a closed connection

Comment 4 Weston M. Price 2012-01-11 08:06:27 UTC
For clarification the required exception is a javax.jms.IllegalStateException, not a java.lang.IllegalStateException.

Comment 5 Jiri Pechanec 2012-01-17 11:56:26 UTC
The issue is still present in 0.14-4

Comment 6 Weston M. Price 2012-01-17 14:15:02 UTC
Can you provide the logs from the TCK? We don't throw anything but a javax.jms.IllegalStatException now so I need to see what the TCK actually thinks we are throwing.

Comment 7 Weston M. Price 2012-01-17 16:40:41 UTC
Looking at the code, this has already been fixed in the JMS client. However we will require patch

https://issues.apache.org/jira/browse/QPID-3716