Bug 768374 - TCK: com.sun.ts.tests.jms.ee.all.closedQueueConnection.ClosedQueueConnectionTests.closedQueueConnectionCommitTest fails due to incorrect exception
Summary: TCK: com.sun.ts.tests.jms.ee.all.closedQueueConnection.ClosedQueueConnectionT...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-jca
Version: Development
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 2.1.2
: ---
Assignee: Weston M. Price
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-16 13:30 UTC by Jiri Pechanec
Modified: 2016-02-22 00:59 UTC (History)
4 users (show)

Fixed In Version: qpid-jca-0.14-6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)
Patch for incorrect exception being thrown for call to commit() on a closed connection (2.13 KB, patch)
2011-12-20 23:34 UTC, Weston M. Price
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-3700 0 None None None Never

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


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