[
https://jira.jboss.org/jira/browse/EJBTHREE-1840?page=com.atlassian.jira....
]
jaikiran pai resolved EJBTHREE-1840.
------------------------------------
Resolution: Done
Component Fix Version(s): jboss-ejb3-core:1.1.7
StrictMaxPool has been fixed to avoid decrementing the inUse counter multiple times for
the same context
StrictMaxPool does not maintain a correct "inUse" count
leading to incorrect reporting of "AvailableCount"
----------------------------------------------------------------------------------------------------------
Key: EJBTHREE-1840
URL:
https://jira.jboss.org/jira/browse/EJBTHREE-1840
Project: EJB 3.0
Issue Type: Bug
Components: core
Affects Versions: 1.1.6
Reporter: jaikiran pai
Assignee: jaikiran pai
Fix For: 1.1.7
The org.jboss.ejb3.test.stateless.unit.MetricsUnitTestCase shows a failure w.r.t the
"AvailableCount" of a bean marked with StrictMaxPool.
The StrictMaxPool internally implements the getAvailableCount() as follows:
public int getAvailableCount()
{
return maxSize - inUse;
}
The "inUse" count is handled incorrectly in the discard and remove method of
this pool leading to that count reaching a negative value. Ultimately, this leads to
incorrect available count being reported.
When an exception occurs, the bean is discarded from the pool. This leads to a call on
discard method of the StrictMaxPool which decrements the inUse count and then calls the
remove method which *again* decrements the inUse count for the same bean context.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira