[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
manik at jboss.org
Tue May 22 12:12:14 EDT 2007
User: msurtani
Date: 07/05/22 12:12:14
Modified: src/org/jboss/cache CacheImpl.java
Log:
lifecycle stuff
Revision Changes Path
1.68 +22 -20 JBossCache/src/org/jboss/cache/CacheImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheImpl.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheImpl.java,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- CacheImpl.java 22 May 2007 14:11:47 -0000 1.67
+++ CacheImpl.java 22 May 2007 16:12:14 -0000 1.68
@@ -571,6 +571,26 @@
if (root == null || !root.getClass().equals(tempRoot.getClass()))
root = tempRoot;
+ if (configuration.getCacheLoaderConfig() != null && cacheLoaderManager == null)
+ {
+ initialiseCacheLoaderManager();
+ }
+ // first set up the Buddy Manager
+ if (configuration.getCacheMode() != Configuration.CacheMode.LOCAL)
+ {
+ setBuddyReplicationConfig(configuration.getBuddyReplicationConfig());
+ }
+ // build interceptor chain
+ try
+ {
+ interceptor_chain = InterceptorChainFactory.getInstance().buildInterceptorChain(this);
+ }
+ catch (Exception e)
+ {
+ throw new CacheException("Unable to build interceptor chain", e);
+ }
+
+
setUseReplQueue(configuration.isUseReplQueue());
setIsolationLevel(configuration.getIsolationLevel());
@@ -652,31 +672,12 @@
// cache loaders should be initialised *before* any state transfers take place to prevent
// exceptions involving cache loaders not being started. - Manik
// create cache loader
- if (configuration.getCacheLoaderConfig() != null && cacheLoaderManager == null)
- {
- initialiseCacheLoaderManager();
- }
if (cacheLoaderManager != null)
{
cacheLoaderManager.startCacheLoader();
}
-
- // first set up the Buddy Manager
- if (configuration.getCacheMode() != Configuration.CacheMode.LOCAL)
- {
- setBuddyReplicationConfig(configuration.getBuddyReplicationConfig());
- }
-
// now that we have a TM we can init the interceptor chain
- // build interceptor chain
- try
- {
- interceptor_chain = InterceptorChainFactory.getInstance().buildInterceptorChain(this);
- }
- catch (Exception e)
- {
- throw new CacheException("Unable to build interceptor chain", e);
- }
+ InterceptorChainFactory.getInstance().initialiseInterceptors(interceptor_chain, this);
switch (configuration.getCacheMode())
{
@@ -769,6 +770,7 @@
*/
public void destroy()
{
+ if (started) stop();
createCalled = false;
regionManager = null;
notifier = null;
More information about the jboss-cvs-commits
mailing list