[
https://jira.jboss.org/jira/browse/EJBTHREE-1703?page=com.atlassian.jira....
]
Carlo de Wolf resolved EJBTHREE-1703.
-------------------------------------
Fix Version/s: 1.1.11
Resolution: Done
I've changed maxSize to dynamically adjust according to the number of threads using
the ThreadlocalPool. Note that a reentrance means an extra addition to maxSize for the
duration of the call. Or in other words: maxSize = createCount - removeCount.
This means that the equation: inUse = maxSize - availableCount will be valid from now on.
Initially maxSize and availableCount are 0 until the first call reaches the SLSB. Then
maxSize becomes 1. AvailableCount will become 1 after the call finishes. Off course both
values are bogus in relation to the ThreadlocalPool, because in actuality it can create an
infinite amount of instances to service reentrant calls and other threads.
Again the real maximum size of the ThreadlocalPool is governed by the amount of threads
calling upon the SLSB. If this is an unreasonable large number or the calls are coming
from a thread factory instead of a thread pool, then StrictMaxPool must be used instead.
SLSB pooling statistics misleading when using ThreadLocalPool
-------------------------------------------------------------
Key: EJBTHREE-1703
URL:
https://jira.jboss.org/jira/browse/EJBTHREE-1703
Project: EJB 3.0
Issue Type: Bug
Components: pool
Affects Versions: AS 4.2.3.GA, 1.0.0-GA
Reporter: Galder Zamarreno
Assignee: Carlo de Wolf
Priority: Critical
Fix For: 1.1.11
SLSB pooling statistics are hugely misleading when using default ThreadLocalPool:
"The default pooling strategy used by EJB3 SLSBs is a ThreadLocalPool whose maximum
is not really
quantifiable. The maximum is the maximum number of concurrent threads talking to that
EJB3 SLSB
that the system can allocate. So, the MaxSize that you see in that JMX view is bogus at
least for its
current definition of maximum.
MaxSize - AvailableCount will give you the number of EJB3 SLSBs currently in use, in your
case, 0. Again,
the meaning of AvailableCount for this pool strategy is not precise.
CreateCount does represent the number of EJB3 SLSBs that have been created.
CurrentSize is a bit more complicated to explain. For each thread that uses an EJB3
SLSBs, thread local
pool maintains a pool per each thread where there's an instance active in case
it's needed again. So,
CurrentSize indicates how many of these active instances there are, which assuming that
each thread
uses only one instance of the bean, matches the number of instances that have been
created."
Example:
AvailableCount int R 30 MBean Attribute.
MaxSize int R 30 MBean Attribute.
StateString java.lang.String R Started MBean Attribute.
State int R 3 MBean Attribute.
CurrentSize int R 165 MBean Attribute.
CreateCount int R 165 MBean Attribute.
RemoveCount int R 0 MBean Attribute.
--
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