Uploaded image for project: 'JBoss Clustering'
  1. JBoss Clustering
  2. JBCLUSTER-249

CacheManager destroys caches when it stops

    Details

      Description

      CacheManager.stop() destroys all running caches. This is incorrect; since it didn't create them in start(). It should just call releaseCache for all eager-start caches to reduce the ref count. Then make the releaseCache method usable after stop() so if anyone has a ref to the CacheManager they can still release the cache.

      This is essentially a workaround-type solution for JBAS-7228 and JBAS-7229. The correct solution for those is to have services using the CacheManager depend on it, so they stop first. But the MC may not be aware of everything using CacheManager (e.g. a Hibernate SessionFactory created by a ServletContextListener) so it can't always enforce dependencies. And, the ^^^ behavior of stop only undoing what start did is correct anyway.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brian.stansberry Brian Stansberry
                  Reporter:
                  brian.stansberry Brian Stansberry
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: