[jboss-cvs] JBossCache/src/org/jboss/cache/aop ...
Manik Surtani
msurtani at jboss.com
Thu Oct 12 19:03:59 EDT 2006
User: msurtani
Date: 06/10/12 19:03:59
Modified: src/org/jboss/cache/aop TreeCacheAopDelegate.java
PojoCache.java
Removed: src/org/jboss/cache/aop PojoCacheMBean.java
TreeCacheAopMBean.java
Log:
a LOT of changes around Regions, in an attempt to unify eviction and marshalling regions
Revision Changes Path
1.79 +1 -1 JBossCache/src/org/jboss/cache/aop/TreeCacheAopDelegate.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCacheAopDelegate.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/TreeCacheAopDelegate.java,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- TreeCacheAopDelegate.java 10 Sep 2006 15:28:16 -0000 1.78
+++ TreeCacheAopDelegate.java 12 Oct 2006 23:03:59 -0000 1.79
@@ -87,7 +87,7 @@
{
if (cache_.getRegionManager() != null)
{
- cache_.getRegionManager().setUnmarshallingClassLoader(fqn);
+ cache_.getRegionManager().setContextClassLoaderAsCurrent(fqn);
}
return _getObjectInternal(fqn);
}
1.30 +8 -7 JBossCache/src/org/jboss/cache/aop/PojoCache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PojoCache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/PojoCache.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- PojoCache.java 6 Sep 2006 15:30:54 -0000 1.29
+++ PojoCache.java 12 Oct 2006 23:03:59 -0000 1.30
@@ -10,13 +10,13 @@
import org.jboss.cache.CacheException;
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeImpl;
+import org.jboss.cache.Region;
import org.jboss.cache.RegionNotEmptyException;
import org.jboss.cache.TreeCache;
import org.jboss.cache.aop.eviction.AopEvictionPolicy;
import org.jboss.cache.aop.statetransfer.PojoStateTransferManager;
import org.jboss.cache.lock.UpgradeException;
import org.jboss.cache.marshall.ObjectSerializationFactory;
-import org.jboss.cache.marshall.Region;
import org.jboss.cache.marshall.RegionNameConflictException;
import org.jboss.cache.transaction.BatchModeTransactionManager;
import org.jboss.cache.xml.XmlHelper;
@@ -57,7 +57,7 @@
Element config_ = null;
protected final String LOCK = "_lock_";
protected final int RETRY = 5; // retry times for lockPojo just in case there is upgrade exception during concurrent access.
-// boolean detachPojoWhenEvicted_ = false;
+ // boolean detachPojoWhenEvicted_ = false;
protected boolean marshallNonSerializable_ = false;
protected ThreadLocal undoListLocal_ = new ThreadLocal();
protected ThreadLocal hasSynchronizationHandler_ = new ThreadLocal();
@@ -127,7 +127,7 @@
try
{
Object obj = loadClass(eviction_policy_class).newInstance();
- if (! (obj instanceof AopEvictionPolicy))
+ if (!(obj instanceof AopEvictionPolicy))
throw new RuntimeException("PojoCache.setEvictionPolicyClass(). Eviction policy provider:" +
eviction_policy_class + " is not an instance of AopEvictionPolicy.");
getConfiguration().setEvictionPolicyClass(eviction_policy_class);
@@ -280,9 +280,10 @@
else
{
// If the internal region is not activated yet, activate it first
- Region region = regionManager_.getRegion(InternalDelegate.JBOSS_INTERNAL);
+ //MarshRegion region = regionManager_.getRegion(InternalDelegate.JBOSS_INTERNAL);
+ Region region = getCacheSPI().getRegion(InternalDelegate.JBOSS_INTERNAL, false);
if ((region == null && getConfiguration().isInactiveOnStartup())
- || (region != null && region.isInactive()))
+ || (region != null && !region.isActive()))
{
super.activateRegion(InternalDelegate.JBOSS_INTERNAL.toString());
}
@@ -395,7 +396,7 @@
if (!(e instanceof CacheException))
throw new RuntimeException("PojoCache.putObject(): fqn: " + fqn, e);
else
- throw (CacheException) e;
+ throw(CacheException) e;
}
finally
{
@@ -462,7 +463,7 @@
if (!(e instanceof CacheException))
throw new RuntimeException("PojoCache.removeObject(): fqn: " + fqn, e);
else
- throw (CacheException) e;
+ throw(CacheException) e;
}
finally
{
More information about the jboss-cvs-commits
mailing list