jakartaee / jakartaee/messaging
Allow stop and close to be called from a message listener
- Dominant language
- Java
- Stars
- 49
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
In JMS 2.0, an application which calls JMSContext stop, JMSContext close , Connection stop, Connection close or Session close from a message listener on its own JMSContext, Connection or Session is required to throw a javax.jms.IllegalStateException.
#158 proposes a JMS 2.0 errata which would make it optional for JMS vendors to throw an exception and allow these methods to return normally instead. (See that issue for details).
However that would mean that applications which relied on being able to call these methods from a message listener would not be portable.
Assuming #158 is accepted, it is proposed that in a later version of JMS the required behaviour for these methods be changed to make it match the new behaviour of MessageListener close. The option of throwing an exception would be removed and these methods would be required to return normally.
Such no working application would be dependent on an exception being thrown, such a change would not be incompatible, whilst those applications which rely on being able to call these methods from a message listener would then become portable.
#### Affected Versions
[2.0]
Contributor guide
Research direction
Start by reviewing issue #158 and the JMS 2.0 rules described here for JMSContext, Connection, Session, and MessageListener. Determine how a later JMS specification should define stop and close calls from a message listener, and document the required behavior and compatibility impact. Done means the proposal is resolved as a clear specification change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100