jakartaee / jakartaee/messaging
Session.commit() etc should require TransactionInProgressException to be thrown if called in a JTA transaction
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 49
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
The JMS 1.1 javadoc for TransactionInProgressException
http://docs.oracle.com/javaee/6/api/javax/jms/TransactionInProgressException.html
states:
This exception is thrown when an operation is invalid because a transaction is in progress. For instance, an attempt to call Session.commit when a session is part of a distributed transaction should throw a TransactionInProgressException.
However the javadoc for Session.commit does not list this as a mandatory exception.
http://docs.oracle.com/javaee/6/api/javax/jms/Session.html#commit%28%29
This is inconsistent.
It is hereby proposed that the definition of Session.commit and Session.rollback should be modified to require a TransactionInProgressException to be thrown when the session is in a JTA transaction.
Note that the corresponding methods on XASession already require these exceptions.
(and inconsistent with XASession.commit.
Affected Versions
[1.1]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Session.commit() and Session.rollback() API definitions and compare their exception requirements with the corresponding XASession methods. Review the JMS TransactionInProgressException documentation and the JTA transaction context described in the issue. Done means the affected method definitions consistently require this exception when called during a JTA transaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100