eclipse-ee4j / eclipse-ee4j/genericmessagingra

WorkImpl may leak an InboundJmsResource

Open
#58 5 comments 0 reactions 1 assignee Claimed by @glassfishrobot View on GitHub
Component: core Priority: Minor Type: Bug
Dominant language
Java
Stars
2
Forks
5
PR merge metrics
No merged PRs in 30d

Description

This is a companion to #57 and was found by code inspection whilst investigating the former issue.

com.sun.genericra.inbound.async.WorkImpl.run() contains a code path which neglects to release the ServerSession (= InboundJmsResource) instance back to its pool, viz. when an exception is thrown whilst releasing the message endpoint. This would result in leaking one resource from the pool, leaving it unusable until the application server is restarted. If the MaxPoolSize is 1, or otherwise if enough resources have been leaked in this way, messages from the queue associated with this pool would no longer be processed.

I have never actually seen this happen, and it is unlikely to go unnoticed when it happens, since said exception would be logged at level SEVERE. But it is easy to fix.
#### Environment
GlassFish (2.1.1 or 3.1.2), Linux (SLES10SP2, SLES11SP2), x86_64
#### Affected Versions
[0.9, 1.0a, 1.0, v1.5, 1.5, v1.6, 1.6, 2.1a, 2.1b, current, 2.2a]

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.