[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Thu Sep 7 09:52:28 EDT 2006
User: msurtani
Date: 06/09/07 09:52:28
Modified: src/org/jboss/cache/interceptors
ActivationInterceptor.java
CacheLoaderInterceptor.java
InvocationContextInterceptor.java
OptimisticValidatorInterceptor.java
Log:
cleaned up jmx interfaces, fixed tx and gtx allocation problems
Revision Changes Path
1.36 +1 -1 JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ActivationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- ActivationInterceptor.java 5 Sep 2006 18:09:56 -0000 1.35
+++ ActivationInterceptor.java 7 Sep 2006 13:52:28 -0000 1.36
@@ -27,7 +27,7 @@
* their attributes have been initialized and their children have been loaded in memory.
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: ActivationInterceptor.java,v 1.35 2006/09/05 18:09:56 msurtani Exp $
+ * @version $Id: ActivationInterceptor.java,v 1.36 2006/09/07 13:52:28 msurtani Exp $
*/
public class ActivationInterceptor extends CacheLoaderInterceptor implements ActivationInterceptorMBean
{
1.54 +1 -1 JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- CacheLoaderInterceptor.java 6 Sep 2006 16:42:58 -0000 1.53
+++ CacheLoaderInterceptor.java 7 Sep 2006 13:52:28 -0000 1.54
@@ -32,7 +32,7 @@
* Loads nodes that don't exist at the time of the call into memory from the CacheLoader
*
* @author Bela Ban
- * @version $Id: CacheLoaderInterceptor.java,v 1.53 2006/09/06 16:42:58 msurtani Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.54 2006/09/07 13:52:28 msurtani Exp $
*/
public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
{
1.4 +9 -2 JBossCache/src/org/jboss/cache/interceptors/InvocationContextInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InvocationContextInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/InvocationContextInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- InvocationContextInterceptor.java 6 Sep 2006 17:58:20 -0000 1.3
+++ InvocationContextInterceptor.java 7 Sep 2006 13:52:28 -0000 1.4
@@ -8,6 +8,7 @@
import org.jboss.cache.GlobalTransaction;
import org.jboss.cache.InvocationContext;
+import org.jboss.cache.TreeCacheProxyImpl;
import org.jboss.cache.config.Option;
import org.jboss.cache.marshall.MethodCall;
import org.jboss.cache.marshall.MethodDeclarations;
@@ -31,7 +32,8 @@
try
{
- setTransactionalContext(getTransaction(), getGlobalTransaction(call));
+ Transaction tx = getTransaction();
+ setTransactionalContext(tx, getGlobalTransaction(tx, call));
if (optionOverride != null && optionOverride.isFailSilently())
{
@@ -77,7 +79,7 @@
}
}
- private GlobalTransaction getGlobalTransaction(MethodCall call)
+ private GlobalTransaction getGlobalTransaction(Transaction tx, MethodCall call)
{
GlobalTransaction gtx = null;
if (MethodDeclarations.isTransactionLifecycleMethod(call.getMethodId()))
@@ -85,6 +87,11 @@
gtx = findGlobalTransaction(call.getArgs());
gtx.setRemote(isRemoteGlobalTx(gtx));
}
+ else
+ {
+ gtx = ((TreeCacheProxyImpl) cache).treeCache.getCurrentTransaction(tx, false);
+ }
+
return gtx;
}
1.34 +1 -1 JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticValidatorInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- OptimisticValidatorInterceptor.java 30 Aug 2006 21:05:16 -0000 1.33
+++ OptimisticValidatorInterceptor.java 7 Sep 2006 13:52:28 -0000 1.34
@@ -93,7 +93,7 @@
Collection nodes = workspace.getNodes().values();
//we have all locks here so lets try and validate
- log.debug("validating nodes");
+ if (log.isDebugEnabled()) log.debug("validating nodes. Num nodes: " + nodes.size());
simpleValidate(nodes);
log.debug("validated nodes");
}
More information about the jboss-cvs-commits
mailing list