Skip to content

CachingConnectionFactory does not rollback on Session.close() [SPR-5031] #9706

Closed
@spring-projects-issues

Description

@spring-projects-issues

Joel Caplin opened SPR-5031 and commented

The JMS spec states that: "Closing a transacted session must roll back the transaction in progress": http://java.sun.com/javaee/5/docs/api/javax/jms/Session.html#close().

The CachingConnectionFactory does not appear to adhere to this rule. When a locally-transaction Session object is created using the cached Connection, calls to close() do not result in rollback() being called. Test case attached.

At runtime this can cause unexpected behavior. For example: I use a cached session and close it out, expecting an implicit rollback; a few seconds later, unbeknowst to me, I'm using the same cached session again, except I commit this time. The first implied rollback never happens so everything that took part in the first 'session' is actually commited.


Affects: 2.5.5

Attachments:

Issue Links:

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions