[JMS_SPEC-2] Fix JavaDocs to reflect missing IllegalStateException from API methods Created: 11/Apr/11 Updated: 20/Mar/13
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
The JavaDocs for the following methods below need to be updated to reflect that IllegalStateException can be thrown. In particular IllegalStateException is being thrown in the case of these methods being called on closed connection objects. There could be more methods than those listed below.
Tests for IllegalStateException
The JavaDocs should be updated for all of the above method calls to specify that an IllegalStateException can be thrown on closed connection objects. Currently it doesn't. Only the JMS spec specifies that IllegalStateException must be thrown. The JavaDoc should be in sync with the spec and should mention it as well.
The JMS spec references for this is in the following sections:
The CTS JMS test directories which are testing for IllegalStateException to be thrown on closed QueueConnection, closed QueueReciever, closed QueueSender, etc. objects are listed below:
|Comment by Nigel Deakin [ 15/Apr/11 ]|
Added formatting to description.
|Comment by Nigel Deakin [ 28/Feb/12 ]|
In the JMS 1.1 spec, section 4.3.5 "Closing a Connection" states that
In addition, JMS 1.1 section 4.4.1 "Closing a Session" states that
(The corresponding sections in the JMS 2.0 spec are 6.1.8. "Closing a connection" and 6.2.16. "Closing a session")
Furthermore, JMS 1.1 section 11.2.21 "JMS Source Java API documentation Clarifications" states:
The text about "attempting to call any method on a closed consumer or producer" causing an IllegalStateException doesn't seem to have made it into the body of the JMS 1.1 spec, and so at the time of writing there is no mention in the JMS 2.0 spec. This needs to be corrected.
In addition, the javadoc for all methods except close on a connection, session, producer or consumer should be updated to mention that an IllegalStateException may be thrown if the connection, session, consumer or producer is closed.
|Comment by Nigel Deakin [ 20/Mar/13 ]|
This didn't make it into JMS 2.0 and so is carried forward to JMS 2.1.