Author: manik.surtani(a)jboss.com
Date: 2008-06-26 13:40:47 -0400 (Thu, 26 Jun 2008)
New Revision: 6067
Modified:
core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
core/trunk/src/main/java/org/jboss/cache/factories/LockManagerFactory.java
core/trunk/src/main/java/org/jboss/cache/factories/context/ContextMetaFactory.java
core/trunk/src/main/java/org/jboss/cache/factories/context/OptimisticContextFactory.java
core/trunk/src/main/java/org/jboss/cache/factories/context/PessimisticContextFactory.java
core/trunk/src/main/java/org/jboss/cache/invocation/InvocationContextContainer.java
core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java
Log:
Make sure the right factory is used
Modified: core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2008-06-26
17:32:25 UTC (rev 6066)
+++ core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2008-06-26
17:40:47 UTC (rev 6067)
@@ -531,7 +531,7 @@
}
}
- if (trace) log.trace("Reset volatile components");
+ if (trace) log.trace("Reset volatile components. Registry now contains "
+ componentLookup.keySet());
}
// ------------------------------ START: Publicly available lifecycle methods
-----------------------------
Modified: core/trunk/src/main/java/org/jboss/cache/factories/LockManagerFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/LockManagerFactory.java 2008-06-26
17:32:25 UTC (rev 6066)
+++ core/trunk/src/main/java/org/jboss/cache/factories/LockManagerFactory.java 2008-06-26
17:40:47 UTC (rev 6067)
@@ -19,6 +19,7 @@
@SuppressWarnings({"unchecked", "deprecation"})
protected <T> T construct(Class<T> componentType)
{
+ if (log.isTraceEnabled()) log.trace("Cache configuration is " +
configuration.getNodeLockingScheme());
switch (configuration.getNodeLockingScheme())
{
case MVCC:
Modified:
core/trunk/src/main/java/org/jboss/cache/factories/context/ContextMetaFactory.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/factories/context/ContextMetaFactory.java 2008-06-26
17:32:25 UTC (rev 6066)
+++
core/trunk/src/main/java/org/jboss/cache/factories/context/ContextMetaFactory.java 2008-06-26
17:40:47 UTC (rev 6067)
@@ -16,13 +16,17 @@
@SuppressWarnings("unchecked")
protected <T> T construct(Class<T> componentType)
{
+ if (log.isTraceEnabled()) log.trace("Cache configuration is " +
configuration.getNodeLockingScheme());
switch (configuration.getNodeLockingScheme())
{
case MVCC:
+ if (log.isTraceEnabled()) log.trace("Creating an MVCC context
factory");
return (T) new MVCCContextFactory();
case OPTIMISTIC:
+ if (log.isTraceEnabled()) log.trace("Creating an optimistic context
factory");
return (T) new OptimisticContextFactory();
case PESSIMISTIC:
+ if (log.isTraceEnabled()) log.trace("Creating a pessimistic context
factory");
return (T) new PessimisticContextFactory();
}
throw new ConfigurationException("Unknown configuration node locking
scheme");
Modified:
core/trunk/src/main/java/org/jboss/cache/factories/context/OptimisticContextFactory.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/factories/context/OptimisticContextFactory.java 2008-06-26
17:32:25 UTC (rev 6066)
+++
core/trunk/src/main/java/org/jboss/cache/factories/context/OptimisticContextFactory.java 2008-06-26
17:40:47 UTC (rev 6067)
@@ -1,6 +1,5 @@
package org.jboss.cache.factories.context;
-import org.jboss.cache.factories.annotations.NonVolatile;
import org.jboss.cache.transaction.OptimisticTransactionContext;
import org.jboss.cache.transaction.TransactionContext;
@@ -14,7 +13,6 @@
* @author Manik Surtani (<a
href="mailto:manik@jboss.org">manik@jboss.org</a>)
* @since 3.0
*/
-@NonVolatile
public class OptimisticContextFactory extends PessimisticContextFactory
{
@Override
Modified:
core/trunk/src/main/java/org/jboss/cache/factories/context/PessimisticContextFactory.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/factories/context/PessimisticContextFactory.java 2008-06-26
17:32:25 UTC (rev 6066)
+++
core/trunk/src/main/java/org/jboss/cache/factories/context/PessimisticContextFactory.java 2008-06-26
17:40:47 UTC (rev 6067)
@@ -2,7 +2,6 @@
import org.jboss.cache.DataContainer;
import org.jboss.cache.factories.annotations.Inject;
-import org.jboss.cache.factories.annotations.NonVolatile;
import org.jboss.cache.invocation.InvocationContext;
import org.jboss.cache.invocation.LegacyInvocationContext;
import org.jboss.cache.transaction.PessimisticTransactionContext;
@@ -18,7 +17,6 @@
* @author Manik Surtani (<a
href="mailto:manik@jboss.org">manik@jboss.org</a>)
* @since 3.0
*/
-@NonVolatile
public class PessimisticContextFactory implements ContextFactory
{
DataContainer container;
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/InvocationContextContainer.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/invocation/InvocationContextContainer.java 2008-06-26
17:32:25 UTC (rev 6066)
+++
core/trunk/src/main/java/org/jboss/cache/invocation/InvocationContextContainer.java 2008-06-26
17:40:47 UTC (rev 6067)
@@ -1,6 +1,7 @@
package org.jboss.cache.invocation;
import org.jboss.cache.factories.annotations.Inject;
+import org.jboss.cache.factories.annotations.NonVolatile;
import org.jboss.cache.factories.context.ContextFactory;
/**
@@ -9,6 +10,7 @@
* @author Manik Surtani (<a
href="mailto:manik@jboss.org">manik@jboss.org</a>)
* @since 2.1.0
*/
+@NonVolatile
public class InvocationContextContainer extends ThreadLocal<InvocationContext>
{
ContextFactory contextFactory;
Modified: core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java 2008-06-26
17:32:25 UTC (rev 6066)
+++ core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java 2008-06-26
17:40:47 UTC (rev 6067)
@@ -11,6 +11,7 @@
import org.jboss.cache.CacheException;
import org.jboss.cache.RPCManager;
import org.jboss.cache.factories.annotations.Inject;
+import org.jboss.cache.factories.annotations.NonVolatile;
import org.jboss.cache.factories.context.ContextFactory;
import org.jboss.cache.invocation.InvocationContext;
import org.jgroups.Address;
@@ -29,6 +30,7 @@
* @author <a href="mailto:bela@jboss.org">Bela Ban</a> Apr 14,
2003
* @version $Revision$
*/
+@NonVolatile
public class TransactionTable
{
private static final Log log = LogFactory.getLog(TransactionTable.class);
Show replies by date