[jboss-cvs] JBossCache/src/org/jboss/cache/factories ...
Manik Surtani
msurtani at jboss.com
Thu Nov 2 10:34:06 EST 2006
User: msurtani
Date: 06/11/02 10:34:06
Modified: src/org/jboss/cache/factories Tag: Branch_JBossCache_1_4_0
InterceptorChainFactory.java
Log:
JBCACHE-814
Revision Changes Path
No revision
No revision
1.18.2.3 +26 -66 JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InterceptorChainFactory.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/factories/InterceptorChainFactory.java,v
retrieving revision 1.18.2.2
retrieving revision 1.18.2.3
diff -u -b -r1.18.2.2 -r1.18.2.3
--- InterceptorChainFactory.java 8 Aug 2006 15:50:49 -0000 1.18.2.2
+++ InterceptorChainFactory.java 2 Nov 2006 15:34:06 -0000 1.18.2.3
@@ -74,54 +74,7 @@
return cl.loadClass(classname);
}
- /**
- * Assembles the interceptor stack. Presence and order of interceptors is determined by looking at
- * the cache configuration. In the future, this will be accessible through XML. See refactoring.txt for
- * details. An alternative might be to use a simple rools engine to assemble the stack.
- * Creates either:
- * <pre>
- * <p/>
- * CallInterceptor
- * [EvictionInterceptor]
- * PessimisticLockInterceptor
- * [CacheLoaderInterceptor]
- * [ReplicationInterceptor]
- * [CacheStoreInterceptor]
- * <p/>
- * or
- * <p/>
- * CallInterceptor
- * [EvictionInterceptor]
- * PessimisticLockInterceptor
- * [CacheStoreInterceptor]
- * [CacheLoaderInterceptor]
- * [ReplicationInterceptor]
- * <p/>
- * </pre>
- * <p/>
- * If cache passivation is turned on the interceptor stack will be assembled as follow:
- * <pre>
- * <p/>
- * CallInterceptor
- * [EvictionInterceptor]
- * PessimisticLockInterceptor
- * [ActivationInterceptor]
- * [ReplicationInterceptor]
- * [PassivationInterceptor]
- * <p/>
- * or
- * <p/>
- * CallInterceptor
- * [EvictionInterceptor]
- * PessimisticLockInterceptor
- * [PassivationInterceptor]
- * [ActivationInterceptor]
- * [ReplicationInterceptor]
- * <p/>
- * </pre>
- * <p/>
- * CallInterceptor is always present at the top, the others may or may not be present
- */
+
private Interceptor createPessimisticInterceptorChain(TreeCache cache) throws IllegalAccessException, InstantiationException, ClassNotFoundException
{
Interceptor call_interceptor = null;
@@ -142,7 +95,8 @@
call_interceptor = createInterceptor("org.jboss.cache.interceptors.CallInterceptor", cache);
// if (cache.getBuddyManager() != null && cache.getBuddyManager().isEnableDataGravitation()) dataGravitatorInterceptor = createInterceptor("org.jboss.cache.interceptors.DataGravitatorInterceptor", cache);
- if (cache.getBuddyManager() != null) dataGravitatorInterceptor = createInterceptor("org.jboss.cache.interceptors.DataGravitatorInterceptor", cache);
+ if (cache.getBuddyManager() != null)
+ dataGravitatorInterceptor = createInterceptor("org.jboss.cache.interceptors.DataGravitatorInterceptor", cache);
lock_interceptor = createInterceptor("org.jboss.cache.interceptors.PessimisticLockInterceptor", cache);
@@ -201,6 +155,11 @@
else
addInterceptor(first, txInterceptor);
+ if (first == null)
+ first = lock_interceptor;
+ else
+ addInterceptor(first, lock_interceptor);
+
// create the stack from the bottom up
if (activation_interceptor != null)
{
@@ -295,10 +254,10 @@
//else
// addInterceptor(first, create_if_not_exists_interceptor);
- if (first == null)
- first = lock_interceptor;
- else
- addInterceptor(first, lock_interceptor);
+// if (first == null)
+// first = lock_interceptor;
+// else
+// addInterceptor(first, lock_interceptor);
if (cache.isUsingEviction())
{
@@ -346,7 +305,8 @@
txInterceptor = createInterceptor("org.jboss.cache.interceptors.TxInterceptor", cache);
// if (cache.getBuddyManager() != null && cache.getBuddyManager().isEnableDataGravitation()) dataGravitatorInterceptor = createInterceptor("org.jboss.cache.interceptors.DataGravitatorInterceptor", cache);
- if (cache.getBuddyManager() != null) dataGravitatorInterceptor = createInterceptor("org.jboss.cache.interceptors.DataGravitatorInterceptor", cache);
+ if (cache.getBuddyManager() != null)
+ dataGravitatorInterceptor = createInterceptor("org.jboss.cache.interceptors.DataGravitatorInterceptor", cache);
switch (cache.getCacheModeInternal())
{
More information about the jboss-cvs-commits
mailing list