[jbosscache-commits] JBoss Cache SVN: r7006 - in core/trunk/src/main/java/org/jboss/cache: cluster and 18 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Oct 23 10:33:36 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-10-23 10:33:36 -0400 (Thu, 23 Oct 2008)
New Revision: 7006

Modified:
   core/trunk/src/main/java/org/jboss/cache/AbstractNodeFactory.java
   core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
   core/trunk/src/main/java/org/jboss/cache/RegionImpl.java
   core/trunk/src/main/java/org/jboss/cache/ReplicationException.java
   core/trunk/src/main/java/org/jboss/cache/cluster/ReplicationQueue.java
   core/trunk/src/main/java/org/jboss/cache/commands/legacy/read/PessGetChildrenNamesCommand.java
   core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
   core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
   core/trunk/src/main/java/org/jboss/cache/config/Configuration.java
   core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java
   core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
   core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java
   core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizeQueue.java
   core/trunk/src/main/java/org/jboss/cache/eviction/LFUQueue.java
   core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java
   core/trunk/src/main/java/org/jboss/cache/eviction/MRUQueue.java
   core/trunk/src/main/java/org/jboss/cache/factories/ComponentFactory.java
   core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/BaseRpcInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/BaseTransactionalContextInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/BatchingInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/InterceptorChain.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyCacheLoaderInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyPassivationInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/base/CommandInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
   core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java
   core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
   core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java
   core/trunk/src/main/java/org/jboss/cache/loader/LocalDelegatingCacheLoaderConfig.java
   core/trunk/src/main/java/org/jboss/cache/loader/SingletonStoreCacheLoader.java
   core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java
   core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader.java
   core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java
   core/trunk/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java
   core/trunk/src/main/java/org/jboss/cache/lock/TimeoutException.java
   core/trunk/src/main/java/org/jboss/cache/remoting/jgroups/ChannelMessageListener.java
   core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferGenerator.java
   core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java
   core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferGenerator.java
   core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferIntegrator.java
   core/trunk/src/main/java/org/jboss/cache/transaction/DummyContext.java
Log:
PMD cleanups

Modified: core/trunk/src/main/java/org/jboss/cache/AbstractNodeFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/AbstractNodeFactory.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/AbstractNodeFactory.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -52,7 +52,7 @@
 
 
    @Inject
-   private void injectComponentRegistry(ComponentRegistry componentRegistry, DataContainer dataContainer)
+   void injectComponentRegistry(ComponentRegistry componentRegistry, DataContainer dataContainer)
    {
       this.componentRegistry = componentRegistry;
       this.dataContainer = dataContainer;

Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -450,10 +450,9 @@
             modeToUse = preferredMode;
          if (trace)
             log.trace("callRemoteMethods(): valid members are " + recipients + " methods: " + command + " Using OOB? " + useOutOfBandMessage);
-         if (channel.flushSupported())
+         if (channel.flushSupported() && !flushBlockGate.await(configuration.getStateRetrievalTimeout(), TimeUnit.MILLISECONDS))
          {
-            if (!flushBlockGate.await(configuration.getStateRetrievalTimeout(), TimeUnit.MILLISECONDS))
-               throw new TimeoutException("State retrieval timed out waiting for flush unblock.");
+            throw new TimeoutException("State retrieval timed out waiting for flush unblock.");
          }
          useOutOfBandMessage = false;
          RspList rsps = rpcDispatcher.invokeRemoteCommands(recipients, command, modeToUse, timeout, isUsingBuddyReplication, useOutOfBandMessage, responseFilter);
@@ -582,10 +581,9 @@
          }
       }
 
-      if (!successfulTransfer)
+      if (!successfulTransfer && log.isDebugEnabled())
       {
-         if (log.isDebugEnabled())
-            log.debug("Node " + getLocalAddress() + " could not fetch partial state " + stateId + " from any member " + targets);
+         log.debug("Node " + getLocalAddress() + " could not fetch partial state " + stateId + " from any member " + targets);
       }
 
    }

Modified: core/trunk/src/main/java/org/jboss/cache/RegionImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RegionImpl.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/RegionImpl.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -241,12 +241,11 @@
       try
       {
          if (evictionEventQueue == null) createQueue();// in case the queue does not exist yet.
-         if (evictionEventQueue.size() > capacityWarnThreshold)
+         if (evictionEventQueue.size() > capacityWarnThreshold && log.isWarnEnabled())
          {
-            if (log.isWarnEnabled())
-               log.warn("putNodeEvent(): eviction node event queue size is at 98% threshold value of capacity: " + evictionRegionConfig.getEventQueueSize() +
-                     " Region: " + fqn +
-                     " You will need to reduce the wakeUpIntervalSeconds parameter.");
+            log.warn("putNodeEvent(): eviction node event queue size is at 98% threshold value of capacity: " + evictionRegionConfig.getEventQueueSize() +
+                  " Region: " + fqn +
+                  " You will need to reduce the wakeUpIntervalSeconds parameter.");
          }
          evictionEventQueue.put(ee);
       }
@@ -268,9 +267,9 @@
          }
          int size = evictionRegionConfig.getEventQueueSize();
          capacityWarnThreshold = (98 * size) / 100 - 100;
-         if (capacityWarnThreshold <= 0)
+         if (capacityWarnThreshold <= 0 && log.isWarnEnabled())
          {
-            if (log.isWarnEnabled()) log.warn("Capacity warn threshold used in eviction is smaller than 1.");
+            log.warn("Capacity warn threshold used in eviction is smaller than 1.");
          }
          evictionEventQueue = new LinkedBlockingQueue<EvictionEvent>(size);
       }

Modified: core/trunk/src/main/java/org/jboss/cache/ReplicationException.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/ReplicationException.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/ReplicationException.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -48,10 +48,4 @@
    {
       super(msg, cause);
    }
-
-   @Override
-   public String toString()
-   {
-      return super.toString();
-   }
 }

Modified: core/trunk/src/main/java/org/jboss/cache/cluster/ReplicationQueue.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/cluster/ReplicationQueue.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/cluster/ReplicationQueue.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -78,7 +78,7 @@
    }
 
    @Inject
-   private void injectDependencies(RPCManager rpcManager, Configuration configuration, CommandsFactory commandsFactory)
+   void injectDependencies(RPCManager rpcManager, Configuration configuration, CommandsFactory commandsFactory)
    {
       this.rpcManager = rpcManager;
       this.configuration = configuration;
@@ -98,28 +98,22 @@
       this.max_elements = configuration.getReplQueueMaxElements();
       // check again
       enabled = configuration.isUseReplQueue() && (configuration.getBuddyReplicationConfig() == null || !configuration.getBuddyReplicationConfig().isEnabled());
-      if (enabled)
+      if (enabled && interval > 0 && scheduledExecutor == null)
       {
-         if (interval > 0)
+         scheduledExecutor = Executors.newSingleThreadScheduledExecutor(new ThreadFactory()
          {
-            if (scheduledExecutor == null)
+            public Thread newThread(Runnable r)
             {
-               scheduledExecutor = Executors.newSingleThreadScheduledExecutor(new ThreadFactory()
-               {
-                  public Thread newThread(Runnable r)
-                  {
-                     return new Thread(r, "ReplicationQueue-periodicProcessor-" + counter.getAndIncrement());
-                  }
-               });
-               scheduledExecutor.scheduleWithFixedDelay(new Runnable()
-               {
-                  public void run()
-                  {
-                     flush();
-                  }
-               }, 500l, interval, TimeUnit.MILLISECONDS);
+               return new Thread(r, "ReplicationQueue-periodicProcessor-" + counter.getAndIncrement());
             }
-         }
+         });
+         scheduledExecutor.scheduleWithFixedDelay(new Runnable()
+         {
+            public void run()
+            {
+               flush();
+            }
+         }, 500l, interval, TimeUnit.MILLISECONDS);
       }
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/commands/legacy/read/PessGetChildrenNamesCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/legacy/read/PessGetChildrenNamesCommand.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/commands/legacy/read/PessGetChildrenNamesCommand.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -63,10 +63,10 @@
       Map<Object, ? extends Node<?, ?>> childrenMap = n.getChildrenMapDirect();
       Collection<NodeSPI<?, ?>> children = (Collection<NodeSPI<?, ?>>) (childrenMap.isEmpty() ? Collections.emptySet() : childrenMap.values());
 
-      return getCorrectedChildNames(children, ctx);
+      return getCorrectedChildNames(children);
    }
 
-   private Set<Object> getCorrectedChildNames(Collection<NodeSPI<?, ?>> children, InvocationContext ctx)
+   private Set<Object> getCorrectedChildNames(Collection<NodeSPI<?, ?>> children)
    {
       // prune deleted children - JBCACHE-1136
       Set<Object> childNames = new HashSet<Object>();

Modified: core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/GetChildrenNamesCommand.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -1,28 +1,26 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.cache.commands.read;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.jboss.cache.Fqn;
 import org.jboss.cache.InternalNode;
 import org.jboss.cache.InvocationContext;
@@ -48,8 +46,6 @@
 public class GetChildrenNamesCommand extends AbstractDataCommand
 {
    public static final int METHOD_ID = 23;
-   private static final Log log = LogFactory.getLog(GetChildrenNamesCommand.class);
-   private static final boolean trace = log.isTraceEnabled();
 
    public GetChildrenNamesCommand()
    {

Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -1,24 +1,24 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.cache.commands.remote;
 
 import org.apache.commons.logging.Log;
@@ -106,21 +106,19 @@
             if (wasNodeRemoved(result))
             {
                // if this is a DIRECT child of a DEAD buddy backup region, then remove the empty dead region structural node.
-               if (buddyFqnTransformer.isDeadBackupFqn(backup) && buddyFqnTransformer.isDeadBackupRoot(backup.getAncestor(backup.size() - 2)))
+               Fqn deadBackupRootFqn = null;
+               if (buddyFqnTransformer.isDeadBackupFqn(backup) && buddyFqnTransformer.isDeadBackupRoot(backup.getAncestor(backup.size() - 2))
+                     && !dataContainer.hasChildren((deadBackupRootFqn = backup.getParent())))
                {
-                  Fqn deadBackupRootFqn = backup.getParent();
+                  if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
+                  executeRemove(gtx, deadBackupRootFqn);
+
+                  // now check the grand parent and see if we are free of versions
+                  deadBackupRootFqn = deadBackupRootFqn.getParent();
                   if (!dataContainer.hasChildren(deadBackupRootFqn))
                   {
                      if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
                      executeRemove(gtx, deadBackupRootFqn);
-
-                     // now check the grand parent and see if we are free of versions
-                     deadBackupRootFqn = deadBackupRootFqn.getParent();
-                     if (!dataContainer.hasChildren(deadBackupRootFqn))
-                     {
-                        if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
-                        executeRemove(gtx, deadBackupRootFqn);
-                     }
                   }
                }
             }

Modified: core/trunk/src/main/java/org/jboss/cache/config/Configuration.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/Configuration.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/config/Configuration.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -227,7 +227,7 @@
    private int serializationExecutorPoolSize = 25;
 
    @Start(priority = 1)
-   private void correctIsolationLevels()
+   void correctIsolationLevels()
    {
       // ensure the correct isolation level upgrades and/or downgrades are performed.
       if (nodeLockingScheme == NodeLockingScheme.MVCC)

Modified: core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/config/ConfigurationComponent.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -147,13 +147,13 @@
    }
 
    @Inject
-   private void injectDependencies(ComponentRegistry cr)
+   void injectDependencies(ComponentRegistry cr)
    {
       this.cr = cr;
    }
 
    @Start
-   private void start()
+   void start()
    {
       setCache(cr.getComponent(CacheSPI.class));
    }

Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -470,14 +470,10 @@
    public static boolean readBooleanAttribute(Element elem, String elementName, String attributeName, boolean defaultValue)
    {
       String val = getAttributeValue(elem, elementName, attributeName);
-      if (val != null)
+      if (val != null &&
+            (val.equalsIgnoreCase("true") || val.equalsIgnoreCase("false")))
       {
-         if (val.equalsIgnoreCase("true") || val.equalsIgnoreCase("false"))
-         {
-            //return Boolean.parseBoolean(val);
-            // needs to be done this way because of JBBUILD-351
             return Boolean.valueOf(val);
-         }
       }
 
       return defaultValue;
@@ -513,7 +509,7 @@
          {
             // this is ok, but certainly log this as a warning
             // this is hugely noisy!
-            //if (log.isWarnEnabled()) log.warn("Unrecognised attribute " + propName + ".  Please check your configuration.  Ignoring!!");
+            if (log.isDebugEnabled()) log.debug("Unrecognised attribute " + propName + ".  Please check your configuration.  Ignoring!!");
          }
          catch (Exception e)
          {

Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -21,8 +21,6 @@
  */
 package org.jboss.cache.config.parsing;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.jboss.cache.config.BuddyReplicationConfig;
 import org.jboss.cache.config.CacheLoaderConfig;
 import org.jboss.cache.config.Configuration;
@@ -60,8 +58,6 @@
  */
 public class XmlConfigurationParser extends XmlParserBase
 {
-
-   private static final Log log = LogFactory.getLog(XmlConfigurationParser.class);
    private RootElementBuilder rootElementBuilder;
 
    /**
@@ -146,9 +142,9 @@
 
    private Configuration processElements(boolean ignoreRoot)
    {
-      if (!ignoreRoot)
+      if (!ignoreRoot &&
+            (!"jbosscache".equals(root.getLocalName()) || !RootElementBuilder.JBOSSCACHE_CORE_NS.equals(root.getNamespaceURI())))
       {
-         if (!"jbosscache".equals(root.getLocalName()) || !RootElementBuilder.JBOSSCACHE_CORE_NS.equals(root.getNamespaceURI()))
             throw new ConfigurationException("Expected root element {" + RootElementBuilder.JBOSSCACHE_CORE_NS + "}" + "jbosscache");
       }
 

Modified: core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizeQueue.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizeQueue.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/ElementSizeQueue.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -81,10 +81,8 @@
       }
       catch (NoSuchElementException e)
       {
-         //
+         return null;
       }
-
-      return null;
    }
 
    public NodeEntry getNodeEntry(Fqn fqn)

Modified: core/trunk/src/main/java/org/jboss/cache/eviction/LFUQueue.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/LFUQueue.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/LFUQueue.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -85,10 +85,8 @@
       }
       catch (NoSuchElementException e)
       {
-         //
+         return null;
       }
-
-      return null;
    }
 
    public NodeEntry getNodeEntry(Fqn fqn)

Modified: core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/LRUAlgorithm.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -103,19 +103,16 @@
    @Override
    protected void evict(NodeEntry ne)
    {
-      if (ne != null)
+      if (ne != null && !this.evictCacheNode(ne.getFqn()))
       {
-         if (!this.evictCacheNode(ne.getFqn()))
+         try
          {
-            try
-            {
-               recycleQueue.put(ne.getFqn());
-            }
-            catch (InterruptedException e)
-            {
-               log.debug("InterruptedException", e);
-            }
+            recycleQueue.put(ne.getFqn());
          }
+         catch (InterruptedException e)
+         {
+            log.debug("InterruptedException", e);
+         }
       }
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/eviction/MRUQueue.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/MRUQueue.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/MRUQueue.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -87,10 +87,8 @@
       }
       catch (NoSuchElementException e)
       {
-         //
+         return null;
       }
-
-      return null;
    }
 
    public NodeEntry getNodeEntry(Fqn fqn)

Modified: core/trunk/src/main/java/org/jboss/cache/factories/ComponentFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/ComponentFactory.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/factories/ComponentFactory.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -63,7 +63,7 @@
    }
 
    @Inject
-   private void injectDependencies(Configuration configuration, ComponentRegistry componentRegistry)
+   void injectDependencies(Configuration configuration, ComponentRegistry componentRegistry)
    {
       this.configuration = configuration;
       this.componentRegistry = componentRegistry;

Modified: core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -217,17 +217,14 @@
       String name = type.getName();
       Component old = componentLookup.get(name);
 
-      if (old != null)
+      if (old != null && old.instance.equals(component))
       {
-         // if they are equal don't bother
-         if (old.instance.equals(component))
-         {
-            if (trace)
-               log.trace("Attempting to register a component equal to one that already exists under the same name (" + name + ").  Not doing anything.");
-            return;
-         }
+         if (trace)
+            log.trace("Attempting to register a component equal to one that already exists under the same name (" + name + ").  Not doing anything.");
+         return;
       }
 
+
       Component c;
       if (old != null)
       {

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/BaseRpcInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/BaseRpcInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/BaseRpcInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -70,7 +70,7 @@
    }
 
    @Start
-   private void init()
+   void init()
    {
       usingBuddyReplication = configuration.getBuddyReplicationConfig() != null && configuration.getBuddyReplicationConfig().isEnabled();
       defaultSynchronous = configuration.getCacheMode().isSynchronous();

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/BaseTransactionalContextInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/BaseTransactionalContextInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/BaseTransactionalContextInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -45,7 +45,7 @@
    protected TransactionManager txManager;
 
    @Inject
-   private void injectDependencies(TransactionTable txTable, TransactionManager txManager)
+   void injectDependencies(TransactionTable txTable, TransactionManager txManager)
    {
       this.txManager = txManager;
       this.txTable = txTable;

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/BatchingInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/BatchingInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/BatchingInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -42,7 +42,7 @@
    TransactionManager transactionManager;
 
    @Inject
-   private void inject(BatchContainer batchContainer, TransactionManager transactionManager)
+   void inject(BatchContainer batchContainer, TransactionManager transactionManager)
    {
       this.batchContainer = batchContainer;
       this.transactionManager = transactionManager;

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheLoaderInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -41,7 +41,6 @@
 import org.jboss.cache.commands.write.RemoveKeyCommand;
 import org.jboss.cache.commands.write.RemoveNodeCommand;
 import org.jboss.cache.config.Configuration;
-import static org.jboss.cache.config.Configuration.CacheMode;
 import org.jboss.cache.config.Configuration.NodeLockingScheme;
 import org.jboss.cache.factories.annotations.Inject;
 import org.jboss.cache.factories.annotations.Start;

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -167,10 +167,10 @@
    public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
    {
       Object retVal = invokeNextInterceptor(ctx, command);
-      return handleGetNodeOrDataCommands(ctx, retVal, command.getFqn());
+      return handleGetNodeOrDataCommands(retVal, command.getFqn());
    }
 
-   private Object handleGetNodeOrDataCommands(InvocationContext ctx, Object retVal, Fqn fqn)
+   private Object handleGetNodeOrDataCommands(Object retVal, Fqn fqn)
    {
       if (retVal == null)
       {
@@ -194,7 +194,7 @@
    public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
    {
       Object retVal = invokeNextInterceptor(ctx, command);
-      return handleGetNodeOrDataCommands(ctx, retVal, command.getFqn());
+      return handleGetNodeOrDataCommands(retVal, command.getFqn());
    }
 
    @Override

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -47,14 +47,14 @@
    }
 
    @Start
-   private void start()
+   void start()
    {
       // for backward compatibility, this must only be done when the cache starts.
       setCache(cache);
    }
 
    @Inject
-   private void injectDependencies(CacheSPI cache)
+   void injectDependencies(CacheSPI cache)
    {
       this.cache = cache;
    }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/InterceptorChain.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/InterceptorChain.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/InterceptorChain.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -1,24 +1,24 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.cache.interceptors;
 
 import org.apache.commons.logging.Log;
@@ -73,7 +73,7 @@
    }
 
    @Start
-   private void printChainInfo()
+   void printChainInfo()
    {
       if (log.isDebugEnabled()) log.debug("Interceptor chain is: " + toString());
    }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/InvalidationInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -92,7 +92,7 @@
    }
 
    @Start
-   private void initTxMap()
+   void initTxMap()
    {
       optimistic = configuration.getNodeLockingScheme() == NodeLockingScheme.OPTIMISTIC;
       if (optimistic) txMods = new ConcurrentHashMap<GlobalTransaction, List<WriteCommand>>();

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/InvocationContextInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -154,26 +154,24 @@
             setTransactionalContext(null, null, null, ctx);
          }
 
-         if (optionOverride != null)
+         if (optionOverride != null && optionOverride.isFailSilently())
          {
-            if (optionOverride.isFailSilently())
+            log.debug("FAIL_SILENTLY Option is present - suspending any ongoing transaction.");
+            suppressExceptions = true;
+            if (ctx.getTransaction() != null)
             {
-               log.debug("FAIL_SILENTLY Option is present - suspending any ongoing transaction.");
-               suppressExceptions = true;
-               if (ctx.getTransaction() != null)
-               {
-                  suspendedTransaction = txManager.suspend();
-                  setTransactionalContext(null, null, null, ctx);
-                  if (trace) log.trace("Suspending transaction " + suspendedTransaction);
-                  resumeSuspended = true;
-               }
-               else
-               {
-                  if (trace) log.trace("No ongoing transaction to suspend");
-               }
+               suspendedTransaction = txManager.suspend();
+               setTransactionalContext(null, null, null, ctx);
+               if (trace) log.trace("Suspending transaction " + suspendedTransaction);
+               resumeSuspended = true;
             }
+            else
+            {
+               if (trace) log.trace("No ongoing transaction to suspend");
+            }
          }
 
+
          Object retval;
          try
          {
@@ -216,12 +214,9 @@
          {
             txManager.resume(suspendedTransaction);
          }
-         else
+         else if (ctx.getTransaction() != null && (TransactionTable.isValid(ctx.getTransaction())))
          {
-            if (ctx.getTransaction() != null && (TransactionTable.isValid(ctx.getTransaction())))
-            {
-               copyInvocationScopeOptionsToTxScope(ctx);
-            }
+            copyInvocationScopeOptionsToTxScope(ctx);
          }
 
          // reset the context to prevent leakage of internals

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -119,7 +119,7 @@
    public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
    {
       Object returnValue = super.visitGetChildrenNamesCommand(ctx, command);
-      removeNodeFromCacheLoader(ctx, command.getFqn());
+      removeNodeFromCacheLoader(command.getFqn());
       return returnValue;
    }
 
@@ -127,7 +127,7 @@
    public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
    {
       Object returnValue = super.visitGetKeysCommand(ctx, command);
-      removeNodeFromCacheLoader(ctx, command.getFqn());
+      removeNodeFromCacheLoader(command.getFqn());
       return returnValue;
    }
 
@@ -135,7 +135,7 @@
    public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
    {
       Object returnValue = super.visitGetNodeCommand(ctx, command);
-      removeNodeFromCacheLoader(ctx, command.getFqn());
+      removeNodeFromCacheLoader(command.getFqn());
       return returnValue;
    }
 
@@ -143,7 +143,7 @@
    public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
    {
       Object returnValue = super.visitGetKeyValueCommand(ctx, command);
-      removeNodeFromCacheLoader(ctx, command.getFqn());
+      removeNodeFromCacheLoader(command.getFqn());
       return returnValue;
    }
 
@@ -157,7 +157,7 @@
    public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
    {
       Object returnValue = super.visitPutKeyValueCommand(ctx, command);
-      removeNodeFromCacheLoader(ctx, command.getFqn());
+      removeNodeFromCacheLoader(command.getFqn());
       return returnValue;
    }
 
@@ -165,7 +165,7 @@
    public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
    {
       Object returnValue = super.visitPutDataMapCommand(ctx, command);
-      removeNodeFromCacheLoader(ctx, command.getFqn());
+      removeNodeFromCacheLoader(command.getFqn());
       return returnValue;
    }
 
@@ -173,7 +173,7 @@
    public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
    {
       Object returnValue = super.visitRemoveKeyCommand(ctx, command);
-      removeNodeFromCacheLoader(ctx, command.getFqn());
+      removeNodeFromCacheLoader(command.getFqn());
       return returnValue;
    }
 
@@ -184,8 +184,8 @@
       if (trace)
          log.trace("This is a move operation; removing the FROM node from the loader, no activation processing needed.");
       loader.remove(command.getFqn());
-      removeNodeFromCacheLoader(ctx, command.getFqn().getParent());
-      removeNodeFromCacheLoader(ctx, command.getTo());
+      removeNodeFromCacheLoader(command.getFqn().getParent());
+      removeNodeFromCacheLoader(command.getTo());
       return returnValue;
    }
 
@@ -196,7 +196,7 @@
     * AND it was found in the cache loader (nodeLoaded = true).
     * Then notify the listeners that the node has been activated.
     */
-   private void removeNodeFromCacheLoader(InvocationContext ctx, Fqn fqn) throws Throwable
+   private void removeNodeFromCacheLoader(Fqn fqn) throws Throwable
    {
       NodeSPI n;
       if (((n = dataContainer.peek(fqn, true, false)) != null) && n.isDataLoaded() && loader.exists(fqn))

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyCacheLoaderInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyCacheLoaderInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyCacheLoaderInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -275,10 +275,9 @@
       boolean mustLoad = false;
       try
       {
-         if (needLock)
+         if (needLock && !lockManager.lock(n, LockType.READ, lockOwner))
          {
-            if (!lockManager.lock(n, LockType.READ, lockOwner))
-               throw new TimeoutException("Unable to acquire lock on " + fqn + ". Lock info: " + lockManager.printLockInfo(n));
+            throw new TimeoutException("Unable to acquire lock on " + fqn + ". Lock info: " + lockManager.printLockInfo(n));
          }
          mustLoad = mustLoad(n, key, allKeys || isMove);
       }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyDataGravitatorInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -228,13 +228,11 @@
    private boolean isGravitationEnabled(InvocationContext ctx)
    {
       boolean enabled = ctx.isOriginLocal();
-      if (enabled)
+      if (enabled && !buddyManager.isAutoDataGravitation())
       {
-         if (!buddyManager.isAutoDataGravitation())
-         {
-            enabled = ctx.getOptionOverrides().getForceDataGravitation();
-         }
+         enabled = ctx.getOptionOverrides().getForceDataGravitation();
       }
+
       return enabled;
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyPassivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyPassivationInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyPassivationInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -42,7 +42,7 @@
    private DataContainer dataContainer;
 
    @Inject
-   private void injectDataContainer(DataContainer dataContainer)
+   void injectDataContainer(DataContainer dataContainer)
    {
       this.dataContainer = dataContainer;
    }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -81,10 +81,7 @@
    @Override
    protected boolean doBeforeCall(InvocationContext ctx, VisitableCommand command)
    {
-      if (ctx.getOptionOverrides().isSuppressLocking())
-      {
-         if (log.isWarnEnabled()) log.warn("Lock suppression not supported with MVCC!");
-      }
+      if (ctx.getOptionOverrides().isSuppressLocking() && log.isWarnEnabled()) log.warn("Lock suppression not supported with MVCC!");      
       return true;
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -22,7 +22,6 @@
 package org.jboss.cache.interceptors;
 
 import org.jboss.cache.InvocationContext;
-import org.jboss.cache.commands.ReplicableCommand;
 import org.jboss.cache.commands.read.GetChildrenNamesCommand;
 import org.jboss.cache.commands.read.GetDataMapCommand;
 import org.jboss.cache.commands.read.GetKeyValueCommand;
@@ -70,7 +69,7 @@
       Set<MarshalledValue> marshalledValues = new HashSet<MarshalledValue>();
       command.setData(wrapMap(command.getData(), marshalledValues, ctx));
       Object retVal = invokeNextInterceptor(ctx, command);
-      return compactAndProcessRetVal(command, marshalledValues, retVal);
+      return compactAndProcessRetVal(marshalledValues, retVal);
    }
 
    @Override
@@ -107,7 +106,7 @@
          command.setValue(value);
       }
       Object retVal = invokeNextInterceptor(ctx, command);
-      return compactAndProcessRetVal(command, marshalledValues, retVal);
+      return compactAndProcessRetVal(marshalledValues, retVal);
    }
 
    @Override
@@ -134,7 +133,7 @@
          command.setKey(value);
       }
       Object retVal = invokeNextInterceptor(ctx, command);
-      return compactAndProcessRetVal(command, marshalledValues, retVal);
+      return compactAndProcessRetVal(marshalledValues, retVal);
    }
 
    @Override
@@ -161,10 +160,10 @@
          command.setKey(value);
       }
       Object retVal = invokeNextInterceptor(ctx, command);
-      return compactAndProcessRetVal(command, marshalledValues, retVal);
+      return compactAndProcessRetVal(marshalledValues, retVal);
    }
 
-   private Object compactAndProcessRetVal(ReplicableCommand command, Set<MarshalledValue> marshalledValues, Object retVal)
+   private Object compactAndProcessRetVal(Set<MarshalledValue> marshalledValues, Object retVal)
          throws IOException, ClassNotFoundException
    {
       if (trace) log.trace("Compacting MarshalledValues created");

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -70,7 +70,7 @@
    private long lockAcquisitionTimeout;
 
    @Inject
-   private void injectDependencies(NodeFactory nodeFactory, DataContainer dataContainer, CacheSPI cacheSPI)
+   void injectDependencies(NodeFactory nodeFactory, DataContainer dataContainer, CacheSPI cacheSPI)
    {
       this.nodeFactory = nodeFactory;
       this.dataContainer = dataContainer;
@@ -78,7 +78,7 @@
    }
 
    @Start
-   private void init()
+   void init()
    {
       lockAcquisitionTimeout = configuration.getLockAcquisitionTimeout();
    }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -55,7 +55,7 @@
    protected LockManager lockManager;
 
    @Inject
-   private void injectDependencies(TransactionManager txManager, TransactionTable txTable, LockManager lockManager)
+   void injectDependencies(TransactionManager txManager, TransactionTable txTable, LockManager lockManager)
    {
       this.txManager = txManager;
       this.txTable = txTable;

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticLockingInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -49,7 +49,7 @@
 public class OptimisticLockingInterceptor extends OptimisticInterceptor
 {
    @Start
-   private void init()
+   void init()
    {
       if (txManager == null || txManager.getClass().equals(BatchModeTransactionManager.class))
          log.fatal("No transaction manager lookup class has been defined. Transactions cannot be used and thus OPTIMISTIC locking cannot be used!  Expect errors!!");

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -85,7 +85,7 @@
    }
 
    @Start
-   private void init()
+   void init()
    {
       lockAcquisitionTimeout = configuration.getLockAcquisitionTimeout();
    }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -76,7 +76,7 @@
    }
 
    @Inject
-   private void init()
+   void init()
    {
       CacheMode mode = configuration.getCacheMode();
       useTombstones = (mode == CacheMode.INVALIDATION_ASYNC) || (mode == CacheMode.INVALIDATION_SYNC);

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/base/CommandInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/base/CommandInterceptor.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/CommandInterceptor.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -68,7 +68,7 @@
    }
 
    @Inject
-   private void injectConfiguration(Configuration configuration)
+   void injectConfiguration(Configuration configuration)
    {
       this.configuration = configuration;
    }

Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -129,7 +129,7 @@
    }
 
    @Start
-   private void setNodeLockingScheme()
+   void setNodeLockingScheme()
    {
       usingMvcc = configuration.getNodeLockingScheme() == NodeLockingScheme.MVCC;
    }
@@ -655,12 +655,9 @@
    protected void cacheStatusCheck(InvocationContext ctx)
    {
       assertIsConstructed();
-      if (!ctx.getOptionOverrides().isSkipCacheStatusCheck())
+      if (!ctx.getOptionOverrides().isSkipCacheStatusCheck() && !componentRegistry.invocationsAllowed(true))
       {
-         if (!componentRegistry.invocationsAllowed(true))
-         {
-            throw new IllegalStateException("Cache not in STARTED state!");
-         }
+         throw new IllegalStateException("Cache not in STARTED state!");
       }
    }
 }

Modified: core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -57,7 +57,6 @@
 import javax.management.NotificationListener;
 import javax.management.ObjectName;
 import javax.transaction.TransactionManager;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
@@ -103,7 +102,6 @@
    private LoadersElementParser loadersElementParser = new LoadersElementParser();
    private EvictionElementParser evictionElementParser = new EvictionElementParser();
    private JGroupsStackParser stackParser = new JGroupsStackParser();
-   private List<ResourceDMBean> resourceDMBeans = new ArrayList<ResourceDMBean>();
 
    // ----------------------------------------------------------- Constructors
 

Modified: core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -250,17 +250,14 @@
       {
          con = cf.getConnection();
          driverName = getDriverName(con);
-         if (config.getCreateTable())
+         if (config.getCreateTable() && !tableExists(config.getTable(), con))
          {
-            if (!tableExists(config.getTable(), con))
+            if (getLogger().isDebugEnabled())
             {
-               if (getLogger().isDebugEnabled())
-               {
-                  getLogger().debug("executing ddl: " + config.getCreateTableDDL());
-               }
-               st = con.createStatement();
-               st.executeUpdate(config.getCreateTableDDL());
+               getLogger().debug("executing ddl: " + config.getCreateTableDDL());
             }
+            st = con.createStatement();
+            st.executeUpdate(config.getCreateTableDDL());
          }
       }
       finally
@@ -284,7 +281,7 @@
       }
       catch (Exception e)
       {
-         // ignore - it just means we didn't need to drop any database tables.
+         if (getLogger().isTraceEnabled()) getLogger().trace("No need to drop tables!");
       }
       finally
       {

Modified: core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -74,7 +74,7 @@
 {
    File root = null;
    String rootPath = null;
-   Log log = LogFactory.getLog(getClass());
+   private static final Log log = LogFactory.getLog(FileCacheLoader.class);
 
    protected final StripedLock lock = new StripedLock();
 
@@ -110,7 +110,7 @@
       }
       catch (Exception e)
       {
-         // ignore
+         if (log.isTraceEnabled()) log.trace("Unable to determine operating system version!");
       }
       // 4.x is windows NT/2000 and 5.x is XP.
       isOldWindows = System.getProperty("os.name").toLowerCase().startsWith("windows") && osVersion < 4;
@@ -407,16 +407,13 @@
          }
       }
 
-      if (include_start_dir)
+      if (include_start_dir && !dir.equals(root))
       {
-         if (!dir.equals(root))
+         if (dir.delete())
          {
-            if (dir.delete())
-            {
-               return success;
-            }
-            success = false;
+            return success;
          }
+         success = false;
       }
 
       return success;

Modified: core/trunk/src/main/java/org/jboss/cache/loader/LocalDelegatingCacheLoaderConfig.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/LocalDelegatingCacheLoaderConfig.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/loader/LocalDelegatingCacheLoaderConfig.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -24,8 +24,6 @@
 import org.jboss.cache.Cache;
 import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
 
-import java.util.Properties;
-
 public class LocalDelegatingCacheLoaderConfig extends IndividualCacheLoaderConfig
 {
    private static final long serialVersionUID = 4626734068542420865L;
@@ -49,12 +47,6 @@
    }
 
    @Override
-   public void setProperties(Properties props)
-   {
-      super.setProperties(props);
-   }
-
-   @Override
    public boolean equals(Object obj)
    {
       return obj instanceof LocalDelegatingCacheLoaderConfig && equalsExcludingProperties(obj) && delegate == ((LocalDelegatingCacheLoaderConfig) obj).delegate;

Modified: core/trunk/src/main/java/org/jboss/cache/loader/SingletonStoreCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/SingletonStoreCacheLoader.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/loader/SingletonStoreCacheLoader.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -23,7 +23,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheSPI;
 import org.jboss.cache.Fqn;
 import org.jboss.cache.Modification;
 import org.jboss.cache.NodeSPI;
@@ -151,19 +150,7 @@
       }
    }
 
-   /**
-    * Sets the cache loader's CacheSPI reference and also adds a listener to the cache that reacts to cluster topology
-    * changes.
-    *
-    * @param c instance of CacheSPI
-    */
    @Override
-   public void setCache(CacheSPI c)
-   {
-      super.setCache(c);
-   }
-
-   @Override
    public void create() throws Exception
    {
       super.create();
@@ -378,16 +365,7 @@
       if (newView != null && localAddress != null)
       {
          Vector mbrs = newView.getMembers();
-         if (mbrs != null)
-         {
-            if (mbrs.size() > 0 && localAddress.equals(mbrs.firstElement()))
-            {
-               /* This node is the coordinator */
-               return true;
-            }
-         }
-
-         return false;
+         return mbrs != null && mbrs.size() > 0 && localAddress.equals(mbrs.firstElement());
       }
 
       /* Invalid new view, so previous value returned */

Modified: core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -144,11 +144,11 @@
                }
                catch (IOException e1)
                {
-                  // IOException starting; sleep a bit and retry
+                  if (trace) log.trace("Unable to reconnect", e1);
                }
                catch (InterruptedException e1)
                {
-                  // do nothing
+                  Thread.currentThread().interrupt();
                }
             }
             else
@@ -406,6 +406,7 @@
       }
       catch (IOException e)
       {
+         if (trace) log.trace("Unable to close resource", e);
       }
       try
       {
@@ -413,6 +414,7 @@
       }
       catch (IOException e)
       {
+         if (trace) log.trace("Unable to close resource", e);
       }
       try
       {
@@ -420,6 +422,7 @@
       }
       catch (IOException e)
       {
+         if (trace) log.trace("Unable to close resource", e);
       }
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -511,13 +511,11 @@
       {
          TupleBrowser browser = tree.browse(name);
          Tuple t = new Tuple();
-         if (browser.getNext(t))
+         if (browser.getNext(t) && self)
          {
-            if (self)
-            {
-               tree.remove(t.getKey());
-            }
+            tree.remove(t.getKey());
          }
+
          while (browser.getNext(t))
          {
             Fqn fqn = (Fqn) t.getKey();

Modified: core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -287,7 +287,7 @@
          }
          catch (Throwable th)
          {
-            // nada
+            if (trace) log.trace("Unable to close resource", th);
          }
          try
          {
@@ -295,7 +295,7 @@
          }
          catch (Throwable th)
          {
-            // nada
+            if (trace) log.trace("Unable to close resource", th);
          }
          try
          {
@@ -303,7 +303,7 @@
          }
          catch (Throwable th)
          {
-            // nada
+            if (trace) log.trace("Unable to close resource", th);
          }
 
          // remove self from connections list
@@ -318,7 +318,7 @@
          NodeSPI n;
          boolean flag;
 
-         while (t != null && Thread.currentThread().equals(t) && t.isAlive())
+         while (t != null && t.equals(Thread.currentThread()) && t.isAlive())
          {
             try
             {

Modified: core/trunk/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -49,7 +49,7 @@
    private CommandsFactory commandsFactory;
 
    @Inject
-   private void injectCommandsFactory(CommandsFactory commandsFactory)
+   void injectCommandsFactory(CommandsFactory commandsFactory)
    {
       this.commandsFactory = commandsFactory;
    }
@@ -166,7 +166,7 @@
 
          Fqn currentNodeFqn = currentNode.getFqn();
          // actually acquire the lock we need.  This method blocks.
-         acquireNodeLock(ctx, currentNode, owner, gtx, lockTypeRequired, timeout);
+         acquireNodeLock(ctx, currentNode, owner, lockTypeRequired, timeout);
 
          LockUtil.manageReverseRemove(ctx, currentNode, reverseRemoveCheck, createdNodes, commandsFactory);
          // make sure the lock we acquired isn't on a deleted node/is an orphan!!
@@ -254,7 +254,7 @@
       return lockType == WRITE && isTargetNode;//write lock explicitly requested and this is the target to be written to.
    }
 
-   private void acquireNodeLock(InvocationContext ctx, NodeSPI node, Object owner, GlobalTransaction gtx, LockType lockType, long lockTimeout) throws LockingException, TimeoutException, InterruptedException
+   private void acquireNodeLock(InvocationContext ctx, NodeSPI node, Object owner, LockType lockType, long lockTimeout) throws LockingException, TimeoutException, InterruptedException
    {
       NodeLock lock = node.getLock();
       boolean acquired = lock.acquire(owner, lockTimeout, lockType);

Modified: core/trunk/src/main/java/org/jboss/cache/lock/TimeoutException.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/lock/TimeoutException.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/lock/TimeoutException.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -57,10 +57,4 @@
    {
       super(msg, cause);
    }
-
-   @Override
-   public String toString()
-   {
-      return super.toString();
-   }
 }

Modified: core/trunk/src/main/java/org/jboss/cache/remoting/jgroups/ChannelMessageListener.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/remoting/jgroups/ChannelMessageListener.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/remoting/jgroups/ChannelMessageListener.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -67,7 +67,7 @@
 
 
    @Inject
-   private void injectDependencies(StateTransferManager stateTransferManager, Configuration configuration)
+   void injectDependencies(StateTransferManager stateTransferManager, Configuration configuration)
    {
       this.stateTransferManager = stateTransferManager;
       this.configuration = configuration;

Modified: core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferGenerator.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferGenerator.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferGenerator.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -34,7 +34,6 @@
 import org.jboss.cache.marshall.NodeData;
 import org.jboss.cache.marshall.NodeDataExceptionMarker;
 
-import java.io.IOException;
 import java.io.ObjectOutputStream;
 import java.util.LinkedList;
 import java.util.List;
@@ -59,7 +58,7 @@
    }
 
    @Start(priority = 14)
-   private void start()
+   void start()
    {
       this.internalFqns = cache.getInternalFqns();
    }
@@ -148,7 +147,7 @@
     * Places a delimiter marker on the stream
     *
     * @param out stream
-    * @throws IOException if there are errs
+    * @throws java.io.IOException if there are errs
     */
    protected void delimitStream(ObjectOutputStream out) throws Exception
    {

Modified: core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -342,14 +342,12 @@
       Object name = internalFqn.get(parentFqn.size());
       prepareContextOptions();
       Node result = parentNode.getChild(name);
-      if (result != null)
+      if (result != null && internalFqn.size() < result.getFqn().size())
       {
-         if (internalFqn.size() < result.getFqn().size())
-         {
-            // need to recursively walk down the tree
-            result = getInternalNode(result, internalFqn);
-         }
+         // need to recursively walk down the tree
+         result = getInternalNode(result, internalFqn);
       }
+
       return result;
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferGenerator.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferGenerator.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferGenerator.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -60,7 +60,7 @@
    }
 
    @Start(priority = 18)
-   private void start()
+   void start()
    {
       this.internalFqns = cache.getInternalFqns();
    }

Modified: core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferIntegrator.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferIntegrator.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/statetransfer/LegacyStateTransferIntegrator.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -364,14 +364,12 @@
       Object name = internalFqn.get(parent.getFqn().size());
       cache.getInvocationContext().getOptionOverrides().setSkipCacheStatusCheck(true);
       Node result = parent.getChild(name);
-      if (result != null)
+      if (result != null && internalFqn.size() < result.getFqn().size())
       {
-         if (internalFqn.size() < result.getFqn().size())
-         {
-            // need to recursively walk down the tree
-            result = getInternalNode(result, internalFqn);
-         }
+         // need to recursively walk down the tree
+         result = getInternalNode(result, internalFqn);
       }
+
       return result;
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/transaction/DummyContext.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/transaction/DummyContext.java	2008-10-23 04:57:16 UTC (rev 7005)
+++ core/trunk/src/main/java/org/jboss/cache/transaction/DummyContext.java	2008-10-23 14:33:36 UTC (rev 7006)
@@ -22,21 +22,12 @@
 package org.jboss.cache.transaction;
 
 import javax.naming.Binding;
-import javax.naming.CompoundName;
 import javax.naming.Context;
-import javax.naming.ContextNotEmptyException;
 import javax.naming.Name;
-import javax.naming.NameAlreadyBoundException;
 import javax.naming.NameClassPair;
-import javax.naming.NameNotFoundException;
 import javax.naming.NameParser;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.NotContextException;
-import javax.naming.OperationNotSupportedException;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InvalidAttributesException;
 import java.util.HashMap;
 import java.util.Hashtable;
 
@@ -88,13 +79,13 @@
     *
     * @param name the name to bind; may not be empty
     * @param obj  the object to bind; possibly null
-    * @throws NameAlreadyBoundException  if name is already bound
-    * @throws InvalidAttributesException if object did not supply all mandatory attributes
+    * @throws javax.naming.NameAlreadyBoundException  if name is already bound
+    * @throws javax.naming.directory.InvalidAttributesException if object did not supply all mandatory attributes
     * @throws NamingException            if a naming exception is encountered
     * @see #bind(String,Object)
     * @see #rebind(Name,Object)
-    * @see DirContext#bind(Name,Object,
-    *      Attributes)
+    * @see javax.naming.directory.DirContext#bind(Name,Object,
+    *      javax.naming.directory.Attributes)
     */
    public void bind(Name name, Object obj) throws NamingException
    {
@@ -106,8 +97,8 @@
     *
     * @param name the name to bind; may not be empty
     * @param obj  the object to bind; possibly null
-    * @throws NameAlreadyBoundException  if name is already bound
-    * @throws InvalidAttributesException if object did not supply all mandatory attributes
+    * @throws javax.naming.NameAlreadyBoundException  if name is already bound
+    * @throws javax.naming.directory.InvalidAttributesException if object did not supply all mandatory attributes
     * @throws NamingException            if a naming exception is encountered
     */
    public void bind(String name, Object obj) throws NamingException
@@ -127,13 +118,13 @@
     *
     * @param name the name to bind; may not be empty
     * @param obj  the object to bind; possibly null
-    * @throws InvalidAttributesException if object did not supply all mandatory attributes
+    * @throws javax.naming.directory.InvalidAttributesException if object did not supply all mandatory attributes
     * @throws NamingException            if a naming exception is encountered
     * @see #rebind(String,Object)
     * @see #bind(Name,Object)
-    * @see DirContext#rebind(Name,Object,
-    *      Attributes)
-    * @see DirContext
+    * @see javax.naming.directory.DirContext#rebind(Name,Object,
+    *      javax.naming.directory.Attributes)
+    * @see javax.naming.directory.DirContext
     */
    public void rebind(Name name, Object obj) throws NamingException
    {
@@ -145,7 +136,7 @@
     *
     * @param name the name to bind; may not be empty
     * @param obj  the object to bind; possibly null
-    * @throws InvalidAttributesException if object did not supply all mandatory attributes
+    * @throws javax.naming.directory.InvalidAttributesException if object did not supply all mandatory attributes
     * @throws NamingException            if a naming exception is encountered
     */
    public void rebind(String name, Object obj) throws NamingException
@@ -169,7 +160,7 @@
     * Intermediate contexts are not changed.
     *
     * @param name the name to unbind; may not be empty
-    * @throws NameNotFoundException if an intermediate context does not exist
+    * @throws javax.naming.NameNotFoundException if an intermediate context does not exist
     * @throws NamingException       if a naming exception is encountered
     * @see #unbind(String)
     */
@@ -182,7 +173,7 @@
     * See {@link #unbind(Name)} for details.
     *
     * @param name the name to unbind; may not be empty
-    * @throws NameNotFoundException if an intermediate context does not exist
+    * @throws javax.naming.NameNotFoundException if an intermediate context does not exist
     * @throws NamingException       if a naming exception is encountered
     */
    public void unbind(String name) throws NamingException
@@ -199,7 +190,7 @@
     *
     * @param oldName the name of the existing binding; may not be empty
     * @param newName the name of the new binding; may not be empty
-    * @throws NameAlreadyBoundException if <tt>newName</tt> is already bound
+    * @throws javax.naming.NameAlreadyBoundException if <tt>newName</tt> is already bound
     * @throws NamingException           if a naming exception is encountered
     * @see #rename(String,String)
     * @see #bind(Name,Object)
@@ -216,7 +207,7 @@
     *
     * @param oldName the name of the existing binding; may not be empty
     * @param newName the name of the new binding; may not be empty
-    * @throws NameAlreadyBoundException if <tt>newName</tt> is already bound
+    * @throws javax.naming.NameAlreadyBoundException if <tt>newName</tt> is already bound
     * @throws NamingException           if a naming exception is encountered
     */
    public void rename(String oldName, String newName) throws NamingException
@@ -238,7 +229,7 @@
     * @throws NamingException if a naming exception is encountered
     * @see #list(String)
     * @see #listBindings(Name)
-    * @see NameClassPair
+    * @see javax.naming.NameClassPair
     */
    public NamingEnumeration<NameClassPair> list(Name name) throws NamingException
    {
@@ -276,7 +267,7 @@
     * @throws NamingException if a naming exception is encountered
     * @see #listBindings(String)
     * @see #list(Name)
-    * @see Binding
+    * @see javax.naming.Binding
     */
    public NamingEnumeration<Binding> listBindings(Name name) throws NamingException
    {
@@ -323,10 +314,10 @@
     * on a context from the foreign context's "native" naming system.
     *
     * @param name the name of the context to be destroyed; may not be empty
-    * @throws NameNotFoundException    if an intermediate context does not exist
-    * @throws NotContextException      if the name is bound but does not name a
+    * @throws javax.naming.NameNotFoundException    if an intermediate context does not exist
+    * @throws javax.naming.NotContextException      if the name is bound but does not name a
     *                                  context, or does not name a context of the appropriate type
-    * @throws ContextNotEmptyException if the named context is not empty
+    * @throws javax.naming.ContextNotEmptyException if the named context is not empty
     * @throws NamingException          if a naming exception is encountered
     * @see #destroySubcontext(String)
     */
@@ -339,10 +330,10 @@
     * See {@link #destroySubcontext(Name)} for details.
     *
     * @param name the name of the context to be destroyed; may not be empty
-    * @throws NameNotFoundException    if an intermediate context does not exist
-    * @throws NotContextException      if the name is bound but does not name a
+    * @throws javax.naming.NameNotFoundException    if an intermediate context does not exist
+    * @throws javax.naming.NotContextException      if the name is bound but does not name a
     *                                  context, or does not name a context of the appropriate type
-    * @throws ContextNotEmptyException if the named context is not empty
+    * @throws javax.naming.ContextNotEmptyException if the named context is not empty
     * @throws NamingException          if a naming exception is encountered
     */
    public void destroySubcontext(String name) throws NamingException
@@ -358,12 +349,12 @@
     *
     * @param name the name of the context to create; may not be empty
     * @return the newly created context
-    * @throws NameAlreadyBoundException  if name is already bound
-    * @throws InvalidAttributesException if creation of the subcontext requires specification of
+    * @throws javax.naming.NameAlreadyBoundException  if name is already bound
+    * @throws javax.naming.directory.InvalidAttributesException if creation of the subcontext requires specification of
     *                                    mandatory attributes
     * @throws NamingException            if a naming exception is encountered
     * @see #createSubcontext(String)
-    * @see DirContext#createSubcontext
+    * @see javax.naming.directory.DirContext#createSubcontext
     */
    public Context createSubcontext(Name name) throws NamingException
    {
@@ -376,8 +367,8 @@
     *
     * @param name the name of the context to create; may not be empty
     * @return the newly created context
-    * @throws NameAlreadyBoundException  if name is already bound
-    * @throws InvalidAttributesException if creation of the subcontext requires specification of
+    * @throws javax.naming.NameAlreadyBoundException  if name is already bound
+    * @throws javax.naming.directory.InvalidAttributesException if creation of the subcontext requires specification of
     *                                    mandatory attributes
     * @throws NamingException            if a naming exception is encountered
     */
@@ -433,7 +424,7 @@
     *         components
     * @throws NamingException if a naming exception is encountered
     * @see #getNameParser(String)
-    * @see CompoundName
+    * @see javax.naming.CompoundName
     */
    public NameParser getNameParser(Name name) throws NamingException
    {
@@ -590,7 +581,7 @@
     * make sense, <tt>OperationNotSupportedException</tt> is thrown.
     *
     * @return this context's name in its own namespace; never null
-    * @throws OperationNotSupportedException if the naming system does
+    * @throws javax.naming.OperationNotSupportedException if the naming system does
     *                                        not have the notion of a full name
     * @throws NamingException                if a naming exception is encountered
     * @since 1.3




More information about the jbosscache-commits mailing list