[jboss-jira] [JBoss JIRA] Closed: (JBCLUSTER-244) JBossCacheManager obtains Cache reference prematurely
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Wed Dec 23 16:47:30 EST 2009
[ https://jira.jboss.org/jira/browse/JBCLUSTER-244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry closed JBCLUSTER-244.
--------------------------------------
Resolution: Done
> JBossCacheManager obtains Cache reference prematurely
> -----------------------------------------------------
>
> Key: JBCLUSTER-244
> URL: https://jira.jboss.org/jira/browse/JBCLUSTER-244
> Project: JBoss Clustering
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: HA-Server-Cache-JBC
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Fix For: HA-Server-Cache-JBC 2.1.1.GA
>
>
> JBossCacheManager ends up acquiring a reference to the JBC cache during it's init method. This is done to allow throwing of ClusteringNotSupportedException by that method, allowing the behavior whereby a the deployment of a <distributable/> webapp in the default config can detect the absence of clustering classes and fall back on the non-clustered StandardManager.
> The problem here is JBossContextConfig can end up creating > 1 JBossCacheManager instance and calling init on it. (Need to investigate if that can be avoided.) If a 2nd instance is created, stop is not called on the first (since it's never been started). But the cache has been obtained from the CacheManager, increasing the reference count for the cache. Effect is the cache never gets fully released.
> This is the cause of recent failures in trunk of (AttributeBased)SessionPassivationUnitTestCase.
> We don't need to actually obtain the cache reference in init() to detect whether needed classes are available. Just a ref to the CacheManager is sufficient. Defer obtaining the cache reference until start().
> This problem doesn't affect any released code; it's an effect of the work on JBAS-7473.
--
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
More information about the jboss-jira
mailing list