JBoss Cache SVN: r7008 - core/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-10-23 12:53:07 -0400 (Thu, 23 Oct 2008)
New Revision: 7008
Added:
core/tags/3.0.0.CR2/
Log:
Tagging CR2
Copied: core/tags/3.0.0.CR2 (from rev 7007, core/trunk)
16 years, 2 months
JBoss Cache SVN: r7007 - benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-10-23 10:59:44 -0400 (Thu, 23 Oct 2008)
New Revision: 7007
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt
Log:
updated
Modified: benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt 2008-10-23 14:33:36 UTC (rev 7006)
+++ benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt 2008-10-23 14:59:44 UTC (rev 7007)
@@ -10,7 +10,10 @@
b) make sure that the jar file generated at 2) is in the class path
Note: each line that needs to be changed is prefixed by a comment: "#next line should be modified based on the environment"
4) Before running the tests, make sure you start the TC server first. A server with default configuration can be started using the script: TC_ROOT/samples/start-demo-server.sh
-5) Run the tests by by using allJBossCacheTests.sh or runNode.sh
+5) Run the tests by by using allJBossCacheTests.sh or runNode.sh. The third parameter of runNode.sh the test config file name, which is missing in the case of Terracotta.
+ Make sure you supply a meaningful placeholder for this (e.g. 'teracotta-250'), as the BenchmarkFwk relies on this name for prefixing the report file.
-Note: steps 1-3 should only be performed once
+Notes:
+ - steps 1-3 should only be performed once
+ - if you would like to use another Terracotta client config file, update the "-Dtc.config=$THIS_DIR/tc-client-config.xml" part in ./config.sh
16 years, 2 months
JBoss Cache SVN: r7006 - in core/trunk/src/main/java/org/jboss/cache: cluster and 18 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)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
16 years, 2 months
JBoss Cache SVN: r7005 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES.
by jbosscache-commits@lists.jboss.org
Author: mospina
Date: 2008-10-23 00:57:16 -0400 (Thu, 23 Oct 2008)
New Revision: 7005
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po
Log:
translation in progress
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po 2008-10-23 03:27:15 UTC (rev 7004)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po 2008-10-23 04:57:16 UTC (rev 7005)
@@ -8,7 +8,7 @@
"Project-Id-Version: Cache_loaders\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2008-10-22 14:21+1000\n"
+"PO-Revision-Date: 2008-10-23 12:30+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -1332,7 +1332,7 @@
"mean that individual caches in a cluster might have different in-memory "
"state at any given time (largely depending on their preloading and eviction "
"strategies)."
-msgstr ""
+msgstr "Ambos nodos tienen un CacheLoader que accede a un almacenamiento backend compartido común. Por ejemplo, esto podría ser un sistema de archivos compartidos (utilizando el FileCacheLoader) o una base de datos compartida. Ya que ambos nodos acceden el mismo almacenamiento no es necesario la transferencia de estado en el inicio. <footnote><para> Por supuesto que pueden habilitar la transferencia de estado si quieren tener un caché tibio o caliente después del arranque. </para> </footnote>En su lugar se puede configurar el atributo <literal>FetchInMemoryState</literal> como falso lo cual genera un caché 'frío' que gradualmente se va calentando cuando se acceden o se cargan los elementos por primera vez. Esto significaría que cachés individuales en un clúster pueden tener estados diferentes en la memoria en un momento dado (depende en gran parte de sus estrategias de pre-carga y de eliminación). "
#. Tag: para
#: Cache_loaders.xml:197
@@ -1343,18 +1343,20 @@
"would tell its CacheLoader to store C1, and node2 would tell its CacheLoader "
"to store C2."
msgstr ""
+"Al almacenar un valor, el escritor se encarga de almacenar el cambio en el almacenamiento backend. Por ejemplo, si node1 realizó el cambio C1 y el node2 C2 entonces node1 le dice a su CacheLoader que almacene C1 y el node2 le dice a su CacheLoader "
+"que almacene C2."
#. Tag: title
#: Cache_loaders.xml:203
#, no-c-format
msgid "Replicated caches with only one node having a store"
-msgstr ""
+msgstr "Cachés replicados con sólo un nodo que tiene almacenamiento "
#. Tag: title
#: Cache_loaders.xml:205
#, no-c-format
msgid "2 nodes but only one accesses the backend store"
-msgstr ""
+msgstr "dos nodos pero solo uno accede el almacenamiento backend"
#. Tag: para
#: Cache_loaders.xml:212
@@ -1725,7 +1727,7 @@
"an existing JBossCache MBean is injected into it (assigned to 'Cache'). This "
"means that all requests from the TcpDelegatingCacheLoader will be received "
"by this instance and forwarded to the JBossCache MBean."
-msgstr ""
+msgstr "El BindAddress y el Port definen en donde escucha el socket del servidor y un MBean JBossCache existente es inyectado en el (asignado a 'Cache'). Esto significa que todas las peticiones del TcpDelegatingCacheLoader serán recibidas por esta instancia y serán reenviadas al MBean JBossCache. "
#. Tag: para
#: Cache_loaders.xml:303
@@ -1735,13 +1737,13 @@
"file for JBossCache. If it is set, then the TcpCacheServer will create its "
"own instance of JBossCache and configure it according to the Config "
"attribute."
-msgstr ""
+msgstr "Observe que también hay un atributo 'Config' el cual apunta a un archivo XML de configuración para JBossCache. Si esto se configura entonces el TcpCacheServer creará su propia instancia de JBossCache y la configurará de acuerdo al atributo Config. "
#. Tag: para
#: Cache_loaders.xml:306 Cache_loaders.xml:342
#, no-c-format
msgid "The client side looks as follow:"
-msgstr ""
+msgstr "El lado del cliente se ve así: "
#. Tag: programlisting
#: Cache_loaders.xml:309
@@ -1779,7 +1781,7 @@
msgid ""
"This means this instance of JBossCache will delegate all load and store "
"requests to the remote TcpCacheServer running at localhost:7500."
-msgstr ""
+msgstr "Esto significa que esta instancia de JBossCache delegará todas las peticiones de carga y de almacenamiento al TcpCacheServer remoto ejecutando en localhost:7500."
#. Tag: para
#: Cache_loaders.xml:313
@@ -1795,7 +1797,7 @@
"TcpCacheServer serves as a natural cache in front of the DB (assuming that a "
"network round trip is faster than a DB access (which usually also include a "
"network round trip))."
-msgstr ""
+msgstr "Un caso típico puede ser múltiples instancias replicadas de JBossCache en el mismo clúster, todas delegando a la misma instancia TcpCacheServer. El TcpCacheServer puede por sí mismo delegar a una base de datos por medio de JDBCCacheLoader, pero el punto aquí es que si tenemos cinco nodos todos accediendo al mismo grupo de datos, estos cargarán los datos desde el TcpCacheServer, el cual tiene que ejecutar una declaración SQL por grupo de datos no cargado. Si los nodos fueran directamente a la base de datos entonces tendríamos el mismo SQL ejecutado múltiples veces. Así que TcpCacheServer sirve como un caché natural frente a la base de datos (asumiendo que un viaje de ida y vuelta de la red es más rápido que el acceder a la base de datos (el cual usualmente también incluye un viaje de ida y vuelta)). "
#. Tag: para
#: Cache_loaders.xml:316
@@ -1807,6 +1809,8 @@
"effectively defining our cost of access to a cache in increasing order of "
"cost."
msgstr ""
+"Para aliviar la falla de un sólo punto podemos combinar esto con un ChainingCacheLoader, en donde el primer CacheLoader es un ClusteredCacheLoader, "
+"el segundo un TcpDelegatingCacheLoader y el último un JDBCacheLoader, efectivamente definiendo nuestro costo de acceso a un caché con un costo que se va incrementando. "
#. Tag: title
#: Cache_loaders.xml:322
@@ -1821,6 +1825,8 @@
"Similar to the TcpDelegatingCacheLoader, the RmiDelegatingCacheLoader uses "
"RMI as a method of communicating with a remote cache."
msgstr ""
+"De manera similar al TcpDelegatingCacheLoader, el RmiDelegatingCacheLoader utiliza "
+"RMI como método de comunicación con un caché remoto."
#. Tag: para
#: Cache_loaders.xml:326
@@ -1831,6 +1837,9 @@
"JBossCache, which it can create itself, or which is given to it (e.g. by "
"JBoss, using dependency injection)."
msgstr ""
+"Un RmiDelegatingCacheLoader le habla a un RmiCacheServer remoto,el cual es un proceso autónomo. El RmiCacheServer tiene una referencia a otro "
+"JBossCache, el cual puede crearse a sí mismo o el cual le es dado (por ejemplo, por "
+"JBoss, utilizando la inyección de dependencias)."
#. Tag: para
#: Cache_loaders.xml:329
@@ -1839,13 +1848,13 @@
"The RmiDelegatingCacheLoader is configured with the host, port of the remote "
"RMI server and the bind name of the RmiCacheServer, and uses this to "
"communicate."
-msgstr ""
+msgstr "El RmiDelegatingCacheLoader está configurado con el host, el puerto del servidor RMI remoto y el nombre de enlace del RmiCacheServer y utiliza esto para comunicarse. "
#. Tag: para
#: Cache_loaders.xml:332
#, no-c-format
msgid "An example set of an RmiCacheServer running inside of JBoss is shown below:"
-msgstr ""
+msgstr "A continuación puede ver un ejemplo de un RmiCacheServer ejecutando dentro de JBoss:"
#. Tag: programlisting
#: Cache_loaders.xml:335
@@ -1904,7 +1913,7 @@
"existing JBossCache MBean is injected into it (assigned to 'Cache'). This "
"means that all requests from the TcpDelegatingCacheLoader will be received "
"by this instance and forwarded to the JBossCache MBean."
-msgstr ""
+msgstr "El BindAddress y el Port deben apuntar a un servidor RMI que ya se encuentre ejecutando y el BindName es el nombre del objeto al que está enlazado en el servidor RMI. Un MBean JBossCache ya existenete es inyectado en él (asignado a 'Cache'). Esto significa que todas las peticiones de TcpDelegatingCacheLoader serán recibidas por esta instancia y reenviadas al MBean JBossCache."
#. Tag: para
#: Cache_loaders.xml:339
@@ -1914,7 +1923,7 @@
"file for JBossCache. If it is set, then the RmiCacheServer will create its "
"own instance of JBossCache and configure it according to the Config "
"attribute."
-msgstr ""
+msgstr "Observe que también hay un atributo 'Config' el cual apunta a un archivo XML de configuración para JBossCache. Si está configurado entonces el RmiCacheServer creará su propia instancia de JBossCache y la configurará de acuerdo con el atributo Config. "
#. Tag: programlisting
#: Cache_loaders.xml:345
@@ -1955,7 +1964,7 @@
"This means this instance of JBossCache will delegate all load and store "
"requests to the remote RmiCacheServer running as MyRmiCacheServer on an RMI "
"server running on localhost:1098."
-msgstr ""
+msgstr "Esto significa que esta instancia de JBossCache delegará todas las peticiones de carga y de almacenamiento al RmiCacheServer remoto ejecutando como MyRmiCacheServer en un servidor RMI ejecutando en localhost:1098."
#. Tag: para
#: Cache_loaders.xml:349
@@ -1963,13 +1972,13 @@
msgid ""
"Very similar use case scenarios that apply to TcpDelegatingCacheLoaders "
"above apply to RmiDelegatingCacheLoaders as well."
-msgstr ""
+msgstr "Muchos de los casos que aplican a TcpDelegatingCacheLoaders también aplican a RmiDelegatingCacheLoaders. "
#. Tag: title
#: Cache_loaders.xml:357
#, no-c-format
msgid "JDBC-based CacheLoader"
-msgstr ""
+msgstr "CacheLoader basado en JDBC"
#. Tag: para
#: Cache_loaders.xml:358
@@ -1978,7 +1987,7 @@
"JBossCache is distributed with a JDBC-based CacheLoader implementation that "
"stores/loads nodes' state into a relational database. The implementing class "
"is <literal>org.jboss.cache.loader.JDBCCacheLoader</literal>."
-msgstr ""
+msgstr "JBossCache es distribuido con una implementación CacheLoader basada en JDBC que almacena/carga el estado de nodos en una base de datos relacional. La clase de implementación es <literal>org.jboss.cache.loader.JDBCCacheLoader</literal>."
#. Tag: para
#: Cache_loaders.xml:361
@@ -1986,25 +1995,25 @@
msgid ""
"The current implementation uses just one table. Each row in the table "
"represents one node and contains three columns:"
-msgstr ""
+msgstr "La implementación actual utiliza sólo una tabla. Cada fila en la tabla representa un nodo y contiene tres columnas:"
#. Tag: para
#: Cache_loaders.xml:364
#, no-c-format
msgid "column for FQN (which is also a primary key column)"
-msgstr ""
+msgstr "columna para FQN (la cula también es una columna de clave primaria)"
#. Tag: para
#: Cache_loaders.xml:367
#, no-c-format
msgid "column for node contents (attribute/value pairs)"
-msgstr ""
+msgstr "columna para el contenido de nodos (atributo/valor)"
#. Tag: para
#: Cache_loaders.xml:370
#, no-c-format
msgid "column for parent FQN"
-msgstr ""
+msgstr "columna para el FQN padre"
#. Tag: para
#: Cache_loaders.xml:374
@@ -2020,6 +2029,9 @@
"also subject to any maximum primary key length restriction imposed by the "
"database."
msgstr ""
+"Los FQN se almacenan como cadenas. El contenido del nodo es almacenado como un BLOB. "
+"<emphasis>ADVERTENCIA:</emphasis> TreeCache no impone ninguna limitación en los tipos de objetos utilizados en FQN pero esta implementación de CacheLoader requiere que FQN contenga sólo objetos de tipo <literal>java.lang.String</"
+"literal>. Otra limitación para FQN es la longitud. Ya que FQN es una clave primaria su tipo predeterminado de columna es <literal>VARCHAR</literal>, la cual puede almacenar valores de texto de hasta una longitud máxima determinada por la base de datos. FQN también está sujeto a cualquier restricción de longitud de clave primaria impuesta por la base de datos. "
#. Tag: para
#: Cache_loaders.xml:377
@@ -2029,18 +2041,20 @@
"page=JDBCCacheLoader</ulink> for configuration tips with specific database "
"systems."
msgstr ""
+"Consulte <ulink url=\"???\">http://wiki.jboss.org/wiki/Wiki.jsp?"
+"page=JDBCCacheLoader</ulink> para obtener más tips sobre la configuración con sistemas de bases de datos específicos."
#. Tag: title
#: Cache_loaders.xml:381
#, no-c-format
msgid "JDBCCacheLoader configuration"
-msgstr ""
+msgstr "Configiración de JDBCCacheLoader"
#. Tag: title
#: Cache_loaders.xml:383
#, no-c-format
msgid "Table configuration"
-msgstr ""
+msgstr "Configuración de la tabla"
#. Tag: para
#: Cache_loaders.xml:384
@@ -2048,7 +2062,7 @@
msgid ""
"Table and column names as well as column types are configurable with the "
"following properties."
-msgstr ""
+msgstr "Los nombres de tablas y columnas así como los tipos de columnas son configurables con las siguientes propiedades. "
#. Tag: para
#: Cache_loaders.xml:387
@@ -2056,7 +2070,7 @@
msgid ""
"<emphasis>cache.jdbc.table.name</emphasis> - the name of the table. The "
"default value is 'jbosscache'."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.table.name</emphasis> - el nonmbre de la tabla. El valor predeterminado es 'jbosscache'."
#. Tag: para
#: Cache_loaders.xml:390
@@ -2064,7 +2078,7 @@
msgid ""
"<emphasis>cache.jdbc.table.primarykey</emphasis> - the name of the primary "
"key for the table. The default value is 'jbosscache_pk'."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.table.primarykey</emphasis> - el nombre de la clave primaria para la tabla. El valor predeterminado es 'jbosscache_pk'."
#. Tag: para
#: Cache_loaders.xml:393
@@ -2074,6 +2088,9 @@
"Indicates whether to create the table during startup. If true, the table is "
"created if it doesn't already exist. The default value is true."
msgstr ""
+"<emphasis>cache.jdbc.table.create</emphasis> - puede ser verdadero o falso. "
+"Indica si debe crear la tabla durante el arranque. Si es verdadero, la tabla es "
+"creada si no existe previamente. El valor predeterminado es verdadero."
#. Tag: para
#: Cache_loaders.xml:396
@@ -2081,7 +2098,7 @@
msgid ""
"<emphasis>cache.jdbc.table.drop</emphasis> - can be true or false. Indicates "
"whether to drop the table during shutdown. The default value is true."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.table.drop</emphasis> - puede ser verdadero o falso. Indica si debe borrar la tabla al apagarse. El valor predeterminado es verdadero."
#. Tag: para
#: Cache_loaders.xml:399
@@ -2089,7 +2106,7 @@
msgid ""
"<emphasis>cache.jdbc.fqn.column</emphasis> - FQN column name. The default "
"value is 'fqn'."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.fqn.column</emphasis> - nombre de columan FQN. El valor predeterminado es 'fqn'."
#. Tag: para
#: Cache_loaders.xml:402
@@ -2097,7 +2114,7 @@
msgid ""
"<emphasis>cache.jdbc.fqn.type</emphasis> - FQN column type. The default "
"value is 'varchar(255)'."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.fqn.type</emphasis> - tipo de columna FQN. El valor predeterminado es 'varchar(255)'."
#. Tag: para
#: Cache_loaders.xml:405
@@ -2105,7 +2122,7 @@
msgid ""
"<emphasis>cache.jdbc.node.column</emphasis> - node contents column name. The "
"default value is 'node'."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.node.column</emphasis> - nombre de la columna del contenido del nodo. El valor predeterminado es 'node'."
#. Tag: para
#: Cache_loaders.xml:408
@@ -2114,13 +2131,13 @@
"<emphasis>cache.jdbc.node.type</emphasis> - node contents column type. The "
"default value is 'blob'. This type must specify a valid binary data type for "
"the database being used."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.node.type</emphasis> - tipo de columna del contenido del nodo. El valor predeterminado es 'blob'. Este tipo debe especificar un tipo de dato binario válido para la base de datos que se está utilizando."
#. Tag: title
#: Cache_loaders.xml:415
#, no-c-format
msgid "DataSource"
-msgstr ""
+msgstr "DataSource"
#. Tag: para
#: Cache_loaders.xml:416
@@ -2128,7 +2145,7 @@
msgid ""
"If you are using JBossCache in a managed environment (e.g., an application "
"server) you can specify the JNDI name of the DataSource you want to use."
-msgstr ""
+msgstr "Si está utilizando JBossCache en un entorno administrado (por ejemplo, un servidor de aplicaciones) puede especificar el nombre JNDI del DataSource que quiere utilizar. "
#. Tag: para
#: Cache_loaders.xml:419
@@ -2136,13 +2153,13 @@
msgid ""
"<emphasis>cache.jdbc.datasource</emphasis> - JNDI name of the DataSource. "
"The default value is 'java:/DefaultDS'."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.datasource</emphasis> - el nombre JNDI del DataSource. El valor predeterminado es 'java:/DefaultDS'."
#. Tag: title
#: Cache_loaders.xml:426
#, no-c-format
msgid "JDBC driver"
-msgstr ""
+msgstr "Controlador JDBC"
#. Tag: para
#: Cache_loaders.xml:427
@@ -2150,25 +2167,25 @@
msgid ""
"If you are <emphasis>not</emphasis> using DataSource you have the following "
"properties to configure database access using a JDBC driver."
-msgstr ""
+msgstr "Si <emphasis>no</emphasis> está utilizando DataSource tiene las siguientes propiedades para configurar el acceso a bases de datos utilizando un controlador JDBC."
#. Tag: para
#: Cache_loaders.xml:430
#, no-c-format
msgid "<emphasis>cache.jdbc.driver</emphasis> - fully qualified JDBC driver name."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.driver</emphasis> - el nombre de controlador JDBC completamente calificado."
#. Tag: para
#: Cache_loaders.xml:433
#, no-c-format
msgid "<emphasis>cache.jdbc.url</emphasis> - URL to connect to the database."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.url</emphasis> - la URL a conectar a la base de datos."
#. Tag: para
#: Cache_loaders.xml:436
#, no-c-format
msgid "<emphasis>cache.jdbc.user</emphasis> - user name to connect to the database."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.user</emphasis> - nombre de usuario a conectar a la base de datos."
#. Tag: para
#: Cache_loaders.xml:439
@@ -2176,13 +2193,13 @@
msgid ""
"<emphasis>cache.jdbc.password</emphasis> - password to connect to the "
"database."
-msgstr ""
+msgstr "<emphasis>cache.jdbc.password</emphasis> - contraseña para conectarse a la base de datos."
#. Tag: title
#: Cache_loaders.xml:446
#, no-c-format
msgid "Configuration example"
-msgstr ""
+msgstr "Ejemplo de configuración"
#. Tag: para
#: Cache_loaders.xml:447
@@ -2191,7 +2208,7 @@
"Below is an example of a JDBC CacheLoader using Oracle as database. The "
"CacheLoaderConfiguration XML element contains an arbitrary set of properties "
"which define the database-related configuration."
-msgstr ""
+msgstr "A continuación encontrará un ejemplo de un CacheLoader JDBC utilizando Oracle como base de datos. El elemento XML CacheLoaderConfiguration contiene un grupo arbitrario de propiedades, las cuales definen la configuración relacionada con la base de datos. "
#. Tag: programlisting
#: Cache_loaders.xml:451
@@ -2289,7 +2306,7 @@
msgid ""
"As an alternative to configuring the entire JDBC connection, the name of an "
"existing data source can be given:"
-msgstr ""
+msgstr "Como alternativa a configurar la conección JDBC completa se puede suministrar el nombre de una fuente de datos existente: "
#. Tag: programlisting
#: Cache_loaders.xml:456
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po 2008-10-23 03:27:15 UTC (rev 7004)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po 2008-10-23 04:57:16 UTC (rev 7005)
@@ -8,7 +8,7 @@
"Project-Id-Version: Configuration\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2008-10-17 15:01+1000\n"
+"PO-Revision-Date: 2008-10-23 14:01+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -699,13 +699,13 @@
msgid ""
"Configuration parameter for the specified eviction policy. Note that the "
"content is provider specific."
-msgstr ""
+msgstr "Parámetro de configuración para la política de eliminación especificada. Observe que el contenido es especifico del proveedor."
#. Tag: para
#: Configuration.xml:128
#, no-c-format
msgid "FetchInMemoryState (renamed from FetchStateOnStartup)"
-msgstr ""
+msgstr "FetchInMemoryState (antes se llamaba FetchStateOnStartup)"
#. Tag: para
#: Configuration.xml:133
@@ -715,12 +715,14 @@
"Allows for hot/cold caches (true/false). Also see the fetchPersistentState "
"element in CacheLoaderConfiguration."
msgstr ""
+"Si debe adquirir o no el estado inicial en memoria de los miembros existentes. Tiene en cuenta cachés calientes/fríos (verdadero/falso). También el elemento fetchPersistentState "
+"en CacheLoaderConfiguration."
#. Tag: para
#: Configuration.xml:140
#, no-c-format
msgid "InactiveOnStartup"
-msgstr ""
+msgstr "InactiveOnStartup"
#. Tag: para
#: Configuration.xml:145
@@ -733,12 +735,14 @@
"be set to true if <literal>UseRegionBasedMarshalling</literal> is also "
"<literal>true</literal>."
msgstr ""
+"Si el árbol entero es inactivo o no en el arranque sólo respondiendo a los mensajes de replicación después de llamar a <literal>activateRegion()</literal> para que active una o más partes del árbol. Si es verdadero, la propiedad <literal>FetchInMemoryState</literal> se ignora. Esta propiedad sólo se debe configurar como verdadera si <literal>UseRegionBasedMarshalling</literal> también es "
+"<literal>true</literal>."
#. Tag: para
#: Configuration.xml:152
#, no-c-format
msgid "InitialStateRetrievalTimeout"
-msgstr ""
+msgstr "InitialStateRetrievalTimeout"
#. Tag: para
#: Configuration.xml:157
@@ -748,13 +752,13 @@
"longer than <literal>LockAcquisitionTimeout</literal> as the node providing "
"state may need to wait that long to acquire necessary read locks on the "
"cache."
-msgstr ""
+msgstr "El tiempo en milisegundos a esperar por la recuperación de estado inicial. Debe ser mayor que <literal>LockAcquisitionTimeout</literal> ya que puede que el nodo que provee el estado necesite esperar ese tiempo para adquirir los bloqueos de lectura necesarios en el caché."
#. Tag: para
#: Configuration.xml:164
#, no-c-format
msgid "IsolationLevel"
-msgstr ""
+msgstr "IsolationLevel"
#. Tag: para
#: Configuration.xml:169
@@ -765,12 +769,15 @@
"NodeLockingScheme is OPTIMISTIC. Case doesn't matter. See documentation on "
"Transactions and Concurrency for more details."
msgstr ""
+"Nivel de aislamiento de bloqueo de nodos: SERIALIZABLE, REPEATABLE_READ (predeterminado), "
+"READ_COMMITTED, READ_UNCOMMITTED y NONE. Observe que esto se ignora si NodeLockingScheme es OPTIMISTIC. El caso no importa. Para obtener mayores detalles consulte la documentación sobre "
+"transacciones y concurrencia."
#. Tag: para
#: Configuration.xml:176
#, no-c-format
msgid "LockAcquisitionTimeout"
-msgstr ""
+msgstr "LockAcquisitionTimeout"
#. Tag: para
#: Configuration.xml:181
@@ -778,13 +785,13 @@
msgid ""
"Time in milliseconds to wait for a lock to be acquired. If a lock cannot be "
"acquired an exception will be thrown."
-msgstr ""
+msgstr "El tiempo en milisegundos a esperar para que un bloqueo se adquiera. Si un bloqueo no se puede adquirir entonces se presentará una excepción. "
#. Tag: para
#: Configuration.xml:188
#, no-c-format
msgid "MultiplexerService"
-msgstr ""
+msgstr "MultiplexerService"
#. Tag: para
#: Configuration.xml:193
@@ -797,13 +804,13 @@
"configuration of the channel will be that associated with "
"<literal>MultiplexerStack</literal>. The <literal>ClusterConfig</literal> "
"attribute will be ignored."
-msgstr ""
+msgstr "El nombre del objeto JMX del servicio que define el multiplexer JGroups. En JBoss AS 5 este servicio es normalmente definido en el jgroups-multiplexer.sar. Si este atributo es definido, el caché buscará el servicio multiplexer en JMX y lo utilizará para obtener un canal JGoups con multiplex. La configuración del canal será la asociada con <literal>MultiplexerStack</literal>. El atributo <literal>ClusterConfig</literal> será ignorado. "
#. Tag: para
#: Configuration.xml:200
#, no-c-format
msgid "MultiplexerStack"
-msgstr ""
+msgstr "MultiplexerStack"
#. Tag: para
#: Configuration.xml:205
@@ -816,12 +823,14 @@
"stacks.xml file. The default stack is <literal>udp</literal>. This attribute "
"is used in conjunction with <literal>MultiplexerService</literal>."
msgstr ""
+"El nombre de la pila JGroups a utilizar con el clúster TreeCache. Las pilas están definidas en la configuración del <literal>MultiplexerService</literal> externo discutido anteriormente. En JBoss AS 5 esto se hace normalmente en el archivo jgroups-multiplexer.sar\META-INF\multiplexer-"
+"stacks.xml. La pila predeterminada es <literal>udp</literal>. Este atributo se utiliza en conjunto con <literal>MultiplexerService</literal>."
#. Tag: para
#: Configuration.xml:212
#, no-c-format
msgid "NodeLockingScheme"
-msgstr ""
+msgstr "NodeLockingScheme"
#. Tag: para
#: Configuration.xml:217
@@ -829,13 +838,13 @@
msgid ""
"May be PESSIMISTIC (default) or OPTIMISTIC. See documentation on "
"Transactions and Concurrency for more details."
-msgstr ""
+msgstr "Puede ser PESSIMISTIC (por defecto) u OPTIMISTIC. Para obtener mayores detalles consulte nuestra documentación sobre Transacciones y Concurrencia."
#. Tag: para
#: Configuration.xml:224
#, no-c-format
msgid "ReplicationVersion"
-msgstr ""
+msgstr "ReplicationVersion"
#. Tag: para
#: Configuration.xml:229
@@ -851,12 +860,14 @@
"release number, with any SP qualifer also separated by a dot, e.g. \"1.2.3\" "
"or \"1.2.4.SP2\"."
msgstr ""
+"Le dice al caché que serialice el tráfico del clúster en un formato consistente con el que se utiliza por el lanzamiento dado de JBoss Cache. Diferentes versiones de JBoss Cache utilizan diferentes formatos, el configurar este atributo le dice al caché de un lanzamiento posterior que serialice los datos utilizando el formato de un lanzamiento anterior. Esto le permite interoperar a cachés de lanzamientos diferentes. Por ejemplo, un caché 1.2.4.SP2 podría tener este valor configurado como \"1.2.3\", permitiéndole interoperar con un caché 1.2.3. Los valores válidos tienen el nombre del lanzamiento separado por puntos, con cualquier calificador SP también separado por un punto, por ejemplo, \"1.2.3\" "
+"o \"1.2.4.SP2\"."
#. Tag: para
#: Configuration.xml:236
#, no-c-format
msgid "ReplQueueInterval"
-msgstr ""
+msgstr "ReplQueueInterval"
#. Tag: para
#: Configuration.xml:241
@@ -864,25 +875,25 @@
msgid ""
"Time in milliseconds for elements from the replication queue to be "
"replicated."
-msgstr ""
+msgstr "El tiempo en milisegundos para que los elementos de la cola de replicación sean replicados."
#. Tag: para
#: Configuration.xml:248
#, no-c-format
msgid "ReplQueueMaxElements"
-msgstr ""
+msgstr "ReplQueueMaxElements"
#. Tag: para
#: Configuration.xml:253
#, no-c-format
msgid "Max number of elements in the replication queue until replication kicks in."
-msgstr ""
+msgstr "El número máximo de elementos en la cola de replicación hasta que la replicación empieza. "
#. Tag: para
#: Configuration.xml:260
#, no-c-format
msgid "SyncCommitPhase"
-msgstr ""
+msgstr "SyncCommitPhase"
#. Tag: para
#: Configuration.xml:265
@@ -894,13 +905,13 @@
"penalty to enabling this, especially when running in a large cluster, but "
"the upsides are greater cluster-wide data integrity. See the chapter on "
"Clustered Caches for more information on this."
-msgstr ""
+msgstr "Esta opción se utiliza para controlar el comportamiento de la parte que guarda los cambios del protocolo para guardar los cambios de dos fases al utilizar REPL_SYNC (no aplica a otros modos caché). Por defecto esto se configura como <literal>false</literal>. Hay un consecuencias en el rendimiento al habilitar esto, especialmente al ejecutar en un clúster grande pero la ventaja es la integridad de los datos en todo el clúster. Para obtener mayor información sobre esto consulte el capítulo sobre cachés en clústers. "
#. Tag: para
#: Configuration.xml:272
#, no-c-format
msgid "SyncReplTimeout"
-msgstr ""
+msgstr "SyncReplTimeout"
#. Tag: para
#: Configuration.xml:277
@@ -908,13 +919,13 @@
msgid ""
"For synchronous replication: time in milliseconds to wait until replication "
"acks have been received from all nodes in the cluster."
-msgstr ""
+msgstr "Para una replicación sincrónica: el tiempo en milisegundos a esperar hasta que los acks de replicación hayan sido recibidos de todos los nodos en el clúster. "
#. Tag: para
#: Configuration.xml:284
#, no-c-format
msgid "SyncRollbackPhase"
-msgstr ""
+msgstr "SyncRollbackPhase"
#. Tag: para
#: Configuration.xml:289
@@ -926,13 +937,13 @@
"performance penalty to enabling this, especially when running in a large "
"cluster, but the upsides are greater cluster-wide data integrity. See the "
"chapter on Clustered Caches for more information on this."
-msgstr ""
+msgstr "Esta opción se utiliza para controlar el comportamiento de la parte para deshacer del protocolo para guardar cambios de dos fases al utilizar REPL_SYNC (no aplica a otros modos de caché). Por defecto se configura como <literal>false</literal>. Hay consecuencias en el rendimiento al habilitar esto, especialmente al ejecutar en un clúster grande pero la ventaja es una mayor integridad de los datos en todo el clúster. Para obtener mayor información consulte el capítulo sobre cachés en clústers. "
#. Tag: para
#: Configuration.xml:296
#, no-c-format
msgid "TransactionManagerLookupClass"
-msgstr ""
+msgstr "TransactionManagerLookupClass"
#. Tag: para
#: Configuration.xml:301
@@ -941,13 +952,13 @@
"The fully qualified name of a class implementing TransactionManagerLookup. "
"Default is JBossTransactionManagerLookup. There is also an option of "
"DummyTransactionManagerLookup for example."
-msgstr ""
+msgstr "El nombre completamente calificado de una clase implementando TransactionManagerLookup. Por defecto es JBossTransactionManagerLookup. También hay una opción de DummyTransactionManagerLookup por ejemplo."
#. Tag: para
#: Configuration.xml:308
#, no-c-format
msgid "UseInterceptorMbeans"
-msgstr ""
+msgstr "UseInterceptorMbeans"
#. Tag: para
#: Configuration.xml:313
@@ -957,13 +968,13 @@
"registered. Interceptor mbeans are used to capture statistics and display "
"them in JMX. This setting enables or disables all such interceptor mbeans. "
"Default value is <emphasis>true</emphasis>."
-msgstr ""
+msgstr "Especifica si cada interceptor debe tener un mbean registrado asociado. Los mbeans interceptores se utilizan para capturar estadísticas y presentarlas en JMX. Esta configuración habilita o deshabilita tales mbeans interceptores. El valor predeterminado es <emphasis>verdadero</emphasis>."
#. Tag: para
#: Configuration.xml:320
#, no-c-format
msgid "UseRegionBasedMarshalling"
-msgstr ""
+msgstr "UseRegionBasedMarshalling"
#. Tag: para
#: Configuration.xml:325
@@ -972,13 +983,13 @@
"When unmarshalling replicated data, this option specifies whether or not to "
"use different classloaders (for different cache regions). This defaults to "
"<literal>false</literal> if unspecified."
-msgstr ""
+msgstr "Al desordenar datos replicados, esta opción especifica si deben utilizar o no diferentes cargadores de clase (para regiones de caché diferentes). Si no se especifica por defecto es <literal>false</literal>. "
#. Tag: para
#: Configuration.xml:332
#, no-c-format
msgid "UseReplQueue"
-msgstr ""
+msgstr "UseReplQueue"
#. Tag: para
#: Configuration.xml:337
@@ -987,12 +998,14 @@
"For asynchronous replication: whether or not to use a replication queue "
"(true/false)."
msgstr ""
+"Para replicación asincrónica: si debe utilizar una cola de replicación "
+"(verdadero/falso)."
#. Tag: para
#: Configuration.xml:344
#, no-c-format
msgid "LockParentForChildInsertRemove"
-msgstr ""
+msgstr "LockParentForChildInsertRemove"
#. Tag: para
#: Configuration.xml:349
@@ -1005,12 +1018,14 @@
"data integrity. This defaults to <literal>false</literal> and is ignored if "
"used with optimistic locking or other isolation levels."
msgstr ""
+"Cuando se utiliza con el bloqueo pesimista y <literal>IsolationLevel</literal> de "
+"<literal>REPEATABLE_READ</literal>, este parámetro especifica si los nodos padres necesitan ser bloqueados para escritura al añadir o borrar nodos hijos. Esto previene lecturas fantasma, proporcionando una integridad de datos para \"lecturas más fuertes que repetibles\". Por defecto es <literal>false</literal> y se ignora si se utiliza con el bloqueo optimista u otros niveles de aislamiento."
#. Tag: title
#: Configuration.xml:360
#, no-c-format
msgid "Overriding options"
-msgstr ""
+msgstr "Opciones de sobreescritura"
#. Tag: para
#: Configuration.xml:361
@@ -1025,4 +1040,9 @@
"literal>. See the javadocs on the <literal>Option</literal> class for "
"details on these options."
msgstr ""
+"DesdeJBoss Cache 1.3.0 se ha introducido una nueva API para permitirle sobreescribir cierto comportamiento del caché de acuerdo a cada invocación. Esto implica el crear una instancia de <literal>org.jboss.cache.config.Option</"
+"literal>, configurando las opciones que quiere sobreescribir en el objeto <literal>Option</"
+"literal> y pasarlo como un parámetro a versiones sobrecargadas de "
+"<literal>get()</literal>, <literal>put()</literal> y <literal>remove()</"
+"literal>. Para obtener mayores detalles sobre estas opciones puede consultar los javadocs en la clase <literal>Option</literal>."
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po 2008-10-23 03:27:15 UTC (rev 7004)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po 2008-10-23 04:57:16 UTC (rev 7005)
@@ -8,7 +8,7 @@
"Project-Id-Version: Replication\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2008-10-17 12:13+1000\n"
+"PO-Revision-Date: 2008-10-23 14:30+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -382,8 +382,9 @@
#. Tag: title
#: Replication.xml:130
#, no-c-format
+#, fuzzy
msgid "Configuration"
-msgstr ""
+msgstr "Configuración"
#. Tag: programlisting
#: Replication.xml:132
16 years, 2 months
JBoss Cache SVN: r7004 - in core/trunk/src/test/java/org/jboss/cache/eviction: legacy and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-10-22 23:27:15 -0400 (Wed, 22 Oct 2008)
New Revision: 7004
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java
Log:
Fixed broken tests
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java 2008-10-23 03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/ElementSizeConfigurationTest.java 2008-10-23 03:27:15 UTC (rev 7004)
@@ -24,8 +24,8 @@
{
ElementSizeAlgorithmConfig config = new ElementSizeAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute name=\"maxNodes\">1000</attribute>" +
- "<attribute name=\"maxElementsPerNode\">100</attribute>" +
+ "<property name=\"maxNodes\" value=\"1000\"></property>" +
+ "<property name=\"maxElementsPerNode\" value=\"100\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -41,7 +41,7 @@
{
ElementSizeAlgorithmConfig config = new ElementSizeAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute name=\"maxNodes\">1000</attribute>" +
+ "<property name=\"maxNodes\" value=\"1000\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -64,7 +64,7 @@
{
ElementSizeAlgorithmConfig config = new ElementSizeAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute name=\"maxElementsPerNode\">100</attribute>" +
+ "<property name=\"maxElementsPerNode\" value=\"100\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java 2008-10-23 03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/FIFOConfigurationTest.java 2008-10-23 03:27:15 UTC (rev 7004)
@@ -26,7 +26,7 @@
{
FIFOAlgorithmConfig config = new FIFOAlgorithmConfig();
String xml = "<region name=\"abc\">" +
- "<attribute name=\"maxNodes\">1000</attribute>" +
+ "<property name=\"maxNodes\" value=\"1000\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -63,7 +63,7 @@
{
FIFOAlgorithmConfig config = new FIFOAlgorithmConfig();
String xml = "<region>" +
- "<attribute name=\"maxNodes\">1000</attribute>" +
+ "<property name=\"maxNodes\" value=\"1000\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java 2008-10-23 03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LFUConfigurationTest.java 2008-10-23 03:27:15 UTC (rev 7004)
@@ -27,8 +27,8 @@
LFUAlgorithmConfig config = new LFUAlgorithmConfig();
String xml =
"<region name=\"abc\">" +
- "<attribute name=\"minNodes\">10</attribute>" +
- "<attribute name=\"maxNodes\">20</attribute>" +
+ "<property name=\"minNodes\" value=\"10\"></property>" +
+ "<property name=\"maxNodes\" value=\"20\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -45,7 +45,7 @@
LFUAlgorithmConfig config = new LFUAlgorithmConfig();
String xml =
"<region name=\"abc\">" +
- "<attribute name=\"minNodes\">10</attribute>" +
+ "<property name=\"minNodes\" value=\"10\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -61,7 +61,7 @@
LFUAlgorithmConfig config = new LFUAlgorithmConfig();
String xml =
"<region name=\"abc\">" +
- "<attribute name=\"maxNodes\">20</attribute>" +
+ "<property name=\"maxNodes\" value=\"20\"></property>" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java 2008-10-23 03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LRUConfigurationTest.java 2008-10-23 03:27:15 UTC (rev 7004)
@@ -30,8 +30,8 @@
LRUAlgorithmConfig config = new LRUAlgorithmConfig();
String xml =
"<region name=\"/org/jboss/data\">\n" +
- "<attribute name=\"maxNodes\">5000</attribute>\n" +
- "<attribute name=\"timeToLive\">1000</attribute>\n" +
+ "<property name=\"maxNodes\" value=\"5000\"></property>\n" +
+ "<property name=\"timeToLive\" value=\"1000\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -47,9 +47,9 @@
{
LRUAlgorithmConfig config = new LRUAlgorithmConfig();
String xml = "<region name=\"/maxAgeTest/\">\n" +
- "<attribute name=\"maxNodes\">10000</attribute>\n" +
- "<attribute name=\"timeToLive\">1000</attribute>\n" +
- "<attribute name=\"maxAge\">10</attribute>\n" +
+ "<property name=\"maxNodes\" value=\"10000\"></property>\n" +
+ "<property name=\"timeToLive\" value=\"1000\"></property>\n" +
+ "<property name=\"maxAge\" value=\"10\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -64,8 +64,8 @@
public void testXMLParsing3() throws Exception
{
String xml = "<eviction wakeupInterval=\"30\"><region name=\"/maxAgeTest/\">\n" +
- "<attribute name=\"maxNodes\">10000</attribute>\n" +
- "<attribute name=\"maxAge\">10</attribute>\n" +
+ "<property name=\"maxNodes\" value=\"10000\"></property>\n" +
+ "<property name=\"maxAge\" value=\"10\"></property>\n" +
"</region></eviction>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
boolean caught = false;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java 2008-10-23 03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/MRUConfigurationTest.java 2008-10-23 03:27:15 UTC (rev 7004)
@@ -9,9 +9,9 @@
import org.jboss.cache.config.ConfigurationException;
import org.jboss.cache.config.parsing.XmlConfigHelper;
import org.jboss.cache.config.parsing.element.EvictionElementParser;
-import org.testng.annotations.AfterMethod;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.w3c.dom.Element;
@@ -43,7 +43,7 @@
{
String xml =
"<region name=\"/org/jboss/data\">\n" +
- "<attribute name=\"maxNodes\">5000</attribute>\n" +
+ "<property name=\"maxNodes\" value=\"5000\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -56,7 +56,7 @@
public void testXMLParsing2() throws Exception
{
String xml = "<region name=\"/Test/\">\n" +
- "<attribute name=\"maxNodes\">10000</attribute>\n" +
+ "<property name=\"maxNodes\" value=\"10000\"></property>\n" +
"</region>";
Element element = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -84,7 +84,7 @@
assertTrue("Configure exception should have been caught, maxNodes is required", caught);
xml = "<region name=\"/Test/\">\n" +
- "<attribute name=\"maxNodes\">10000</attribute>\n" +
+ "<property name=\"maxNodes\" value=\"10000\"></property>\n" +
"</region>";
element = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java 2008-10-23 03:18:45 UTC (rev 7003)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/legacy/BackwardCompatibilityTest.java 2008-10-23 03:27:15 UTC (rev 7004)
@@ -2,6 +2,7 @@
import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
+import org.jboss.cache.UnitTestCacheFactory;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionPolicyConfig;
@@ -24,7 +25,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.cache.UnitTestCacheFactory;
@Test(groups = "functional", sequential = false)
public class BackwardCompatibilityTest
@@ -185,7 +185,7 @@
{
String xml = "<jbosscache><eviction wakeUpInterval=\"6\">" +
"<default algorithmClass=\"" + FIFOAlgorithm.class.getName() + "\">" +
- "<attribute name=\"maxNodes\">2</attribute>" +
+ "<property name=\"maxNodes\" value=\"2\"></property>" +
"</default>" +
"</eviction></jbosscache>";
doTest(xml, false);
16 years, 2 months
JBoss Cache SVN: r7003 - in core/trunk/src/main: java/org/jboss/cache and 5 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-10-22 23:18:45 -0400 (Wed, 22 Oct 2008)
New Revision: 7003
Modified:
core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml
core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml
core/trunk/src/main/docbook/userguide/en/modules/jmx_reference.xml
core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.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/RegionManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
core/trunk/src/main/java/org/jboss/cache/lock/MVCCLockManager.java
core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java
core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/LockContainer.java
core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockContainer.java
core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/ReentrantLockContainer.java
Log:
- Updated docs
- Exposed more JMX information
Modified: core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml 2008-10-23 03:18:45 UTC (rev 7003)
@@ -535,6 +535,16 @@
}
}
]]></programlisting>
+ <section>
+ <title>Synchronous and Asynchronous Notifications</title>
+ <para>
+ By default, all notifications are synchronous, in that they happen on the thread of the caller which generated
+ the event. As such, it is good practise to ensure cache listener implementations don't hold up the thread in
+ long-running tasks. Alternatively, you could set the <literal>CacheListener.sync()</literal> attribute to
+ <literal>false</literal>, in which case you will not be notified in the caller's thread. See the
+ <link linkend="element.listeners">configuration reference</link> on tuning this thread pool.
+ </para>
+ </section>
</section>
<section>
Modified: core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2008-10-23 03:18:45 UTC (rev 7003)
@@ -335,7 +335,6 @@
<entry> - </entry>
<entry>urn:jboss:jbosscache-core:config:3.0</entry>
<entry>urn:jboss:jbosscache-core:config:3.0</entry>
- <entry>No</entry>
<entry>Defines the XML namespace for all configuration entries.</entry>
</row>
<row>
@@ -343,7 +342,6 @@
<entry> - </entry>
<entry>http://www.w3.org/2001/XMLSchema-instance</entry>
<entry>http://www.w3.org/2001/XMLSchema-instance</entry>
- <entry>No</entry>
<entry>Defines the XML schema instance for the configuration.</entry>
</row>
</tbody>
Modified: core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml 2008-10-23 03:18:45 UTC (rev 7003)
@@ -178,8 +178,8 @@
...
<eviction wakeUpInterval="500" eventQueueSize="100000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
</eviction>
...
Modified: core/trunk/src/main/docbook/userguide/en/modules/jmx_reference.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/jmx_reference.xml 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/docbook/userguide/en/modules/jmx_reference.xml 2008-10-23 03:18:45 UTC (rev 7003)
@@ -3,158 +3,238 @@
<section id="jmx_reference.statistics">
<title>JBoss Cache Statistics</title>
<para>
- The following table describes the statistics currently available and may be collected via JMX.
+ There is a whole wealth of information being gathered and exposed on to JMX for monitoring the cache. Some
+ of these are detailed below:
</para>
<table>
- <title>JBoss Cache Management Statistics</title>
- <tgroup cols="4">
- <colspec colnum="1" colwidth="2*"/>
- <colspec colnum="2" colwidth="2*"/>
- <colspec colnum="3" colwidth="1*"/>
- <colspec colnum="4" colwidth="3*"/>
+ <title>JBoss Cache JMX MBeans</title>
+ <tgroup cols="3">
<thead>
<row>
- <entry>MBean Name</entry>
- <entry>Attribute</entry>
- <entry>Type</entry>
+ <entry>MBean</entry>
+ <entry>Attribute/Operation Name</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry>ActivationInterceptor</entry>
- <entry>Activations</entry>
- <entry>long</entry>
- <entry>Number of passivated nodes that have been activated.</entry>
+ <entry>DataContainerImpl</entry>
+ <entry>getNumberOfAttributes()</entry>
+ <entry>Returns the number of attributes in all nodes in the data container</entry>
</row>
<row>
- <entry>CacheLoaderInterceptor</entry>
- <entry>CacheLoaderLoads</entry>
- <entry>long</entry>
- <entry>Number of nodes loaded through a cache loader.</entry>
+ <entry></entry>
+ <entry>getNumberOfNodes()</entry>
+ <entry>Returns the number of nodes in the data container</entry>
</row>
<row>
- <entry>CacheLoaderInterceptor</entry>
- <entry>CacheLoaderMisses</entry>
- <entry>long</entry>
- <entry>Number of unsuccessful attempts to load a node through a cache loader.</entry>
+ <entry></entry>
+ <entry>printDetails()</entry>
+ <entry>Prints details of the data container</entry>
</row>
+
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>Hits</entry>
- <entry>long</entry>
- <entry>Number of successful attribute retrievals.</entry>
+ <entry>RPCManagerImpl</entry>
+ <entry>localAddressString</entry>
+ <entry>String representation of the local address</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>Misses</entry>
- <entry>long</entry>
- <entry>Number of unsuccessful attribute retrievals.</entry>
+ <entry></entry>
+ <entry>membersString</entry>
+ <entry>String representation of the cluster view</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>Stores</entry>
- <entry>long</entry>
- <entry>Number of attribute store operations.</entry>
+ <entry></entry>
+ <entry>statisticsEnabled</entry>
+ <entry>Whether RPC statistics are being gathered</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>Evictions</entry>
- <entry>long</entry>
- <entry>Number of node evictions.</entry>
+ <entry></entry>
+ <entry>replicationCount</entry>
+ <entry>Number of successful replications</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>NumberOfAttributes</entry>
- <entry>int</entry>
- <entry>Number of attributes currently cached.</entry>
+ <entry></entry>
+ <entry>replicationFailures</entry>
+ <entry>Number of failed replications</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>NumberOfNodes</entry>
- <entry>int</entry>
- <entry>Number of nodes currently cached.</entry>
+ <entry></entry>
+ <entry>successRatio</entry>
+ <entry>RPC call success ratio</entry>
</row>
+
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>ElapsedTime</entry>
- <entry>long</entry>
- <entry>Number of seconds that the cache has been running.</entry>
+ <entry>RegionManagerImpl</entry>
+ <entry>dumpRegions()</entry>
+ <entry>Dumps a String representation of all registered regions, including eviction regions depicting their event queue sizes</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>TimeSinceReset</entry>
- <entry>long</entry>
- <entry>Number of seconds since the cache statistics have been reset.</entry>
+ <entry></entry>
+ <entry>numRegions</entry>
+ <entry>Number of registered regions</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>AverageReadTime</entry>
- <entry>long</entry>
- <entry>Average time in milliseconds to retrieve a cache attribute, including unsuccessful
- attribute retrievals.
- </entry>
+ <entry>BuddyManager</entry>
+ <entry>buddyGroup</entry>
+ <entry>A String representation of the cache's buddy group</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>AverageWriteTime</entry>
- <entry>long</entry>
- <entry>Average time in milliseconds to write a cache attribute.</entry>
+ <entry></entry>
+ <entry>buddyGroupsIParticipateIn</entry>
+ <entry>String representations of all buddy groups the cache participates in</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>HitMissRatio</entry>
- <entry>double</entry>
- <entry>Ratio of hits to hits and misses. A hit is a get attribute operation that results in an object
- being
- returned to the client. The retrieval may be from a cache loader if the entry isn't in the local
- cache.
- </entry>
+ <entry>TransactionTable</entry>
+ <entry>numberOfRegisteredTransactions</entry>
+ <entry>The number of registered, ongoing transactions</entry>
</row>
<row>
- <entry>CacheMgmtInterceptor</entry>
- <entry>ReadWriteRatio</entry>
- <entry>double</entry>
- <entry>Ratio of read operations to write operations. This is the ratio of cache hits and misses to
- cache stores.
- </entry>
+ <entry></entry>
+ <entry>transactionMap</entry>
+ <entry>A String representation of all currently registered transactions mapped to internal GlobalTransaction instances</entry>
</row>
+
<row>
- <entry>CacheStoreInterceptor</entry>
- <entry>CacheLoaderStores</entry>
- <entry>long</entry>
- <entry>Number of nodes written to the cache loader.</entry>
+ <entry>MVCCLockManager</entry>
+ <entry>concurrencyLevel</entry>
+ <entry>The configured concurrency level</entry>
</row>
<row>
- <entry>InvalidationInterceptor</entry>
- <entry>Invalidations</entry>
- <entry>long</entry>
- <entry>Number of cached nodes that have been invalidated.</entry>
+ <entry></entry>
+ <entry>numberOfLocksAvailable</entry>
+ <entry>Number of locks in the shared lock pool that are not used</entry>
</row>
<row>
- <entry>PassivationInterceptor</entry>
- <entry>Passivations</entry>
- <entry>long</entry>
- <entry>Number of cached nodes that have been passivated.</entry>
+ <entry></entry>
+ <entry>numberOfLocksHeld</entry>
+ <entry>Number of locks in the shared lock pool that are in use</entry>
</row>
<row>
- <entry>TxInterceptor</entry>
- <entry>Prepares</entry>
- <entry>long</entry>
- <entry>Number of transaction prepare operations performed by this interceptor.</entry>
+ <entry></entry>
+ <entry>testHashing(String fqn)</entry>
+ <entry>Tests the spreading of locks across Fqns. For a given (String based) Fqn, this method returns the index in the lock array that it maps to.</entry>
</row>
<row>
- <entry>TxInterceptor</entry>
- <entry>Commits</entry>
- <entry>long</entry>
- <entry>Number of transaction commit operations performed by this interceptor.</entry>
- </row>
- <row>
- <entry>TxInterceptor</entry>
- <entry>Rollbacks</entry>
- <entry>long</entry>
- <entry>Number of transaction rollbacks operations performed by this interceptor.</entry>
- </row>
+ <entry>ActivationInterceptor</entry>
+ <entry>Activations</entry>
+ <entry>Number of passivated nodes that have been activated.</entry>
+ </row>
+ <row>
+ <entry>CacheLoaderInterceptor</entry>
+ <entry>CacheLoaderLoads</entry>
+ <entry>Number of nodes loaded through a cache loader.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>CacheLoaderMisses</entry>
+ <entry>Number of unsuccessful attempts to load a node through a cache loader.</entry>
+ </row>
+ <row>
+ <entry>CacheMgmtInterceptor</entry>
+ <entry>Hits</entry>
+ <entry>Number of successful attribute retrievals.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>Misses</entry>
+ <entry>Number of unsuccessful attribute retrievals.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>Stores</entry>
+ <entry>Number of attribute store operations.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>Evictions</entry>
+ <entry>Number of node evictions.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>NumberOfAttributes</entry>
+ <entry>Number of attributes currently cached.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>NumberOfNodes</entry>
+ <entry>Number of nodes currently cached.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>ElapsedTime</entry>
+ <entry>Number of seconds that the cache has been running.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>TimeSinceReset</entry>
+ <entry>Number of seconds since the cache statistics have been reset.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>AverageReadTime</entry>
+ <entry>Average time in milliseconds to retrieve a cache attribute, including unsuccessful
+ attribute retrievals.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>AverageWriteTime</entry>
+ <entry>Average time in milliseconds to write a cache attribute.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>HitMissRatio</entry>
+ <entry>Ratio of hits to hits and misses. A hit is a get attribute operation that results in an object
+ being
+ returned to the client. The retrieval may be from a cache loader if the entry isn't in the local
+ cache.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>ReadWriteRatio</entry>
+ <entry>Ratio of read operations to write operations. This is the ratio of cache hits and misses to
+ cache stores.
+ </entry>
+ </row>
+ <row>
+ <entry>CacheStoreInterceptor</entry>
+ <entry>CacheLoaderStores</entry>
+ <entry>Number of nodes written to the cache loader.</entry>
+ </row>
+ <row>
+ <entry>InvalidationInterceptor</entry>
+ <entry>Invalidations</entry>
+ <entry>Number of cached nodes that have been invalidated.</entry>
+ </row>
+ <row>
+ <entry>PassivationInterceptor</entry>
+ <entry>Passivations</entry>
+ <entry>Number of cached nodes that have been passivated.</entry>
+ </row>
+ <row>
+ <entry>TxInterceptor</entry>
+ <entry>Prepares</entry>
+ <entry>Number of transaction prepare operations performed by this interceptor.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>Commits</entry>
+ <entry>Number of transaction commit operations performed by this interceptor.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>Rollbacks</entry>
+ <entry>Number of transaction rollbacks operations performed by this interceptor.</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>numberOfSyncsRegistered</entry>
+ <entry>Number of synchronizations registered with the transaction manager pending completion and removal.</entry>
+ </row>
+
+
</tbody>
</tgroup>
</table>
@@ -182,125 +262,64 @@
<tbody>
<row>
<entry>org.jboss.cache.CacheStarted</entry>
- <entry>String : cache service name</entry>
- <entry>cacheStarted</entry>
+ <entry>String: cache service name</entry>
+ <entry>@CacheStarted</entry>
</row>
<row>
<entry>org.jboss.cache.CacheStopped</entry>
- <entry>String : cache service name</entry>
- <entry>cacheStopped</entry>
+ <entry>String: cache service name</entry>
+ <entry>@CacheStopped</entry>
</row>
<row>
<entry>org.jboss.cache.NodeCreated</entry>
- <entry>String : fqn</entry>
- <entry>NodeCreated</entry>
+ <entry>String: fqn, boolean: isPre, boolean: isOriginLocal</entry>
+ <entry>@NodeCreated</entry>
</row>
<row>
<entry>org.jboss.cache.NodeEvicted</entry>
- <entry>String : fqn</entry>
- <entry>NodeEvicted</entry>
+ <entry>String: fqn, boolean: isPre, boolean: isOriginLocal</entry>
+ <entry>@NodeEvicted</entry>
</row>
<row>
<entry>org.jboss.cache.NodeLoaded</entry>
- <entry>String : fqn</entry>
- <entry>NodeLoaded</entry>
+ <entry>String: fqn, boolean: isPre</entry>
+ <entry>@NodeLoaded</entry>
</row>
<row>
<entry>org.jboss.cache.NodeModifed</entry>
- <entry>String : fqn</entry>
- <entry>NodeModifed</entry>
+ <entry>String: fqn, boolean: isPre, boolean: isOriginLocal</entry>
+ <entry>@NodeModifed</entry>
</row>
<row>
<entry>org.jboss.cache.NodeRemoved</entry>
- <entry>String : fqn</entry>
- <entry>NodeRemoved</entry>
+ <entry>String: fqn, boolean: isPre, boolean: isOriginLocal</entry>
+ <entry>@NodeRemoved</entry>
</row>
<row>
<entry>org.jboss.cache.NodeVisited</entry>
- <entry>String : fqn</entry>
- <entry>NodeVisited</entry>
+ <entry>String: fqn, boolean: isPre</entry>
+ <entry>@NodeVisited</entry>
</row>
<row>
- <entry>org.jboss.cache.ViewChange</entry>
- <entry>String : view</entry>
- <entry>ViewChange</entry>
+ <entry>org.jboss.cache.ViewChanged</entry>
+ <entry>String: view</entry>
+ <entry>@ViewChanged</entry>
</row>
<row>
- <entry>org.jboss.cache.NodeActivate</entry>
- <entrytbl cols="1">
- <tbody>
- <row>
- <entry rowsep="0">Object[0]=String: fqn</entry>
- </row>
- <row>
- <entry>Object[1]=Boolean: pre</entry>
- </row>
- </tbody>
- </entrytbl>
- <entry>NodeActivate</entry>
+ <entry>org.jboss.cache.NodeActivated</entry>
+ <entry>String: fqn</entry>
+ <entry>@NodeActivated</entry>
</row>
<row>
- <entry>org.jboss.cache.NodeEvict</entry>
- <entrytbl cols="1">
- <tbody>
- <row>
- <entry rowsep="0">Object[0]=String: fqn</entry>
- </row>
- <row>
- <entry>Object[1]=Boolean: pre</entry>
- </row>
- </tbody>
- </entrytbl>
- <entry>NodeEvict</entry>
+ <entry>org.jboss.cache.NodeMoved</entry>
+ <entry>String: fromFqn, String: toFqn, boolean: isPre</entry>
+ <entry>@NodeMoved</entry>
</row>
<row>
- <entry>org.jboss.cache.NodeModify</entry>
- <entrytbl cols="1">
- <tbody>
- <row>
- <entry rowsep="0">Object[0]=String: fqn</entry>
- </row>
- <row>
- <entry rowsep="0">Object[1]=Boolean: pre</entry>
- </row>
- <row>
- <entry>Object[2]=Boolean: isLocal</entry>
- </row>
- </tbody>
- </entrytbl>
- <entry>NodeModify</entry>
+ <entry>org.jboss.cache.NodePassivated</entry>
+ <entry>String: fqn</entry>
+ <entry>@NodePassivated</entry>
</row>
- <row>
- <entry>org.jboss.cache.NodePassivate</entry>
- <entrytbl cols="1">
- <tbody>
- <row>
- <entry rowsep="0">Object[0]=String: fqn</entry>
- </row>
- <row>
- <entry>Object[1]=Boolean: pre</entry>
- </row>
- </tbody>
- </entrytbl>
- <entry>NodePassivate</entry>
- </row>
- <row>
- <entry>org.jboss.cache.NodeRemove</entry>
- <entrytbl cols="1">
- <tbody>
- <row>
- <entry rowsep="0">Object[0]=String: fqn</entry>
- </row>
- <row>
- <entry rowsep="0">Object[1]=Boolean: pre</entry>
- </row>
- <row>
- <entry>Object[2]=Boolean: isLocal</entry>
- </row>
- </tbody>
- </entrytbl>
- <entry>NodeRemove</entry>
- </row>
</tbody>
</tgroup>
</table>
Modified: core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/DataContainerImpl.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -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;
import org.apache.commons.logging.Log;
@@ -30,6 +30,7 @@
import org.jboss.cache.factories.annotations.NonVolatile;
import org.jboss.cache.factories.annotations.Start;
import org.jboss.cache.factories.annotations.Stop;
+import org.jboss.cache.jmx.annotations.ManagedOperation;
import org.jboss.cache.lock.LockManager;
import org.jboss.cache.marshall.NodeData;
@@ -420,6 +421,7 @@
return num;
}
+ @ManagedOperation(description = "Returns the number of nodes in the data container")
public int getNumberOfNodes()
{
if (!usingMvcc) return numNodes(root) - 1;
@@ -460,6 +462,7 @@
*
* @return details
*/
+ @ManagedOperation(description = "Prints details of the data container")
public String printDetails()
{
StringBuilder sb = new StringBuilder();
@@ -520,6 +523,7 @@
return count;
}
+ @ManagedOperation(description = "Returns the number of attributes in all nodes in the data container")
public int getNumberOfAttributes()
{
return usingMvcc ? numAttributesMvcc(rootInternal) : numAttributes(root);
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -594,11 +594,25 @@
// ------------ START: Informational methods ------------
+ @ManagedAttribute (description = "Local address")
+ public String getLocalAddressString()
+ {
+ Address address = getLocalAddress();
+ return address == null ? "null" : address.toString();
+ }
+
public Address getLocalAddress()
{
return channel != null ? channel.getLocalAddress() : null;
}
+ @ManagedAttribute (description = "Cluster view")
+ public String getMembersString()
+ {
+ List l = getMembers();
+ return l == null ? "null" : l.toString();
+ }
+
public List<Address> getMembers()
{
if (isInLocalMode) return null;
@@ -782,7 +796,7 @@
this.statisticsEnabled = statisticsEnabled;
}
- @ManagedAttribute
+ @ManagedAttribute(description = "RPC call success ratio")
public String getSuccessRatio()
{
if (replicationCount == 0 || !statisticsEnabled)
Modified: core/trunk/src/main/java/org/jboss/cache/RegionImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RegionImpl.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/RegionImpl.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -175,6 +175,7 @@
"; status=" + status +
"; eviction=" + (evictionAlgorithm != null) +
"; timerThreadRegistered=" + (evictionAlgorithm != null && regionManager.getEvictionTimerTask().isRegionRegisteredForProcessing(this)) +
+ "; evictionQueueSize=" + (evictionAlgorithm == null ? "-1" : evictionEventQueue.size()) +
'}';
}
Modified: core/trunk/src/main/java/org/jboss/cache/RegionManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RegionManagerImpl.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/RegionManagerImpl.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -36,6 +36,8 @@
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.factories.annotations.Start;
import org.jboss.cache.factories.annotations.Stop;
+import org.jboss.cache.jmx.annotations.ManagedAttribute;
+import org.jboss.cache.jmx.annotations.ManagedOperation;
import org.jboss.cache.lock.LockManager;
import org.jboss.cache.util.concurrent.locks.LockContainer;
import org.jboss.cache.util.concurrent.locks.ReentrantLockContainer;
@@ -698,6 +700,7 @@
}
}
+ @ManagedOperation(description = "A String representation of all registered regions")
public String dumpRegions()
{
StringBuilder sb = new StringBuilder();
@@ -743,4 +746,10 @@
{
evictionTimerTask.stop();
}
+
+ @ManagedAttribute(name="numRegions", description = "A count of all regions")
+ public int getNumRegions()
+ {
+ return regionsRegistry.size();
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/buddyreplication/BuddyManager.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -48,6 +48,7 @@
import org.jboss.cache.factories.annotations.Start;
import org.jboss.cache.factories.annotations.Stop;
import org.jboss.cache.io.ExposedByteArrayOutputStream;
+import org.jboss.cache.jmx.annotations.ManagedAttribute;
import org.jboss.cache.lock.TimeoutException;
import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.notifications.annotation.CacheListener;
@@ -1300,4 +1301,16 @@
}
}
}
+
+ @ManagedAttribute(description = "A String representation of the cache's buddy group")
+ public String getBuddyGroup()
+ {
+ return buddyGroup.toString();
+ }
+
+ @ManagedAttribute(description = "A String representation of buddy groups the cache participates in")
+ public String getBuddyGroupsIParticipateIn()
+ {
+ return buddyGroupsIParticipateIn.toString();
+ }
}
\ No newline at end of file
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -1148,4 +1148,10 @@
{
return rollbacks;
}
+
+ @ManagedAttribute(name = "numberOfSyncsRegistered", writable = false, description = "number of transaction synchronizations currently registered")
+ public int getNumberOfSyncsRegistered()
+ {
+ return transactions.size();
+ }
}
\ No newline at end of file
Modified: core/trunk/src/main/java/org/jboss/cache/lock/MVCCLockManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/lock/MVCCLockManager.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/lock/MVCCLockManager.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -33,6 +33,8 @@
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.factories.annotations.Start;
import org.jboss.cache.invocation.InvocationContextContainer;
+import org.jboss.cache.jmx.annotations.ManagedAttribute;
+import org.jboss.cache.jmx.annotations.ManagedOperation;
import static org.jboss.cache.lock.LockType.READ;
import org.jboss.cache.util.concurrent.locks.LockContainer;
import org.jboss.cache.util.concurrent.locks.OwnableReentrantLock;
@@ -302,4 +304,28 @@
{
return lockContainer.toString();
}
+
+ @ManagedAttribute(name = "concurrency level", writable = false, description = "The concurrency level that the MVCC Lock Manager has been configured with.")
+ public int getConcurrencyLevel()
+ {
+ return configuration.getConcurrencyLevel();
+ }
+
+ @ManagedAttribute(name = "locks held", writable = false, description = "The number of exclusive locks that are held.")
+ public int getNumberOfLocksHeld()
+ {
+ return lockContainer.getNumLocksHeld();
+ }
+
+ @ManagedAttribute(name = "locks held", writable = false, description = "The number of exclusive locks that are available.")
+ public int getNumberOfLocksAvailable()
+ {
+ return lockContainer.size() - lockContainer.getNumLocksHeld();
+ }
+
+ @ManagedOperation(description = "Tests the spreading of locks across Fqns. For a given (String based) Fqn, this method returns the index in the lock array that it maps to.")
+ public int testHashing(String fqn)
+ {
+ return lockContainer.hashToIndex(Fqn.fromString(fqn));
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -29,6 +29,7 @@
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.jmx.annotations.ManagedAttribute;
import org.jgroups.Address;
import javax.transaction.Status;
@@ -423,4 +424,16 @@
}
return gtx;
}
+
+ @ManagedAttribute(name="numberOfRegisteredTransactions", description = "Number of registered transactions")
+ public int getNumberOfRegisteredTransactions()
+ {
+ return tx2gtxMap.size();
+ }
+
+ @ManagedAttribute(name="transactionMap", description = "A String representation of the transaction map")
+ public String getTransactionMap()
+ {
+ return tx2gtxMap.toString();
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/LockContainer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/LockContainer.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/LockContainer.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -111,4 +111,6 @@
* Clears all locks held and re-initialises stripes.
*/
public abstract void reset();
+
+ public abstract int size();
}
Modified: core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockContainer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockContainer.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLockContainer.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -93,4 +93,9 @@
{
initLocks(sharedLocks.length);
}
+
+ public int size()
+ {
+ return sharedLocks.length;
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/ReentrantLockContainer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/ReentrantLockContainer.java 2008-10-23 01:10:13 UTC (rev 7002)
+++ core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/ReentrantLockContainer.java 2008-10-23 03:18:45 UTC (rev 7003)
@@ -89,4 +89,9 @@
{
initLocks(sharedLocks.length);
}
+
+ public int size()
+ {
+ return sharedLocks.length;
+ }
}
16 years, 2 months
JBoss Cache SVN: r7002 - in core/trunk/src: main/docbook/userguide/en/modules and 15 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-10-22 21:10:13 -0400 (Wed, 22 Oct 2008)
New Revision: 7002
Added:
core/trunk/src/main/docbook/images/writeskew.png
core/trunk/src/main/resources/config-samples/all.xml
core/trunk/src/main/resources/config-samples/external-jgroups-file.xml
core/trunk/src/main/resources/config-samples/string-property-replaced.xml
Removed:
core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTest.java
core/trunk/src/test/resources/configs/repl-with-cl.xml
core/trunk/src/test/resources/configs/repl-with-cl2.xml
core/trunk/src/test/resources/jbc2-registry-configs.xml
Modified:
core/trunk/src/main/docbook/userguide/en/modules/architecture.xml
core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml
core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml
core/trunk/src/main/docbook/userguide/en/modules/configuration.xml
core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml
core/trunk/src/main/docbook/userguide/en/modules/introduction.xml
core/trunk/src/main/docbook/userguide/en/modules/preface.xml
core/trunk/src/main/docbook/userguide/en/modules/replication.xml
core/trunk/src/main/docbook/userguide/en/modules/transactions.xml
core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/config/Configuration.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/config/parsing/element/CustomInterceptorsElementParser.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java
core/trunk/src/main/java/org/jboss/cache/interceptors/base/CommandInterceptor.java
core/trunk/src/main/java/org/jboss/cache/util/FileLookup.java
core/trunk/src/main/resources/config-samples/buddy-replication.xml
core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml
core/trunk/src/main/resources/config-samples/eviction-enabled.xml
core/trunk/src/main/resources/config-samples/invalidation-async.xml
core/trunk/src/main/resources/config-samples/local.xml
core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml
core/trunk/src/main/resources/config-samples/total-replication.xml
core/trunk/src/main/resources/config2to3.xslt
core/trunk/src/main/resources/schema/jbosscache-config-3.0.xsd
core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java
core/trunk/src/test/java/org/jboss/cache/config/StringPropertyReplacementTest.java
core/trunk/src/test/java/org/jboss/cache/config/parsing/CacheConfigsTest.java
core/trunk/src/test/java/org/jboss/cache/config/parsing/Eviction2xto3xCompatibilityTest.java
core/trunk/src/test/java/org/jboss/cache/config/parsing/EvictionElementParserTest.java
core/trunk/src/test/java/org/jboss/cache/config/parsing/SampleConfigFilesCorrectnessTest.java
core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java
core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java
core/trunk/src/test/resources/configs/buddy-replication-cache.xml
core/trunk/src/test/resources/configs/clonable-config.xml
core/trunk/src/test/resources/configs/conf2x/clonable-config.xml
core/trunk/src/test/resources/configs/conf2x/multiplexer-enabled-cache.xml
core/trunk/src/test/resources/configs/conf2x/optimistically-locked-cache.xml
core/trunk/src/test/resources/configs/conf2x/policyPerRegion-eviction.xml
core/trunk/src/test/resources/configs/local-lru-eviction.xml
core/trunk/src/test/resources/configs/local-passivation.xml
core/trunk/src/test/resources/configs/local-tx.xml
core/trunk/src/test/resources/configs/mixedPolicy-eviction.xml
core/trunk/src/test/resources/configs/mux.xml
core/trunk/src/test/resources/configs/mvcc-repl-sync-br.xml
core/trunk/src/test/resources/configs/parser-test-async.xml
core/trunk/src/test/resources/configs/parser-test.xml
core/trunk/src/test/resources/configs/policyPerRegion-eviction.xml
core/trunk/src/test/resources/configs/replSync.xml
core/trunk/src/test/resources/configs/string-property-replaced.xml
core/trunk/src/test/resources/jbc3-registry-configs.xml
core/trunk/src/test/resources/log4j.xml
core/trunk/src/test/resources/unit-test-cache-service.xml
Log:
- Updated docs
- Improved the XML file format
- Patched parser, XSLT transformer
- Updated sample configs we ship with
Added: core/trunk/src/main/docbook/images/writeskew.png
===================================================================
(Binary files differ)
Property changes on: core/trunk/src/main/docbook/images/writeskew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: core/trunk/src/main/docbook/userguide/en/modules/architecture.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/architecture.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/architecture.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -227,7 +227,7 @@
<section id="architecture.buddymanager">
<title>BuddyManager</title>
<para>
- This class manages buddy groups and invokes group organisation remote calls to organise a cluster of
+ This class manages buddy groups and invokes group organization remote calls to organize a cluster of
caches into smaller sub-groups.
</para>
</section>
@@ -260,7 +260,7 @@
<literal>ObjectOutputStream</literal>
during replication. Over various releases in the JBoss Cache 1.x.x series this approach was gradually
deprecated
- in favour of a more mature marshalling framework. In the JBoss Cache 2.x.x series, this is the only officially
+ in favor of a more mature marshalling framework. In the JBoss Cache 2.x.x series, this is the only officially
supported and recommended mechanism for writing objects to datastreams.
</para>
<figure>
Modified: core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/basic_api.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -106,7 +106,7 @@
// let's store some data in the node
peterGriffin.put("isCartoonCharacter", Boolean.TRUE);
- peterGriffin.put("favouriteDrink", new Beer());
+ peterGriffin.put("favoriteDrink", new Beer());
// some tests (just assume this code is in a JUnit test case)
assertTrue(peterGriffin.get("isCartoonCharacter"));
@@ -115,14 +115,14 @@
Set keys = new HashSet();
keys.add("isCartoonCharacter");
- keys.add("favouriteDrink");
+ keys.add("favoriteDrink");
assertEquals(keys, peterGriffin.getKeys());
// let's remove some data from the node
- peterGriffin.remove("favouriteDrink");
+ peterGriffin.remove("favoriteDrink");
- assertNull(peterGriffin.get("favouriteDrink");
+ assertNull(peterGriffin.get("favoriteDrink");
// let's remove the node altogether
rootNode.removeChild(peterGriffinFqn);
@@ -139,14 +139,14 @@
Fqn peterGriffinFqn = Fqn.fromString("/griffin/peter");
cache.put(peterGriffinFqn, "isCartoonCharacter", Boolean.TRUE);
- cache.put(peterGriffinFqn, "favouriteDrink", new Beer());
+ cache.put(peterGriffinFqn, "favoriteDrink", new Beer());
assertTrue(peterGriffin.get(peterGriffinFqn, "isCartoonCharacter"));
assertTrue(cache.getRootNode().hasChild(peterGriffinFqn));
- cache.remove(peterGriffinFqn, "favouriteDrink");
+ cache.remove(peterGriffinFqn, "favoriteDrink");
- assertNull(cache.get(peterGriffinFqn, "favouriteDrink");
+ assertNull(cache.get(peterGriffinFqn, "favoriteDrink");
cache.removeNode(peterGriffinFqn);
Modified: core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/cache_loaders.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -125,8 +125,7 @@
</para>
<para>See the javadocs on this interface for a detailed explanation on each method and the contract
- implementations
- would need to fulfil.
+ implementations would need to fulfill.
</para>
</section>
@@ -299,7 +298,7 @@
.
</para>
- <section>
+ <section id="sscl">
<title>Singleton Store Configuration</title>
<programlisting role="XML"><![CDATA[
@@ -364,7 +363,7 @@
<para>
The
<literal>properties</literal>
- subelement defines properties that allow changing the behaivour of the
+ subelement defines properties that allow changing the behavior of the
class providing the singleton store functionality. By default,
<literal>pushStateWhenCoordinator</literal>
and
@@ -438,7 +437,7 @@
<section>
<title>File system based cache loaders</title>
<para>
- JBoss Cache ships with several cache loaders that utilise the file system as a data store. They all require
+ JBoss Cache ships with several cache loaders that utilize the file system as a data store. They all require
that the
<literal><![CDATA[<loader><properties>]]></literal>
configuration element
@@ -926,7 +925,7 @@
at runtime. This runtime library may be obtained through a Sourceforge Maven
Repository. Include the following sections in your pom.xml file:
</para>
- <programlisting><![CDATA[
+ <programlisting role="XML"><![CDATA[
<repository>
<id>e-xml.sourceforge.net</id>
<url>http://e-xml.sourceforge.net/maven2/repository</url>
@@ -1036,7 +1035,7 @@
<literal>cache.s3.location</literal>
-
This choses a primary storage location for your data
- to reduce loading and retrevial latency.
+ to reduce loading and retrieval latency.
Set to <literal>EU</literal>
to store data in Europe.
The default is <literal>null</literal>, to store data in
@@ -1143,7 +1142,7 @@
<literal>JDBCCacheLoader</literal>
based cache stores has changed in JBoss Cache 2.0 in such way that
these cache loaders now write and read data using the same marhalling framework used to replicate data
- accross the network. Such change is trivial for replication purpouses as it just requires the rest of the
+ across the network. Such change is trivial for replication purposes as it just requires the rest of the
nodes to understand this format. However, changing the format of the data in cache stores brings up a new
problem: how do users, which have their data stored in JBoss Cache 1.x.x format, migrate their stores to
JBoss Cache 2.0 format?
@@ -1514,7 +1513,7 @@
is used, with references to each
cache loader you have configured. Use cases vary depending on the type of cache loaders used in the chain.
One example is
- using a filesystem based cache loader, colocated on the same host as the JVM, used as an overflow for
+ using a filesystem based cache loader, co-located on the same host as the JVM, used as an overflow for
memory. This ensures
data is available relatively easily and with low cost. An additional remote cache loader, such as a
<literal>TcpDelegatingCacheLoader</literal>
Modified: core/trunk/src/main/docbook/userguide/en/modules/configuration.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/configuration.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/configuration.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -308,12 +308,15 @@
before invoking your method on the cache.
</para>
<para>
- E.g., to override the default node versioning used with optimistic locking:
+ E.g., to force a write lock when reading data (when used in a transaction, this provides semantics
+ similar to SELECT FOR UPDATE in a database)
</para>
<programlisting role="JAVA"><![CDATA[
- DataVersion v = new MyCustomDataVersion();
- cache.getInvocationContext().getOptionOverrides().setDataVersion(v);
- Node ch = cache.getRoot().addChild(Fqn.fromString("/a/b/c"));
+ // first start a transaction
+ cache.getInvocationContext().getOptionOverrides().setForceWriteLock(true);
+ Node n = cache.getNode(Fqn.fromString("/a/b/c"));
+ // make changes to the node
+ // commit transaction
]]></programlisting>
<para>
Modified: core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -4,738 +4,3351 @@
<title>Sample XML Configuration File</title>
<para>
This is what a typical XML configuration file looks like. It is recommended that you use one of the
- configurations
- shipped with the JBoss Cache distribution and tweak according to your needs rather than write one from scratch.
+ configurations shipped with the JBoss Cache distribution and tweak according to your needs rather than write
+ one from scratch.
</para>
<programlisting role="XML"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Sample JBoss Cache Service Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
-<server>
-
- <!-- ==================================================================== -->
- <!-- Defines JBoss Cache configuration -->
- <!-- ==================================================================== -->
- <!-- Note the value of the 'code' attribute has changed since JBC 1.x -->
- <mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=Cache">
-
- <!-- Ensure JNDI and the TransactionManager are started before the
- cache. Only works inside JBoss AS; ignored otherwise -->
- <depends>jboss:service=Naming</depends>
- <depends>jboss:service=TransactionManager</depends>
+ <!--
+ isolation levels supported: READ_COMMITTED and REPEATABLE_READ
+ nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic (deprecated)
+ -->
+ <locking
+ isolationLevel="REPEATABLE_READ"
+ lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000"
+ nodeLockingScheme="mvcc"
+ writeSkewCheck="false"
+ concurrencyLevel="500"/>
- <!-- Configure the TransactionManager -->
- <attribute name="TransactionManagerLookupClass">
- org.jboss.cache.transaction.GenericTransactionManagerLookup
- </attribute>
+ <!--
+ Used to register a transaction manager and participate in ongoing transactions.
+ -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"
+ syncRollbackPhase="false"
+ syncCommitPhase="false"/>
- <!-- Node locking level : SERIALIZABLE
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED
- NONE -->
- <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+ <!--
+ Used to register JMX statistics in any available MBean server
+ -->
+ <jmxStatistics
+ enabled="false"/>
- <!-- Lock parent before doing node additions/removes -->
- <attribute name="LockParentForChildInsertRemove">true</attribute>
+ <!--
+ If region based marshalling is used, defines whether new regions are inactive on startup.
+ -->
+ <startup
+ regionsInactiveOnStartup="true"/>
- <!-- Valid modes are LOCAL (default)
- REPL_ASYNC
- REPL_SYNC
- INVALIDATION_ASYNC
- INVALIDATION_SYNC -->
- <attribute name="CacheMode">REPL_ASYNC</attribute>
+ <!--
+ Used to register JVM shutdown hooks.
+ hookBehavior: DEFAULT, REGISTER, DONT_REGISTER
+ -->
+ <shutdown
+ hookBehavior="DEFAULT"/>
- <!-- Name of cluster. Needs to be the same for all JBoss Cache nodes in a
- cluster in order to find each other.
+ <!--
+ Used to define async listener notification thread pool size
+ -->
+ <listeners
+ asyncPoolSize="1"/>
+
+ <!--
+ Used to enable invocation batching and allow the use of Cache.startBatch()/endBatch() methods.
+ -->
+ <invocationBatching
+ enabled="false"/>
+
+ <!--
+ serialization related configuration, used for replication and cache loading
+ -->
+ <serialization
+ objectInputStreamPoolSize="12"
+ objectOutputStreamPoolSize="14"
+ version="3.0.0"
+ marshallerClass="org.jboss.cache.marshall.VersionAwareMarshaller"
+ useLazyDeserialization="false"
+ useRegionBasedMarshalling="false"/>
+
+ <!--
+ This element specifies that the cache is clustered.
+ modes supported: replication (r) or invalidation (i).
+ -->
+ <clustering mode="replication" clusterName="JBossCache-cluster">
+
+ <!--
+ Defines whether to retrieve state on startup
-->
- <attribute name="ClusterName">JBossCache-Cluster</attribute>
+ <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
- <!--Uncomment next three statements to use the JGroups multiplexer.
- This configuration is dependent on the JGroups multiplexer being
- registered in an MBean server such as JBossAS. This type of
- dependency injection only works in the AS; outside it's up to
- your code to inject a ChannelFactory if you want to use one.
+ <!--
+ Network calls are synchronous.
-->
+ <sync replTimeout="20000"/>
<!--
- <depends optional-attribute-name="MultiplexerService"
- proxy-type="attribute">jgroups.mux:name=Multiplexer</depends>
- <attribute name="MultiplexerStack">tcp</attribute>
+ Uncomment this for async replication.
-->
+ <!-- <async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500" serializationExecutorPoolSize="20" /> -->
- <!-- JGroups protocol stack properties.
- ClusterConfig isn't used if the multiplexer is enabled above.
- -->
- <attribute name="ClusterConfig">
- <config>
- <!-- UDP: if you have a multihomed machine, set the bind_addr
- attribute to the appropriate NIC IP address -->
- <!-- UDP: On Windows machines, because of the media sense feature
- being broken with multicast (even after disabling media sense)
- set the loopback attribute to true -->
- <UDP mcast_addr="228.1.2.3" mcast_port="48866"
- ip_ttl="64" ip_mcast="true"
- mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
- ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
- loopback="false"/>
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 min_interval="10000" max_interval="20000"/>
- <FD shun="true"/>
- <FD_SOCK/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" />
- <UNICAST timeout="600,1200,2400",4800/>
- <pbcast.STABLE desired_avg_gossip="400000"/>
- <FC max_credits="2000000" min_threshold="0.10"/>
- <FRAG2 frag_size="8192"/>
- <pbcast.GMS join_timeout="5000" shun="true" print_local_addr="true"/>
- <pbcast.STATE_TRANSFER/>
- </config>
- </attribute>
-
+ <!-- Uncomment to use Buddy Replication -->
<!--
- The max amount of time (in milliseconds) we wait until the
- initial state (ie. the contents of the cache) are retrieved from
- existing members in a clustered environment
+ <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
+ <dataGravitation auto="true" removeOnFind="true" searchBackupTrees="true"/>
+ <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
+ <properties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </properties>
+ </locator>
+ </buddy>
-->
- <attribute name="StateRetrievalTimeout">20000</attribute>
<!--
- Number of milliseconds to wait until all responses for a
- synchronous call have been received.
+ Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml
+ ships with jgroups.jar and will be picked up by the class loader.
-->
- <attribute name="SyncReplTimeout">20000</attribute>
+ <jgroupsConfig configFile="udp.xml">
+ <!-- uncomment to define a JGroups stack here
- <!-- Max number of milliseconds to wait for a lock acquisition -->
- <attribute name="LockAcquisitionTimeout">15000</attribute>
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <pbcast.FLUSH timeout="0"/>
+ -->
+ </jgroupsConfig>
+ </clustering>
- <!-- Shutdown hook behavior. Valid choices are: DEFAULT, REGISTER and DONT_REGISTER.
- If this element is omitted, DEFAULT is used. -->
- <attribute name="ShutdownHookBehavior">DEFAULT</attribute>
+ <!--
+ Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means
+ the eviction thread will never run.
+ -->
+ <eviction wakeUpInterval="500">
+ <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
+ </default>
+ <region name="/org/jboss/data1">
+ <property name="timeToLive" value="2000" />
+ </region>
+ <region name="/org/jboss/data2" algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="100000">
+ <property name="maxNodes" value="3000" />
+ <property name="minTimeToLive" value="4000" />
+ </region>
+ </eviction>
- <!-- Enables or disables lazy unmarshalling. If omitted, the default is that lazy unmarshalling is enabled. -->
- <attribute name="UseLazyDeserialization">true</attribute>
+ <!--
+ Cache loaders.
- <!-- Specific eviction policy configurations. This is LRU -->
- <attribute name="EvictionConfig">
- <config>
- <attribute name="wakeUpIntervalSeconds">5</attribute>
- <!-- This defaults to 200000 if not specified -->
- <attribute name="eventQueueSize">200000</attribute>
- <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted. Similarly, when the state
+ is accessed again, it is removed from the cache loader and loaded into memory.
- <!-- Cache wide default -->
- <region name="/_default_">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLiveSeconds">1000</attribute>
- </region>
- <region name="/org/jboss/data">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLiveSeconds">1000</attribute>
- </region>
- <region name="/org/jboss/test/data">
- <attribute name="maxNodes">5</attribute>
- <attribute name="timeToLiveSeconds">4</attribute>
- </region>
- <region name="/test">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLiveSeconds">4</attribute>
- </region>
- <region name="/maxAgeTest">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLiveSeconds">8</attribute>
- <attribute name="maxAgeSeconds">10</attribute>
- </region>
- </config>
- </attribute>
- </mbean>
-</server>
+ Otherwise, state is always maintained in the cache loader as well as in memory.
+
+ Set 'shared' to true if all instances in the cluster use the same cache loader instance, e.g., are talking to the
+ same database.
+ -->
+ <loaders passivation="false" shared="false">
+ <preload>
+ <node fqn="/org/jboss"/>
+ <node fqn="/org/tempdata"/>
+ </preload>
+
+ <!--
+ we can have multiple cache loaders, which get chained
+ -->
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true"
+ ignoreModifications="true" purgeOnStartup="true">
+ <properties>
+ cache.jdbc.table.name=jbosscache
+ cache.jdbc.table.create=true
+ cache.jdbc.table.drop=true
+ </properties>
+ <singletonStore enabled="true" class="org.jboss.cache.loader.SingletonStoreCacheLoader">
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=20000
+ </properties>
+ </singletonStore>
+ </loader>
+ </loaders>
+
+ <!--
+ Define custom interceptors. All custom interceptors need to extend org.jboss.cache.interceptors.base.CommandInterceptor
+ -->
+ <!--
+ <customInterceptors>
+ <interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor">
+ <property name="attrOne" value="value1" />
+ <property name="attrTwo" value="value2" />
+ </interceptor>
+ <interceptor position="last" class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/>
+ <interceptor index="3" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/>
+ <interceptor before="org.jboss.cache.interceptors.CallInterceptor"
+ class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/>
+ <interceptor after="org.jboss.cache.interceptors.CallInterceptor"
+ class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/>
+ </customInterceptors>
+ -->
+</jbosscache>
+
+
]]></programlisting>
+ <section>
+ <title>XML validation</title>
+ <para>
+ Configuration XML files are validated using an XSD schema. This schema is included in
+ <literal>jbosscache-core.jar</literal> and is also available online: <literal>http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd</literal>.
+ Most IDEs and XML authoring tools will be able to use this schema to validate your configuration file as you
+ write it.
+ </para>
+ <para>
+ JBoss Cache also validates your configuration file when you start up, and will throw an exception if it
+ encounters an invalid file. You can suppress this behavior by passing in <literal>-Djbosscache.config.validate=false</literal>
+ to your JVM when you start up. Alternatively, you can point the validator to a different schema by
+ passing in <literal>-Djbosscache.config.schemaLocation=url</literal>.
+ </para>
+ </section>
</section>
<section id="configuration_reference">
<title>
- Reference table of XML attributes
+ Configuration File Quick Reference
</title>
- <para>A list of definitions of each of the XML attributes used above. If the
- description of an attribute states that it is
- <emphasis>dynamic</emphasis>
- ,
+ <para>A list of definitions of each of the XML elements attributes used above, and their bean counterparts for
+ programmatic configuration. If the description of an attribute states that it is <emphasis>dynamic</emphasis>,
that means it can be changed after the cache is created and started.
</para>
- <informaltable frame="all">
- <tgroup cols="2">
- <tbody>
+ <table id="element.jbosscache">
+ <title>The <literal><![CDATA[<jbosscache />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
<row>
+ <entry spanname="hspan">The <literal><![CDATA[<jbosscache />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
<entry>
- <para>Name</para>
+ <para><emphasis role="bold">Description</emphasis></para>
</entry>
<entry>
- <para>Description</para>
+ <para>
+ This is the root element for the JBoss Cache configuration file. This is the only mandatory
+ element in a valid JBoss Cache configuration file.
+ </para>
</entry>
</row>
+
<row>
<entry>
- <para>BuddyReplicationConfig</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>An XML element that contains detailed buddy replication
- configuration. See
- <link linkend="br">section on Buddy Replication</link>
- for details.
+ <para>none (is root element)</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.clustering"><literal><![CDATA[<clustering />]]></literal></link>,
+ <link linkend="element.customInterceptors"><literal><![CDATA[<customInterceptors />]]></literal></link>,
+ <link linkend="element.eviction"><literal><![CDATA[<eviction />]]></literal></link>,
+ <link linkend="element.invocationBatching"><literal><![CDATA[<invocationBatching />]]></literal></link>,
+ <link linkend="element.jmxStatistics"><literal><![CDATA[<jmxStatistics />]]></literal></link>,
+ <link linkend="element.listeners"><literal><![CDATA[<listeners />]]></literal></link>,
+ <link linkend="element.loaders"><literal><![CDATA[<loaders />]]></literal></link>,
+ <link linkend="element.locking"><literal><![CDATA[<locking />]]></literal></link>,
+ <link linkend="element.serialization"><literal><![CDATA[<serialization />]]></literal></link>,
+ <link linkend="element.shutdown"><literal><![CDATA[<shutdown />]]></literal></link>,
+ <link linkend="element.startup"><literal><![CDATA[<startup />]]></literal></link>,
+ <link linkend="element.transaction"><literal><![CDATA[<transaction />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>CacheLoaderConfig</para>
+ <para><emphasis role="bold">Bean Equivalent</emphasis></para>
</entry>
<entry>
- <para>An XML element that contains detailed cache loader
- configuration. See
- <link linkend="cache_loaders">chapter on Cache Loaders</link>
- for details.
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.jbosscache">
+ <title><literal><![CDATA[<jbosscache />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<jbosscache />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">xmlns</emphasis></entry>
+ <entry> - </entry>
+ <entry>urn:jboss:jbosscache-core:config:3.0</entry>
+ <entry>urn:jboss:jbosscache-core:config:3.0</entry>
+ <entry>No</entry>
+ <entry>Defines the XML namespace for all configuration entries.</entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">xmlns:xsi</emphasis></entry>
+ <entry> - </entry>
+ <entry>http://www.w3.org/2001/XMLSchema-instance</entry>
+ <entry>http://www.w3.org/2001/XMLSchema-instance</entry>
+ <entry>No</entry>
+ <entry>Defines the XML schema instance for the configuration.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.locking">
+ <title>The <literal><![CDATA[<locking />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<locking />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element specifies locking behavior on the cache.
</para>
</entry>
</row>
<row>
<entry>
- <para>CacheLoaderConfiguration</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.locking">
+ <title><literal><![CDATA[<locking />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<locking />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">isolationLevel</emphasis></entry>
+ <entry>isolationLevel</entry>
+ <entry>READ_COMMITTED, REPEATABLE_READ</entry>
+ <entry>REPEATABLE_READ</entry>
+
+ <entry>The isolation level used for transactions.</entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">lockParentForChildInsertRemove</emphasis></entry>
+ <entry>lockParentForChildInsertRemove</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+
+ <entry>Specifies whether parent nodes are locked when inserting or removing children. This
+ can also be configured on a per-node basis (see <literal>Node.setLockForChildInsertRemove()</literal></entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">lockAcquisitionTimeout</emphasis></entry>
+ <entry>lockAcquisitionTimeout
+ (<emphasis>dynamic</emphasis>)</entry>
+ <entry>Any positive long value</entry>
+ <entry>10000</entry>
+
+ <entry>Length of time, in milliseconds, that a thread will try and acquire a lock. A <literal>TimeoutException</literal>
+ is usually thrown if a lock cannot be acquired in this given timeframe. Can be overridden
+ on a per-invocation basis using <literal>Option.setLockAcquisitionTimeout()</literal></entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">nodeLockingScheme</emphasis>
+ (<emphasis>deprecated</emphasis>)</entry>
+ <entry>nodeLockingScheme</entry>
+ <entry>mvcc, pessimistic, optimistic</entry>
+ <entry>mvcc</entry>
+
+ <entry>Specifies the node locking scheme to be used.</entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">writeSkewCheck</emphasis></entry>
+ <entry>writeSkewCheck</entry>
+ <entry>true, false</entry>
+ <entry>true</entry>
+
+ <entry>Specifies whether to check for write skews. Only used if <literal>nodeLockingScheme</literal>
+ is <literal>mvcc</literal> and <literal>isolationLevel</literal> is <literal>REPEATABLE_READ</literal>.
+ See the <link linkend="mvcc.writeskew">section on write skews</link> for a more detailed discussion.</entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">concurrencyLevel</emphasis></entry>
+ <entry>concurrencyLevel</entry>
+ <entry>Any positive integer; 0 not allowed.</entry>
+ <entry>500</entry>
+
+ <entry>Specifies the number of shared locks to use for write locks acquired. Only used if <literal>nodeLockingScheme</literal>
+ is <literal>mvcc</literal>. See the <link linkend="mvcc.impl">section on JBoss Cache's MVCC implementation</link> for a more detailed discussion.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.transaction">
+ <title>The <literal><![CDATA[<transaction />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<transaction />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
<para>
- <emphasis>Deprecated</emphasis>
- . Use
- <literal>CacheLoaderConfig</literal>
- .
+ This element specifies transactional behavior on the cache.
</para>
</entry>
</row>
<row>
<entry>
- <para>CacheMode</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>LOCAL, REPL_SYNC, REPL_ASYNC, INVALIDATION_SYNC or
- INVALIDATION_ASYNC. Defaults to LOCAL. See the
- <link linkend="clustering">chapter on Clustering</link>
- for details.
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.transaction">
+ <title><literal><![CDATA[<transaction />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<transaction />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">transactionManagerLookupClass</emphasis></entry>
+ <entry>transactionManagerLookupClass</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>none</entry>
+
+ <entry>Specifies the <literal>TransactionManagerLookupClass</literal> implementation to use to obtain
+ a transaction manager. If not specified (and a <literal>TransactionManager</literal> is not injected
+ using <literal>RuntimeConfig.setTransactionManager()</literal>, the cache will not be able to participate
+ in any transactions.</entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">syncCommitPhase</emphasis></entry>
+ <entry>syncCommitPhase
+ (<emphasis>dynamic</emphasis>)
+ </entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+
+ <entry>If enabled, commit messages that are broadcast around a cluster are done so synchronously. This is
+ usually of little value since detecting a failure in broadcasting a commit means little else can be done
+ except log a message, since some nodes in a cluster may have already committed and cannot rollback.</entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">syncRollbackPhase</emphasis></entry>
+ <entry>syncRollbackPhase
+ (<emphasis>dynamic</emphasis>)
+ </entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+
+ <entry>If enabled, rollback messages that are broadcast around a cluster are done so synchronously. This is
+ usually of little value since detecting a failure in broadcasting a rollback means little else can be done
+ except log a message, since some nodes in a cluster may have already committed and cannot rollback.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.jmxStatistics">
+ <title>The <literal><![CDATA[<jmxStatistics />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<jmxStatistics />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element specifies whether cache statistics are gathered and reported via JMX.
</para>
</entry>
</row>
<row>
<entry>
- <para>ClusterConfig</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>The configuration of the underlying JGroups stack.
- Ignored if
- <literal>MultiplexerService</literal>
- and
- <literal>MultiplexerStack</literal>
- are used.
- See the various *-service.xml files in the source distribution
- <literal>etc/config-samples</literal>
- folder for examples.
- See the
- <ulink url="http://www.jgroups.org">JGroups documentation</ulink>
- or the
- <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=JGroups">JGroups wiki page</ulink>
- for more information.
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.jmxStatistics">
+ <title><literal><![CDATA[<jmxStatistics />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<jmxStatistics />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">enabled</emphasis></entry>
+ <entry>exposeManagementStatistics</entry>
+ <entry>true, false</entry>
+ <entry>true</entry>
+
+ <entry>Controls whether cache statistics are gathered and exposed via JMX.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.startup">
+ <title>The <literal><![CDATA[<startup />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<startup />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element specifies behavior when the cache starts up.
</para>
</entry>
</row>
<row>
<entry>
- <para>ClusterName</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>Name of cluster. Needs to be the same for all nodes in a
- cluster in order for them to communicate with each other.
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.startup">
+ <title><literal><![CDATA[<startup />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<startup />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">regionsInactiveOnStartup</emphasis></entry>
+ <entry>inactiveOnStartup</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+
+ <entry>If <link linkend="architecture.regions">region-based marshalling</link> is enabled, this
+ attribute controls whether new regions created are inactive on startup.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.shutdown">
+ <title>The <literal><![CDATA[<shutdown />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<shutdown />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element specifies behavior when the cache shuts down.
</para>
</entry>
</row>
+
<row>
<entry>
- <para>EvictionPolicyConfig</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>Configuration parameter for the specified eviction policy.
- See
- <link linkend="eviction_policies">chapter on eviction policies</link>
- for details. This property is
- <emphasis>dynamic</emphasis>
- .
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.shutdown">
+ <title><literal><![CDATA[<shutdown />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<shutdown />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">hookBehavior</emphasis></entry>
+ <entry>shutdownHookBehavior</entry>
+ <entry>DEFAULT, DONT_REGISTER, REGISTER</entry>
+ <entry>DEFAULT</entry>
+
+ <entry>
+ This attribute determines whether the cache registers a JVM shutdown hook so that it can clean
+ up resources if the JVM is receives a shutdown signal. By default a shutdown hook is registered
+ if no MBean server (apart from the JDK default) is detected. REGSTER forces the cache to register
+ a shutdown hook even if an MBean server is detected, and DONT_REGISTER forces the cache NOT to
+ register a shutdown hook, even if no MBean server is detected.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.listeners">
+ <title>The <literal><![CDATA[<listeners />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<listeners />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element specifies behavior of registered cache listeners.
</para>
</entry>
</row>
<row>
<entry>
- <para>ExposeManagementStatistics</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.listeners">
+ <title><literal><![CDATA[<listeners />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<listeners />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">asyncPoolSize</emphasis></entry>
+ <entry>listenerAsyncPoolSize</entry>
+ <entry>integer</entry>
+ <entry>1</entry>
+
+ <entry>
+ The size of the threadpool used to dispatch events to cache listeners that have registered as
+ asynchronous listeners. If this number is less than 1, all asynchronous listeners will be
+ treated as synchronous listeners and notified synchronously.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.invocationBatching">
+ <title>The <literal><![CDATA[<invocationBatching />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<invocationBatching />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
<para>
- Specifies whether interceptors that provide statistics should have statistics
- gathering enabled at startup. Also controls whether a
- <literal>CacheMgmtInterceptor</literal>
- (whose sole purpose is gathering
- statistics) should be added to the interceptor chain. Default value is
- <emphasis>true</emphasis>
- . See the
- <link linkend="jmx.statistics">JBoss Cache Statistics section</link>
- section for more details.
+ This element specifies behavior of invocation batching.
</para>
</entry>
</row>
<row>
<entry>
- <para>FetchInMemoryState
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.invocationBatching">
+ <title><literal><![CDATA[<invocationBatching />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<invocationBatching />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">enabled</emphasis></entry>
+ <entry>invocationBatchingEnabled</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+
+ <entry>
+ Whether invocation batching is enabled or not. See the chapter on
+ <link linkend="batching">invocation batching</link> for details.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.serialization">
+ <title>The <literal><![CDATA[<serialization />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<serialization />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element specifies behavior of object serialization in JBoss Cache.
</para>
</entry>
+ </row>
+ <row>
<entry>
- <para>Whether or not to acquire the initial in-memory state from
- existing members. Allows for hot caches when enabled. Also
- see the
- <literal>fetchPersistentState</literal>
- element in
- <literal>CacheLoaderConfig</literal>
- . Defaults to
- <literal>true</literal>
- . This property is
- <emphasis>dynamic</emphasis>
- .
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para><literal>Configuration</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.serialization">
+ <title><literal><![CDATA[<serialization />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<serialization />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">marshallerClass</emphasis></entry>
+ <entry>marshallerClass</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>VersionAwareMarshaller</entry>
+
+ <entry>
+ Specifies the marshaller to use when serializing and deserializing objects, either for replication
+ or persistence.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">useLazyDeserialization</emphasis></entry>
+ <entry>useLazyDeserialization</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+
+ <entry>
+ A mechanism by which serialization and deserialization of objects is deferred till the point in time
+ in which they are used and needed. This typically means that any deserialization happens using the
+ thread context class loader of the invocation that requires deserialization, and is an effective
+ mechanism to provide classloader isolation.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">useRegionBasedMarshalling</emphasis> (<emphasis>deprecated</emphasis>)</entry>
+ <entry>useRegionBasedMarshalling</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+
+ <entry>
+ An older mechanism by which classloader isolation was achieved, by registering classloaders on
+ specific regions.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">version</emphasis></entry>
+ <entry>replicationVersion</entry>
+ <entry>Valid JBoss Cache version string</entry>
+ <entry>Current version</entry>
+
+ <entry>
+ Used by the <literal>VersionAwareMarshaller</literal> in determining which version stream parser
+ to use by default when initiating communications in a cluster. Useful when you need to run a newer
+ version of JBoss Cache in a cluster containing older versions, and can be used to perform rolling
+ upgrades.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">objectInputStreamPoolSize</emphasis></entry>
+ <entry>objectInputStreamPoolSize</entry>
+ <entry>Positive integer</entry>
+ <entry>50</entry>
+
+ <entry>
+ Not used at the moment.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">objectOutputStreamPoolSize</emphasis></entry>
+ <entry>objectOutputStreamPoolSize</entry>
+ <entry>Positive integer</entry>
+ <entry>50</entry>
+
+ <entry>
+ Not used at the moment.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.eviction">
+ <title>The <literal><![CDATA[<eviction />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<eviction />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element controls how eviction works in the cache.
</para>
</entry>
</row>
<row>
<entry>
- <para>InactiveOnStartup</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>Whether or not the entire tree is inactive upon startup,
- only responding to replication messages after
- <literal>activateRegion()</literal>
- is called to activate one or
- more parts of the tree. If true, property
- <literal>FetchInMemoryState</literal>
- is ignored. This property
- should only be set to true if
- <literal>UseRegionBasedMarshalling</literal>
- is also
- <literal>true</literal>
- .
+ <para><link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.default"><literal><![CDATA[<default />]]></literal></link>,
+ <link linkend="element.region"><literal><![CDATA[<region />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>StateRetrievalTimeout</para>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
</entry>
<entry>
- <para>Time in milliseconds to wait for state
- retrieval. This should be longer than
- <literal>LockAcquisitionTimeout</literal>
- as the node
- providing state may need to wait that long to acquire
- necessary read locks on the cache. This property is
- <emphasis>dynamic</emphasis>
- .
+ <para><literal>EvictionConfig</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.eviction">
+ <title><literal><![CDATA[<eviction />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<eviction />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">wakeUpInterval</emphasis></entry>
+ <entry>wakeupInterval</entry>
+ <entry>integer</entry>
+ <entry>5000</entry>
+
+ <entry>
+ The frequency with which the eviction thread runs, in milliseconds. If set to less than 1, the
+ eviction thread never runs and is effectively disabled.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.default">
+ <title>The <literal><![CDATA[<default />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<default />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element defines the default eviction region.
</para>
</entry>
</row>
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+ <entry>
+ <para><link linkend="element.eviction"><literal><![CDATA[<eviction />]]></literal></link></para>
+ </entry>
+ </row>
+
<row>
<entry>
- <para>IsolationLevel</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
<entry>
- <para>Node locking isolation level : SERIALIZABLE, REPEATABLE_READ
- (default), READ_COMMITTED, READ_UNCOMMITTED, and NONE. Note that this is ignored if
- NodeLockingScheme is OPTIMISTIC. Case doesn't matter. See documentation on Transactions and
- Concurrency for more details.
+ <para>
+ <link linkend="element.property"><literal><![CDATA[<property />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>LockAcquisitionTimeout</para>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
</entry>
<entry>
- <para>Time in milliseconds to wait for a lock to be acquired. If
- a lock cannot be acquired an exception will be thrown. This property is
- <emphasis>dynamic</emphasis>
- .
+ <para><literal>EvictionRegionConfig</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.default">
+ <title><literal><![CDATA[<default />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<default />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">algorithmClass</emphasis></entry>
+ <entry>evictionAlgorithmConfig</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>none</entry>
+ <entry>
+ This attribute needs to be specified if this tag is being used. Note that if being configured
+ programmatically, the eviction algorithm's corresponding <literal>EvictionAlgorithmConfig</literal>
+ file should be used instead. E.g., where you would use <literal>LRUAlgorithm</literal> in XML, you
+ would use an instance of <literal>LRUAlgorithmConfig</literal> programmatically.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">actionPolicyClass</emphasis></entry>
+ <entry>evictionActionPolicyClassName</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>DefaultEvictionActionPolicy</entry>
+ <entry>
+ The eviction action policy class, defining what happens when a node needs to be evicted.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">eventQueueSize</emphasis></entry>
+ <entry>eventQueueSize
+ (<emphasis>dynamic</emphasis></entry>
+ <entry>integer</entry>
+ <entry>200000</entry>
+ <entry>
+ The size of the bounded eviction event queue.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.region">
+ <title>The <literal><![CDATA[<region />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<region />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element defines an eviction region. Multiple instances of this tag can exist provided they
+ have unique <literal>name</literal> attributes.
</para>
</entry>
</row>
<row>
<entry>
- <para>LockParentForChildInsertRemove</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>Controls whether inserting or removing a node requires a write
- lock on the node's parent (when pessimistic locking is used) or whether
- it results in an update of the parent node's version (when optimistic
- locking is used). The default value is
- <code>false</code>
- .
+ <para><link linkend="element.eviction"><literal><![CDATA[<eviction />]]></literal></link></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.property"><literal><![CDATA[<property />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>MarshallerClass</para>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
</entry>
<entry>
- <para>An instance of
- <literal>org.jboss.cache.marshall.Marshaller</literal>
- used to serialize data to byte streams.
- Defaults to
- <literal>org.jboss.cache.marshall.VersionAwareMarshaller</literal>
- if not specified.
+ <para><literal>EvictionRegionConfig</literal></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.region">
+ <title><literal><![CDATA[<region />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<region />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">name</emphasis></entry>
+ <entry>regionFqn</entry>
+ <entry>A String that could be parsed using Fqn.fromString()</entry>
+ <entry>none</entry>
+ <entry>
+ This should be a unique name that defines this region. See the <link linkend="regions">chapter on eviction</link>
+ for details of eviction regions.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">algorithmClass</emphasis></entry>
+ <entry>evictionAlgorithmConfig</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>none</entry>
+ <entry>
+ This attribute needs to be specified if this tag is being used. Note that if being configured
+ programmatically, the eviction algorithm's corresponding <literal>EvictionAlgorithmConfig</literal>
+ file should be used instead. E.g., where you would use <literal>LRUAlgorithm</literal> in XML, you
+ would use an instance of <literal>LRUAlgorithmConfig</literal> programmatically.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">actionPolicyClass</emphasis></entry>
+ <entry>evictionActionPolicyClassName</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>DefaultEvictionActionPolicy</entry>
+ <entry>
+ The eviction action policy class, defining what happens when a node needs to be evicted.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">eventQueueSize</emphasis></entry>
+ <entry>eventQueueSize
+ (<emphasis>dynamic</emphasis></entry>
+ <entry>integer</entry>
+ <entry>200000</entry>
+ <entry>
+ The size of the bounded eviction event queue.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.property">
+ <title>The <literal><![CDATA[<property />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<property />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ A mechanism of passing in name-value properties to the enclosing configuration element.
</para>
</entry>
</row>
<row>
<entry>
- <para>MultiplexerService</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>The JMX object name of the service that defines the JGroups multiplexer.
- In JBoss AS 5.0 this service is normally defined in the jgroups-multiplexer.sar.
- This XML attribute can only be handled by the JBoss AS MBean deployment services;
- if it is included in a file passed to a
- <literal>CacheFactory</literal>
- the
- factory's creation of the cache will fail. Inside JBoss AS, the attribute should
- be specified using the "depends optional-attribute-name" syntax shown in
- the example above. Inside the AS if this attribute
- is defined, an instance of
- <literal>org.jgroups.jmx.JChannelFactoryMBean</literal>
- will be injected into the
- <literal>CacheJmxWrapper</literal>
- which will use
- it to obtain a multiplexed JGroups channel. The configuration
- of the channel will be that associated with
- <literal>MultiplexerStack</literal>
- .
- The
- <literal>ClusterConfig</literal>
- attribute will be ignored.
+ <para>
+ <link linkend="element.default"><literal><![CDATA[<default />]]></literal></link>,
+ <link linkend="element.region"><literal><![CDATA[<region />]]></literal></link>,
+ <link linkend="element.interceptor"><literal><![CDATA[<interceptor />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>Either direct setters or <literal>setProperties()</literal> enclosing bean</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.property">
+ <title><literal><![CDATA[<property />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<property />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">name</emphasis></entry>
+ <entry>Either direct setters or <literal>setProperties()</literal> enclosing bean</entry>
+ <entry>String</entry>
+ <entry>none</entry>
+ <entry>
+ Property name
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">value</emphasis></entry>
+ <entry>Either direct setters or <literal>setProperties()</literal> enclosing bean</entry>
+ <entry>String</entry>
+ <entry>none</entry>
+ <entry>
+ Property value
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.loaders">
+ <title>The <literal><![CDATA[<loaders />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<loaders />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ Defines any cache loaders.
</para>
</entry>
</row>
<row>
<entry>
- <para>MultiplexerStack</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>The name of the JGroups stack to be used with the cache cluster.
- Stacks are defined in the configuration of the external
- <literal>MultiplexerService</literal>
- discussed above. In JBoss AS 5 this is normally done in the
- jgroups-multiplexer.sar/META-INF/multiplexer-stacks.xml file.
- The default stack is
- <literal>udp</literal>
- . This attribute is used in conjunction with
- <literal>MultiplexerService</literal>
- .
+ <para>
+ <link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>NodeLockingScheme</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
<entry>
- <para>May be PESSIMISTIC (default) or OPTIMISTIC.
+ <link linkend="element.preload"><literal><![CDATA[<preload />]]></literal></link>,
+ <link linkend="element.loader"><literal><![CDATA[<loader />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>CacheLoaderConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.loaders">
+ <title><literal><![CDATA[<loaders />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<loaders />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">passivation</emphasis></entry>
+ <entry>passivation</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ If true, cache loaders are used in passivation mode. See the <link linkend="cache_loaders">chapter on cache loaders</link>
+ for a detailed discussion on this.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">shared</emphasis></entry>
+ <entry>shared</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ If true, cache loaders are used in shared mode. See the <link linkend="cache_loaders">chapter on cache loaders</link>
+ for a detailed discussion on this.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.preload">
+ <title>The <literal><![CDATA[<preload />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<preload />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ Defines preloading of Fqn subtrees when a cache starts up. This element has no attributes.
</para>
</entry>
</row>
<row>
<entry>
- <para>ReplicationVersion</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
+
<entry>
- <para>Tells the cache to serialize cluster traffic
- in a format consistent with that used by the given release
- of JBoss Cache. Different JBoss Cache versions use different
- wire formats; setting this attribute tells a cache from a later
- release to serialize data using the format from an earlier
- release. This allows caches from different releases to
- interoperate. For example, a 2.1.0 cache could have this
- value set to "2.0.0", allowing it to interoperate with a 2.0.0
- cache. Valid values are a dot-separated release number, with
- any final qualifer also separated by a dot, e.g. "2.0.0" or "2.0.0.GA".
- Values that indicate a 1.x release are not supported in the 2.x series.
+ <para>
+ <link linkend="element.loaders"><literal><![CDATA[<loaders />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>ReplQueueInterval</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
<entry>
- <para>Time in milliseconds for elements from the replication
- queue to be replicated. Only used if
- <literal>UseReplQueue</literal>
- is enabled. This property is
- <emphasis>dynamic</emphasis>
- .
+ <link linkend="element.node"><literal><![CDATA[<node />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>CacheLoaderConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.node">
+ <title>The <literal><![CDATA[<node />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<node />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element defines a subtree under which all content will be preloaded from the cache loaders
+ when the cache starts. Multiple subtrees can be preloaded, although it only makes sense to
+ define more than one subtree if they do not overlap.
</para>
</entry>
</row>
<row>
<entry>
- <para>ReplQueueMaxElements</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>Max number of elements in the replication queue until
- replication kicks in. Only used if
- <literal>UseReplQueue</literal>
- is enabled. This property is
- <emphasis>dynamic</emphasis>
- .
+ <para>
+ <link linkend="element.preload"><literal><![CDATA[<preload />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>SyncCommitPhase</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
+ <entry></entry>
+ </row>
+
+ <row>
<entry>
- <para>This option is used to control the behaviour of the commit part of a 2-phase commit protocol,
- when
- using REPL_SYNC (does not apply to other cache modes). By default this is set to
- <literal>false</literal>
- . There is a performance penalty to enabling this, especially when running
- in a large cluster, but the upsides are greater cluster-wide data integrity. See the chapter on
- clustered caches for more information on this. This property is
- <emphasis>dynamic</emphasis>
- .
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>CacheLoaderConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.node">
+ <title><literal><![CDATA[<node />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<node />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">fqn</emphasis></entry>
+ <entry>preload</entry>
+ <entry>String</entry>
+ <entry>none</entry>
+ <entry>
+ An Fqn to preload. This should be a String that can be parsed with Fqn.fromString(). When doing
+ this programmatically, you should create a single String containing all of the Fqns you wish to
+ preload, separated by spaces, and pass that into <literal>CacheLoaderConfig.setPreload()</literal>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.loader">
+ <title>The <literal><![CDATA[<loader />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<loader />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element defines a cache loader. Multiple elements may be used to create cache loader
+ chains.
</para>
</entry>
</row>
<row>
<entry>
- <para>SyncReplTimeout</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>For synchronous replication: time in milliseconds to wait
- until replication acks have been received from all nodes in the
- cluster. It is usually best that this is greater than
- <literal>LockAcquisitionTimeout</literal>
- .
- This property is
- <emphasis>dynamic</emphasis>
- .
+ <para>
+ <link linkend="element.loaders"><literal><![CDATA[<loaders />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>SyncRollbackPhase</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
<entry>
- <para>This option is used to control the behaviour of the rollback part of a 2-phase commit
- protocol, when
- using REPL_SYNC (does not apply to other cache modes). By default this is set to
- <literal>false</literal>
- . There is a performance penalty to enabling this, especially when running
- in a large cluster, but the upsides are greater cluster-wide data integrity. See the chapter on
- clustered caches for more information on this. This property is
- <emphasis>dynamic</emphasis>
- .
+ <link linkend="element.properties"><literal><![CDATA[<properties />]]></literal></link>,
+ <link linkend="element.singletonStore"><literal><![CDATA[<singletonStore />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>IndividualCacheLoaderConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.loader">
+ <title><literal><![CDATA[<loader />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<loader />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">class</emphasis></entry>
+ <entry>className</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>none</entry>
+ <entry>
+ A cache loader implementation to use.
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">async</emphasis></entry>
+ <entry>async</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ All modifications to this cache loader happen asynchronously, on a separate thread.
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">fetchPersistentState</emphasis></entry>
+ <entry>fetchPersistentState</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ When a cache starts up, retrieve persistent state from the cache loaders in other caches in the
+ cluster. Only <emphasis>one</emphasis> loader element may set this to true. Also, only makes
+ sense if the <link linkend="element.clustering"><literal><![CDATA[<clustering />]]></literal></link>
+ tag is present.
+
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">purgeOnStartup</emphasis></entry>
+ <entry>purgeOnStartup</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ Purges this cache loader when it starts up.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.properties">
+ <title>The <literal><![CDATA[<properties />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<properties />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element contains a set of properties that can be read by a <literal>java.util.Properties</literal>
+ instance. This tag has no attributes, and the contents of this tag will be parsed by
+ <literal>Properties.load()</literal>.
</para>
</entry>
</row>
<row>
<entry>
- <para>TransactionManagerLookupClass</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>The fully qualified name of a class implementing
- TransactionManagerLookup. Default is
- JBossTransactionManagerLookup. There is also an option of
- GenericTransactionManagerLookup for example.
+ <para>
+ <link linkend="element.loader"><literal><![CDATA[<loader />]]></literal></link>,
+ <link linkend="element.singletonStore"><literal><![CDATA[<singletonStore />]]></literal></link>,
+ <link linkend="element.locator"><literal><![CDATA[<locator />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>UseInterceptorMbeans</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
+ <entry></entry>
+ </row>
+
+ <row>
<entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>IndividualCacheLoaderConfig.setProperties()</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.singletonStore">
+ <title>The <literal><![CDATA[<singletonStore />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<singletonStore />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
<para>
- <emphasis>Deprecated</emphasis>
- . Use
- <literal>ExposeManagementStatistics</literal>
- .
+ This element configures the enclosing cache loader as a <link linkend="sscl">singleton store cache loader</link>.
</para>
</entry>
</row>
<row>
<entry>
- <para>UseRegionBasedMarshalling</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>When unmarshalling replicated data, this option specifies whether or not to
- support use of different classloaders for different cache regions. This defaults to
- <literal>false</literal>
- if unspecified.
- <p/>
- <b>DEPRECATED.</b>
- This option will disappear in JBoss Cache 3.x. See
- <literal>UseLazyDeserialization</literal>
- instead.
+ <para>
+ <link linkend="element.loader"><literal><![CDATA[<loader />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>UseReplQueue</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
<entry>
- <para>For asynchronous replication: whether or not to use a
- replication queue. Defaults to
- <literal>false</literal>
- .
+ <link linkend="element.properties"><literal><![CDATA[<properties />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>SingletonStoreConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.singletonStore">
+ <title><literal><![CDATA[<singletonStore />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<singletonStore />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">class</emphasis></entry>
+ <entry>className</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>SingletonStoreCacheLoader</entry>
+ <entry>
+ A singleton store wrapper implementation to use.
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">enabled</emphasis></entry>
+ <entry>enabled</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ If true, the singleton store cache loader is enabled.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.customInterceptors">
+ <title>The <literal><![CDATA[<customInterceptors />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<customInterceptors />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element allows you to define custom interceptors for the cache. This tag has no attributes.
</para>
</entry>
</row>
<row>
<entry>
- <para>ShutdownHookBehavior</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
- <para>An optional parameter that controls whether JBoss Cache registers a shutdown hook with the
- JVM
- runtime. Allowed values are<literal>DEFAULT</literal>,
- <literal>REGISTER</literal>
- and
- <literal>DONT_REGISTER</literal>.
- <literal>REGISTER</literal>
- and
- <literal>DONT_REGISTER</literal>
- forces or suppresses the registration of a shutdown hook, respectively, and
- <literal>DEFAULT</literal>
- registers one if an MBean server (other than the JDK default) cannot be found and it is assumed
- that the
- cache is running in a managed environment. The default if unspecified is, as expected,<literal>
- DEFAULT</literal>.
+ <para>
+ <link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link>
</para>
</entry>
</row>
<row>
<entry>
- <para>UseLazyDeserialization</para>
+ <para><emphasis role="bold">Children</emphasis></para>
</entry>
<entry>
- <para>An optional parameter that can be used to enable or disable the use of lazy deserialization
- for cached objects. Defaults to<literal>false</literal>, since it adds a small processing
- overhead.
- If lazy deserialization is disabled, support for implicitly using context class loaders
- registered
- with the calling thread goes away.
+ <link linkend="element.interceptor"><literal><![CDATA[<interceptor />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>None. At runtime, instantiate your own interceptor and pass it in to the cache using
+ <literal>Cache.addInterceptor()</literal>.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.interceptor">
+ <title>The <literal><![CDATA[<interceptor />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<interceptor />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This element allows you configure a custom interceptor. This tag may appear multiple times.
</para>
</entry>
</row>
<row>
<entry>
- <para>ObjectInputStreamPoolSize and ObjectOutputStreamPoolSize</para>
+ <para><emphasis role="bold">Parent</emphasis></para>
</entry>
<entry>
<para>
- Since JBoss Cache 2.1.0, object input and output streams - used to serialize and deserialize RPC
- calls in a cluster - are pooled to reduce the overhead of constructing such streams. They are
- reused
- by making use of special resettable stream implementations.
+ <link linkend="element.customInterceptor"><literal><![CDATA[<customInterceptor />]]></literal></link>
</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <link linkend="element.property"><literal><![CDATA[<property />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>None. At runtime, instantiate your own interceptor and pass it in to the cache using
+ <literal>Cache.addInterceptor()</literal>.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.interceptor">
+ <title><literal><![CDATA[<interceptor />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<interceptor />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">class</emphasis></entry>
+ <entry> - </entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>none</entry>
+ <entry>
+ An implementation of <literal>CommandInterceptor</literal>.
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">position</emphasis></entry>
+ <entry> - </entry>
+ <entry>first, last</entry>
+ <entry></entry>
+ <entry>
+ A position at which to place this interceptor in the chain. First is the first interceptor
+ encountered when an invocation is made on the cache, last is the last interceptor before the
+ call is passed on to the data structure. <emphasis>Note that this attribute is mutually
+ exclusive with <literal>before</literal>, <literal>after</literal> and <literal>index</literal>.</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">before</emphasis></entry>
+ <entry> - </entry>
+ <entry>Fully qualified class name of an interceptor</entry>
+ <entry></entry>
+ <entry>
+ Will place the new interceptor directly before the instance of the named interceptor.
+ <emphasis>Note that this attribute is mutually exclusive with <literal>position</literal>,
+ <literal>after</literal> and <literal>index</literal>.</emphasis>
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">after</emphasis></entry>
+ <entry> - </entry>
+ <entry>Fully qualified class name of an interceptor</entry>
+ <entry></entry>
+ <entry>
+ Will place the new interceptor directly after the instance of the named interceptor.
+ <emphasis>Note that this attribute is mutually exclusive with <literal>position</literal>,
+ <literal>before</literal> and <literal>index</literal>.</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">index</emphasis></entry>
+ <entry> - </entry>
+ <entry>Positive integers</entry>
+ <entry></entry>
+ <entry>
+ A position at which to place this interceptor in the chain, with 0 being the first position.
+ <emphasis>Note that this attribute is mutually exclusive with <literal>position</literal>,
+ <literal>before</literal> and <literal>after</literal>.</emphasis>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.clustering">
+ <title>The <literal><![CDATA[<clustering />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<clustering />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
<para>
- by default, these stream pools are set at
- <literal>50</literal>
- objects each. You could increase or decrease the pool
- size if, while profiling, you see a lot of threads blocking on
- <literal>ObjectStreamPool.getInputStream()</literal>
- or<literal>ObjectStreamPool.getOutputStream()</literal>. In general, having more streams is
- better
- than having fewer than needed. Based on your application, make sure you have more streams
- available
- than number of threads you expect to concurrently write to the cache.
+ If this element is present, the cache is started in clustered mode. Attributes and child
+ elements define clustering characteristics.
</para>
</entry>
</row>
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.jbosscache"><literal><![CDATA[<jbosscache />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <link linkend="element.stateRetrieval"><literal><![CDATA[<stateRetrieval />]]></literal></link>,
+ <link linkend="element.sync"><literal><![CDATA[<sync />]]></literal></link>,
+ <link linkend="element.async"><literal><![CDATA[<async />]]></literal></link>,
+ <link linkend="element.buddy"><literal><![CDATA[<buddy />]]></literal></link>,
+ <link linkend="element.jgroupsConfig"><literal><![CDATA[<jgroupsConfig />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>Configuration</para>
+ </entry>
+ </row>
</tbody>
</tgroup>
- </informaltable>
+ </table>
+
+ <table id="attributes.clustering">
+ <title><literal><![CDATA[<clustering />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<clustering />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">mode</emphasis></entry>
+ <entry>cacheMode</entry>
+ <entry>replication, invalidation, r, i</entry>
+ <entry>replication</entry>
+ <entry>
+ See the <link linkend="clustering">chapter on clustering</link> for the differences between
+ replication and invalidation. When using the bean, synchronous and asynchronous communication is
+ combined with clustering mode to give you the enumberation <literal>Configuration.CacheMode</literal>.
+ </entry>
+ </row>
+
+ <row>
+ <entry><emphasis role="bold">clusterName</emphasis></entry>
+ <entry>clusterName</entry>
+ <entry>String</entry>
+ <entry>JBossCache-cluster</entry>
+ <entry>
+ A cluster name which is used to identify the cluster to join.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.sync">
+ <title>The <literal><![CDATA[<sync />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<sync />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ If this element is present, all communications are synchronous, in that whenever a thread sends
+ a message sent over the wire, it blocks until it receives an acknowledgement from the recipient.
+ This element is mutually exclusive with the <link linkend="element.async"><literal><![CDATA[<async />]]></literal></link>
+ element.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.clustering"><literal><![CDATA[<clustering />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>Configuration.setCacheMode()</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.sync">
+ <title><literal><![CDATA[<sync />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<sync />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">replTimeout</emphasis></entry>
+ <entry>syncReplTimeout (<emphasis>dynamic</emphasis>)</entry>
+ <entry>positive integer</entry>
+ <entry>15000</entry>
+ <entry>
+ This is the timeout used to wait for an acknowledgement when making a remote call, after which
+ an exception is thrown.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.async">
+ <title>The <literal><![CDATA[<async />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<async />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ If this element is present, all communications are asynchronous, in that whenever a thread sends
+ a message sent over the wire, it does not wait for an acknowledgement before returning.
+ This element is mutually exclusive with the <link linkend="element.sync"><literal><![CDATA[<sync />]]></literal></link>
+ element.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.clustering"><literal><![CDATA[<clustering />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>Configuration.setCacheMode()</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.async">
+ <title><literal><![CDATA[<async />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<async />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">serializationExecutorPoolSize</emphasis></entry>
+ <entry>serializationExecutorPoolSize</entry>
+ <entry>positive integer</entry>
+ <entry>25</entry>
+ <entry>
+ In addition to replication happening asynchronously, even serialization of contents for replication
+ happens in a separate thread to allow the caller to return as quickly as possible. This setting
+ controls the size of the serializer thread pool. Setting this to any value less than 1 means
+ serialization does not happen asynchronously.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">useReplQueue</emphasis></entry>
+ <entry>useReplQueue</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ If true, this forces all async communications to be queued up and sent out periodically as a batch.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">replQueueInterval</emphasis></entry>
+ <entry>replQueueInterval</entry>
+ <entry>positive integer</entry>
+ <entry>5000</entry>
+ <entry>
+ If <literal>useReplQueue</literal> is set to true, this attribute controls how often the asynchronous
+ thread used to flush the replication queue runs. This should be a positive integer which represents
+ thread wakeup time in milliseconds.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">replQueueMaxElements</emphasis></entry>
+ <entry>replQueueMaxElements</entry>
+ <entry>positive integer</entry>
+ <entry>1000</entry>
+ <entry>
+ If <literal>useReplQueue</literal> is set to true, this attribute can be used to trigger flushing
+ of the queue when it reaches a specific threshold.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.stateRetrieval">
+ <title>The <literal><![CDATA[<stateRetrieval />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<stateRetrieval />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This tag controls ho state is retrieved from neighboring caches when this cache instance starts.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.clustering"><literal><![CDATA[<clustering />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>Configuration</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.stateRetrieval">
+ <title><literal><![CDATA[<stateRetrieval />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<stateRetrieval />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">fetchInMemoryState</emphasis></entry>
+ <entry>fetchInMemoryState</entry>
+ <entry>true, false</entry>
+ <entry>true</entry>
+ <entry>
+ If true, this will cause the cache to ask neighboring caches for state when it starts up, so the
+ cache starts "warm".
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">timeout</emphasis></entry>
+ <entry>stateRetrievalTimeout</entry>
+ <entry>positive integer</entry>
+ <entry>10000</entry>
+ <entry>
+ This is the maximum amount of time - in milliseconds - to wait for state from neighboring caches,
+ before throwing an exception and aborting startup.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.buddy">
+ <title>The <literal><![CDATA[<buddy />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<buddy />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ If this tag is present, then state is not replicated across the entire cluster. Instead, buddy
+ replication is used to select cache instances to maintain backups on. See
+ <link linkend="br">this section on buddy replication</link> for details. Note that this is only
+ used if the clustering mode is <literal>replication</literal>, and not if it is <literal>invalidation</literal>.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.clustering"><literal><![CDATA[<clustering />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <link linkend="element.dataGravitation"><literal><![CDATA[<dataGravitation />]]></literal></link>,
+ <link linkend="element.locator"><literal><![CDATA[<locator />]]></literal></link>,
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>BuddyReplicationConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.buddy">
+ <title><literal><![CDATA[<buddy />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<buddy />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">enabled</emphasis></entry>
+ <entry>enabled</entry>
+ <entry>true, false</entry>
+ <entry>false</entry>
+ <entry>
+ If true, buddy replication is enabled.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">communicationTimeout</emphasis></entry>
+ <entry>buddyCommunicationTimeout</entry>
+ <entry>positive integer</entry>
+ <entry>10000</entry>
+ <entry>
+ This is the maximum amount of time - in milliseconds - to wait for buddy group organization
+ communications from buddy caches.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">poolName</emphasis></entry>
+ <entry>buddyPoolName</entry>
+ <entry>String</entry>
+ <entry></entry>
+ <entry>
+ This is used as a means to identify cache instances and provide hints to the buddy selection
+ algorithms. More information on <link linkend="br">the section on buddy replication</link>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.dataGravitation">
+ <title>The <literal><![CDATA[<dataGravitation />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<dataGravitation />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This tag configures how data gravitation is conducted. See
+ <link linkend="br">this section on buddy replication</link> for details.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.buddy"><literal><![CDATA[<buddy />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>BuddyReplicationConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.dataGravitation">
+ <title><literal><![CDATA[<dataGravitation />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<dataGravitation />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">auto</emphasis></entry>
+ <entry>autoDataGravitation</entry>
+ <entry>true, false</entry>
+ <entry>true</entry>
+ <entry>
+ If true, when a get() is performed on a cache and nothing is found, a gravitation from neighboring
+ caches is attempted. If this is false, then gravitations can only occur if the
+ <literal>Option.setForceDataGravitation()</literal> option is provided.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">removeOnFind</emphasis></entry>
+ <entry>dataGravitationRemoveOnFind</entry>
+ <entry>true, false</entry>
+ <entry>true</entry>
+ <entry>
+ If true, when gravitation occurs, the instance that requests the gravitation takes ownership of
+ the state and requests that all other instances remove the gravitated state from memory.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">searchBackupTrees</emphasis></entry>
+ <entry>dataGravitationSearchBackupTrees</entry>
+ <entry>true, false</entry>
+ <entry>true</entry>
+ <entry>
+ If true, incoming gravitation requests will cause the cache to search not just its primary
+ data structure but its backup structure as well.
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.locator">
+ <title>The <literal><![CDATA[<locator />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<locator />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This tag provides a pluggable mechanism for providing buddy location algorithms.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.buddy"><literal><![CDATA[<buddy />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ <link linkend="element.properties"><literal><![CDATA[<properties />]]></literal></link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>BuddyLocatorConfig</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.locator">
+ <title><literal><![CDATA[<locator />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<locator />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">class</emphasis></entry>
+ <entry>className</entry>
+ <entry>A valid class that is available on the classpath</entry>
+ <entry>NextMemberBuddyLocator</entry>
+ <entry>
+ A <literal>BuddyLocator</literal> implementation to use when selecting buddies from the cluster.
+ Please refer to <literal>BuddyLocator</literal> javadocs for details.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="element.jgroupsConfig">
+ <title>The <literal><![CDATA[<jgroupsConfig />]]></literal> Element</title>
+ <tgroup cols="2" align="left">
+ <colspec colname="name" />
+ <colspec colname="desc" />
+ <spanspec spanname="hspan" namest="name" nameend="desc" align="left" />
+
+ <thead valign="top">
+ <row>
+ <entry spanname="hspan">The <literal><![CDATA[<jgroupsConfig />]]></literal> Element</entry>
+ </row>
+ </thead>
+ <tbody valign="top">
+ <row>
+ <entry>
+ <para><emphasis role="bold">Description</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ This tag provides a configuration which is used with JGroups to create a network communication
+ channel.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Parent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>
+ <link linkend="element.clustering"><literal><![CDATA[<clustering />]]></literal></link>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Children</emphasis></para>
+ </entry>
+
+ <entry>
+ A series of elements representing JGroups protocols (see
+ <ulink url="http://www.jgroups.org/javagroupsnew/docs/ug.html">JGroups documentation</ulink>). Note
+ that there are no child elements if any of the element attributes are used instead. See section
+ on attributes.
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><emphasis role="bold">Bean equivalent</emphasis></para>
+ </entry>
+
+ <entry>
+ <para>Configuration</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="attributes.jgroupsConfig">
+ <title><literal><![CDATA[<jgroupsConfig />]]></literal> Attributes</title>
+ <tgroup cols="5" align="left">
+ <colspec colname="c1" />
+ <colspec colname="c2" />
+ <colspec colname="c3" />
+ <colspec colname="c4" />
+ <colspec colname="c5" />
+
+ <spanspec spanname="hspan" namest="c1" nameend="c5" align="left" />
+ <thead valign="top">
+ <row><entry spanname="hspan"><literal><![CDATA[<jgroupsConfig />]]></literal> Attributes</entry></row>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Bean Field</entry>
+ <entry>Allowed</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody valign="top">
+ <row>
+ <entry><emphasis role="bold">configFile</emphasis></entry>
+ <entry>clusterConfig</entry>
+ <entry>A JGroups configuration file on the classpath</entry>
+ <entry>udp.xml</entry>
+ <entry>
+ If this attribute is used, then any JGroups elements representing protocols within this tag are
+ ignored. Instead, JGroups settings are read from the file specified. Note that this cannot be used
+ with the <literal>multiplexerStack</literal> attribute.
+ </entry>
+ </row>
+ <row>
+ <entry><emphasis role="bold">multiplexerStack</emphasis></entry>
+ <entry>muxStackName</entry>
+ <entry>A valid multiplexer stack name that exists in the channel factory passed in to the <literal>RuntimeConfig</literal></entry>
+ <entry></entry>
+ <entry>
+ This can only be used with the <literal>RuntimeConfig</literal>, where you pass in a JGroups
+ <literal>ChannelFactory</literal> instance using <literal>RuntimeConfig.setMuxChannelFactory()</literal>.
+ If this attribute is used, then any JGroups elements representing protocols within this tag are
+ ignored. Instead, the JGroups channel is created using the factory passed in. Note that this cannot be
+ used with the <literal>configFile</literal> attribute.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
</chapter>
\ No newline at end of file
Modified: core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/eviction_policies.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -360,7 +360,7 @@
controls
the eviction in based on least frequently used algorithm. The least
frequently used nodes will be the first to evict with this policy. Node
- usage starts at 1 when a node is first added. Each time it is visted,
+ usage starts at 1 when a node is first added. Each time it is visited,
the node usage counter increments by 1. This number is used to determine
which nodes are least frequently used. LFU is also a sorted eviction
algorithm. The underlying EvictionQueue implementation and algorithm is
Modified: core/trunk/src/main/docbook/userguide/en/modules/introduction.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/introduction.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/introduction.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -56,7 +56,7 @@
JBoss Cache offers a simple and straightforward API, where data - simple Java objects - can be placed in the
cache. Based on configuration options selected, this data may be one or all of:
<itemizedlist>
- <listitem>cached in-memory for efficient, threadsafe retrieval.</listitem>
+ <listitem>cached in-memory for efficient, thread-safe retrieval.</listitem>
<listitem>replicated to some or all cache instances in a cluster.</listitem>
<listitem>persisted to disk and/or a remote, in-memory cache cluster ("far-cache").</listitem>
<listitem>garbage collected from memory when memory runs low, and passivated to disk so state isn't lost.
@@ -77,7 +77,7 @@
<title>Local and clustered modes</title>
<para>
- The cache is organised as a tree, with a single root. Each node in the tree essentially contains a map,
+ The cache is organized as a tree, with a single root. Each node in the tree essentially contains a map,
which acts as a store for key/value pairs. The only requirement placed on objects that are cached is that
they implement <literal>java.io.Serializable</literal>.
</para>
@@ -128,16 +128,17 @@
safety between readers and writers, while maintaining a high degree of concurrency. The specific MVCC implementation
used in JBoss Cache allows for reader threads to be completely free of locks and synchronized blocks, ensuring a very high
degree of performance for read-heavy applications. It also uses custom, highly performant lock implementations
- that employ modern compare-and-swap techniques for writer threads, which are tuned to multicore CPU architectures.
+ that employ modern compare-and-swap techniques for writer threads, which are tuned to multi-core CPU architectures.
</para>
<para>
+ Multi-versioned concurrency control (MVCC) is the default locking scheme since JBoss Cache 3.x.
Optimistic and pessimistic locking schemes from older versions of JBoss Cache are still available but are
- deprecated in favour of MVCC, and will be removed in future releases. Use of these locking schemes is
- strongly discouraged.
+ deprecated in favor of MVCC, and will be removed in future releases. Use of these deprecated locking
+ schemes are strongly discouraged.
</para>
<para>
The JBoss Cache MVCC implementation only supports READ_COMMITTED and REPEATABLE_READ isolation levels, corresponding
- to their database equivalents.
+ to their database equivalents. See the section on <link linkend="transactions">transactions and concurrency</link> for details on MVCC.
</para>
</section>
</section>
Modified: core/trunk/src/main/docbook/userguide/en/modules/preface.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/preface.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/preface.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -15,7 +15,7 @@
<para>
This book is targeted at developers wishing to use JBoss Cache as either a standalone in-memory cache,
a distributed or replicated cache, a clustering library, or an in-memory database. It is targeted at application
- developers who wish to use JBoss Cache in their codebase, as well as "OEM" developers who wish to build on and
+ developers who wish to use JBoss Cache in their code base, as well as "OEM" developers who wish to build on and
extend JBoss Cache features. As such, this book is split into two major sections - one detailing the "User" API
and the other going much deeper into specialist topics and the JBoss Cache architecture.
</para>
Modified: core/trunk/src/main/docbook/userguide/en/modules/replication.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/replication.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/replication.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -62,7 +62,7 @@
<para>When using transactions, replication only occurs at the
transaction boundary - i.e., when a transaction commits. This results
- in minimising replication traffic since a single modification is
+ in minimizing replication traffic since a single modification is
broadcast rather than a series of individual modifications, and can be
a lot more efficient than not using transactions. Another effect of
this is that if a transaction were to roll back, nothing is broadcast
@@ -150,8 +150,8 @@
in HTTP session replication speak. What this means
is that if certain data is frequently accessed, it is desirable that
this is always accessed on one instance rather than in a round-robin
- fashion as this helps the cache cluster optimise how it chooses
- buddies, where it stores data, and minimises replication
+ fashion as this helps the cache cluster optimize how it chooses
+ buddies, where it stores data, and minimizes replication
traffic.
</para>
@@ -210,7 +210,7 @@
<emphasis>try</emphasis>
to select a buddy on a different physical host. If not able to do so though, it will fall back
- to colocated instances. This defaults to
+ to co-located instances. This defaults to
<literal>true</literal>
@@ -371,9 +371,9 @@
every time data is changed in a cache other caches in the cluster receive
a message informing them that their data is now stale and should be
evicted from memory. Invalidation, when used with a shared cache loader
- (see chapter on <link linkend="cache_loaders">cacahe loaders</link>) would cause remote caches to refer to the
+ (see chapter on <link linkend="cache_loaders">cache loaders</link>) would cause remote caches to refer to the
shared cache loader to retrieve modified data. The benefit of this is
- twofold: network traffic is minimised as invalidation messages are very
+ twofold: network traffic is minimized as invalidation messages are very
small compared to replicating updated data, and also that other caches in
the cluster look up modified data in a lazy manner, only when
needed.
@@ -381,7 +381,7 @@
<para>Invalidation messages are sent after each modification (no
transactions or batches), or at the end of a transaction or batch, upon successful commit.
- This is usually more efficient as invalidation messages can be optimised
+ This is usually more efficient as invalidation messages can be optimized
for the transaction as a whole rather than on a per-modification
basis.
</para>
@@ -634,10 +634,10 @@
correct state. In-memory state can be transferred as well if the
desire is to have a "hot" cache -- one that has all relevant data in
memory when the cache begins providing service. (Note that the
- <literal><![CDATA[<cacheloader><preload>]]></literal>
+ <literal><![CDATA[<preload>]]></literal>
element in the
- <literal>CacheLoaderConfig</literal>
- configuration parameter can be used as well to
+ <literal><![CDATA[<loaders>]]></literal>
+ configuration element can be used as well to
provide a "warm" or "hot" cache without requiring an in-memory state
transfer. This approach somewhat reduces the burden on the cache
instance providing state, but increases the load on the persistent
Modified: core/trunk/src/main/docbook/userguide/en/modules/transactions.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/transactions.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/docbook/userguide/en/modules/transactions.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,297 +1,179 @@
<chapter id="transactions">
<title>Transactions and Concurrency</title>
- <section>
+ <section id="transactions.concurrent">
<title>Concurrent Access</title>
<para>JBoss Cache is a thread safe caching API, and uses its own efficient mechanisms of controlling concurrent
- access. It uses a pessimistic locking scheme by default for this purpose. Optimistic locking may alternatively
- be used, and is discussed later.
+ access. It uses an innovative implementation of multi-versioned concurrency control
+ (<ulink url="http://en.wikipedia.org/wiki/Multiversion_concurrency_control">MVCC</ulink>) as the default
+ locking scheme. Versions of JBoss Cache prior to 3.x offered Optimistic and Pessimistic Locking schemes,
+ both of which are now deprecated in favor of MVCC.
</para>
- <section>
- <title>Locks</title>
- <para>Locking is done internally, on a node-level. For example when we
- want to access "/a/b/c", a lock will be acquired for nodes "a", "b" and
- "c". When the same transaction wants to access "/a/b/c/d", since we
- already hold locks for "a", "b" and "c", we only need to acquire a lock
- for "d".
+ <section id="transactions.locks.mvcc">
+ <title>Multi-Version Concurrency Control (MVCC)</title>
+ <para>
+ <ulink url="http://en.wikipedia.org/wiki/Multiversion_concurrency_control">MVCC</ulink> is a locking scheme
+ commonly used by modern database implementations to control fast, safe concurrent access to shared data.
</para>
- <para>Lock owners are either transactions (call is made within the scope of an existing transaction)
- or threads (no transaction associated with the call).
- Regardless, a transaction or a thread is internally transformed into
- an instance of
- <literal>GlobalTransaction</literal>
- , which is used as a globally unique identifier
- for modifications across a cluster. E.g. when we run a two-phase commit
- protocol across the cluster, the
- <literal>GlobalTransaction</literal>
- uniquely identifies a unit of work across a cluster.
- </para>
-
- <para>Locks can be read or write locks. Write locks serialize read and
- write access, whereas read-only locks only serialize read access. When a
- write lock is held, no other write or read locks can be acquired. When a
- read lock is held, others can acquire read locks. However, to acquire
- write locks, one has to wait until all read locks have been released. When
- scheduled concurrently, write locks always have precedence over read
- locks. Note that (if enabled) read locks can be upgraded to write
- locks.
- </para>
-
- <para>Using read-write locks helps in the following scenario: consider a
- tree with entries "/a/b/n1" and "/a/b/n2". With write-locks, when Tx1
- accesses "/a/b/n1", Tx2 cannot access "/a/b/n2" until Tx1 has completed
- and released its locks. However, with read-write locks this is possible,
- because Tx1 acquires read-locks for "/a/b" and a read-write lock for
- "/a/b/n1". Tx2 is then able to acquire read-locks for "/a/b" as well, plus
- a read-write lock for "/a/b/n2". This allows for more concurrency in
- accessing the cache.
- </para>
- </section>
-
- <section>
- <title>Pessimistic locking</title>
- <para>By default, JBoss Cache uses pessimistic locking. Locking is not exposed directly to user. Instead, a
- transaction isolation level which provides different locking behaviour is configurable.
- </para>
- <section>
- <title>Isolation levels</title>
- <para>JBoss Cache supports the following transaction isolation levels, analogous to database ACID isolation
- levels. A user can configure an instance-wide isolation level of NONE, READ_UNCOMMITTED, READ_COMMITTED,
- REPEATABLE_READ, or SERIALIZABLE. REPEATABLE_READ is the default isolation level used.
- </para>
-
- <orderedlist>
- <listitem>
- <para>NONE. No transaction support is needed. There is no locking at
- this level, e.g., users will have to manage the data integrity.
- Implementations use no locks.
- </para>
- </listitem>
-
- <listitem>
- <para>READ_UNCOMMITTED. Data can be read anytime while write
- operations are exclusive. Note that this level doesn't prevent the
- so-called "dirty read" where data modified in Tx1 can be read in Tx2
- before Tx1 commits. In other words, if you have the following
- sequence,
- </para>
- <programlisting><![CDATA[
- Tx1 Tx2
- W
- R
-]]></programlisting>
- <para>
- using this isolation level will not prevent Tx2 read operation.
- Implementations typically use an exclusive lock for writes while reads
- don't need to acquire a lock.
- </para>
- </listitem>
-
- <listitem>
- <para>READ_COMMITTED. Data can be read any time as long as there is no
- write. This level prevents the dirty read. But it doesn’t prevent the
- so-called ‘non-repeatable read’ where one thread reads the data twice
- can produce different results. For example, if you have the following
- sequence,
- </para>
- <programlisting><![CDATA[
- Tx1 Tx2
- R
- W
- R
-]]></programlisting>
-
- <para>where the second read in Tx1 thread will produce different
- result.
- </para>
-
- <para>Implementations usually use a read-write lock; reads succeed
- acquiring the lock when there are only reads, writes have to wait
- until there are no more readers holding the lock, and readers are
- blocked acquiring the lock until there are no more writers holding the
- lock. Reads typically release the read-lock when done, so that a
- subsequent read to the same data has to re-acquire a read-lock; this
- leads to nonrepeatable reads, where 2 reads of the same data might
- return different values. Note that, the write only applies regardless
- of transaction state (whether it has been committed or not).
- </para>
- </listitem>
-
- <listitem>
- <para>REPEATABLE_READ. Data can be read while there is no write and
- vice versa. This level prevents "non-repeatable read" but it does not
- completely prevent the so-called "phantom read" where new data can be
- inserted into the tree from another transaction. Implementations
- typically use a read-write lock. This is the default isolation level used.
- </para>
- </listitem>
-
- <listitem>
- <para>SERIALIZABLE. Data access is synchronized with exclusive locks.
- Only 1 writer or reader can have the lock at any given time. Locks are
- released at the end of the transaction. Regarded as very poor for performance and
- thread/transaction concurrency.
- </para>
- </listitem>
- </orderedlist>
-
- </section>
-
- <section>
- <title>Insertion and Removal of Nodes</title>
-
+ <section id="mvcc.concepts">
+ <title>MVCC Concepts</title>
<para>
- By default, before inserting a new node into the tree or removing an existing node from the
- tree, JBoss Cache will only attempt to acquire a read lock on the new node's parent node.
- This approach does not treat child nodes as an integral part of a parent node's state.
- This approach allows greater concurrency if nodes are frequently added or removed, but
- at a cost of lesser correctness. For use cases where greater correctness is necessary, JBoss
- Cache provides a configuration option
- <literal>LockParentForChildInsertRemove</literal>
- .
- If this is set to
- <literal>true</literal>
- , insertions and removals of child nodes
- require the acquisition of a
- <emphasis>write lock</emphasis>
- on the parent node.
+ MVCC is designed to provide the following features for concurrent access:
+ <itemizedlist>
+ <listitem>Readers that don't block writers</listitem>
+ <listitem>Writers that fail fast</listitem>
+ </itemizedlist>
+ and achieves this by using data versioning and copying for concurrent writers. The theory is that readers
+ continue reading shared state, while writers copy the shared state, increment a version id, and write that
+ shared state back after verifying that the version is still valid (i.e., another concurrent writer has not
+ changed this state first).
</para>
<para>
- In addition to the above, in version 2.1.0 and above, JBoss Cache offers the ability to override this
- configuration on a per-node basis. See
- <literal>Node.setLockForChildInsertRemove()</literal>
- and its
- corresponding javadocs for details.
+ This allows readers to continue reading while not preventing writers from writing, and repeatable read
+ semantics are maintained by allowing readers to read off the old version of the state.
</para>
</section>
- </section>
-
- <section>
- <title>Optimistic Locking</title>
- <para>The motivation for optimistic locking is to improve concurrency. When a lot of threads have a lot of
- contention for access to the data tree, it can be inefficient to lock portions of the tree - for reading or
- writing - for the entire duration of a transaction as we do in pessimistic locking. Optimistic locking
- allows for greater concurrency of threads and transactions by using a technique called data versioning,
- explained here. Note that isolation levels (if configured) are ignored if optimistic locking is enabled.
- </para>
- <section>
- <title>Architecture</title>
- <para>Optimistic locking treats all method calls as transactional
- <footnote>
- <para>Because of this requirement, you must always have a transaction manager configured when using
- optimistic locking.
- </para>
- </footnote>
- . Even if you do not invoke a call within the scope of an ongoing transaction, JBoss Cache creates an
- <emphasis>implicit transaction</emphasis>
- and commits this transaction when the invocation completes. Each transaction
- maintains a transaction workspace, which contains a copy of the data used within the transaction.
+ <section id="mvcc.impl">
+ <title>MVCC Implementation</title>
+ <para>
+ JBoss Cache's implementation of MVCC is based on a few features:
+ <itemizedlist>
+ <listitem>Readers don't acquire any locks</listitem>
+ <listitem>Only one additional version is maintained for shared state, for a single writer</listitem>
+ <listitem>All writes happen sequentially, to provide fail-fast semantics</listitem>
+ </itemizedlist>
+ The extremely high performance of JBoss Cache's MVCC implementation for reading threads is achieved by
+ not requiring any synchronization or locking for readers. For each reader thread, the
+ <literal>MVCCLockingInterceptor</literal> wraps state in a lightweight container object, which is placed
+ in the thread's <literal>InvocationContext</literal> (or <literal>TransactionContext</literal> if running
+ in a transaction). All subsequent operations on the state happens via the container object. This use of
+ Java references allows for repeatable read semantics even if the actual state changes simultaneously.
</para>
- <para>For example, if a transaction calls
- <literal>cache.getRoot().getChild( Fqn.fromString("/a/b/c") )</literal>
- ,
- nodes a, b and c are copied from the main data tree
- and into the workspace. The data is versioned and all calls in the transaction work on the copy of the
- data rather than the actual data. When the transaction commits, its workspace is merged back into the
- underlying tree by matching versions. If there is a version mismatch - such as when the actual data tree
- has a higher version than the workspace, perhaps if another transaction were to access the same data,
- change it and commit before the first transaction can finish - the transaction throws a
- <literal>RollbackException</literal>
- when committing and the commit fails.
+ <para>
+ Writer threads, on the other hand, need to acquire a lock before any writing can commence. Currently,
+ we use lock striping to improve the memory performance of the cache, and the size of the shared lock pool
+ can be tuned using the <literal>concurrencyLevel</literal> attribute of the <literal>locking</literal>
+ element. See the <link linkend="configuration_reference_chapter">configuration reference</link>
+ for details. After acquiring an exclusive lock on an Fqn, the writer thread then wraps the state to be
+ modified in a container as well, just like with reader threads, and then copies this state for writing.
+ When copying, a reference to the original version is still maintained in the container (for rollbacks).
+ Changes are then made to the copy and the copy is finally written to the data structure when the write
+ completes.
</para>
- <para>Optimistic locking uses the same locks we speak of above, but the locks are only held for a very short
- duration - at the start of a transaction to build a workspace, and when the transaction commits and has
- to merge data back into the tree.
- </para>
<para>
- So while optimistic locking may occasionally fail if version validations fail or may run slightly slower
- than pessimistic locking due to the inevitable overhead and extra processing of maintaining workspaces,
- versioned data and validating on commit, it does buy you a near-SERIALIZABLE degree of data integrity
- while maintaining a very high level of concurrency.
+ This way, subsequent readers see the new version while existing readers still hold a reference to the
+ original version in their context.
</para>
- </section>
- <section>
- <title>Data Versioning</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="DataVersions.png" format="PNG"/>
- </imageobject>
- </mediaobject>
<para>
- Optimistic locking makes use of the
- <literal>DataVersion</literal>
- interface (and an internal and default
- <literal>DefaultDataVersion</literal>
- implementation to keep a track of node versioning. In certain cases,
- where cached data is an in-memory representation of data from an external source such as a database,
- it makes sense to align the versions used in JBoss Cache with the versions used externally. As such,
- using the
- <link linkend="configuration.options">options API</link>
- , it is possible to set the
- <literal>DataVersion</literal>
- you wish to use on a per-invocation basis, allowing you to implement the
- <literal>DataVersion</literal>
- interface to hold the versioning information obtained externally before putting your data into the
- cache.
+ If a writer is unable to acquire the write lock after some time, a <literal>TimeoutException</literal> is
+ thrown. This lock acquisition timeout defaults to 10000 millis and can be configured using the
+ <literal>lockAcquisitionTimeout</literal> attribute of the <literal>locking</literal> element. See the
+ <link linkend="configuration_reference_chapter">configuration reference</link> for details.
</para>
+ <section id="mvcc.iso">
+ <title>Isolation Levels</title>
+ <para>
+ JBoss Cache 3.x supports two isolation levels: REPEATABLE_READ and READ_COMMITTED, which correspond
+ in semantic to <ulink url="http://en.wikipedia.org/wiki/Isolation_level">database-style isolation levels</ulink>.
+ Previous versions of JBoss Cache supported all 5 database isolation levels, and if an unsupported
+ isolation level is configured, it is either upgraded or downgraded to the closest supported level.
+ </para>
+ <para>
+ REPEATABLE_READ is the default isolation level, to maintain compatibility with previous versions of
+ JBoss Cache. READ_COMMITTED, while providing a slightly weaker isolation, has a significant
+ performance benefit over REPEATABLE_READ.
+ </para>
+ </section>
+ <section id="mvcc.writeskew">
+ <title>Concurrent Writers and Write-Skews</title>
+ <para>
+ Although MVCC forces writers to obtain a write lock, a phenomenon known as write skews may occur when
+ using REPEATABLE_READ:
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="writeskew.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ <para>
+ This happens when concurrent transactions performing a read and then a write, based on the value that
+ was read. Since reads involve holding on to the reference to the state in the
+ transaction context, a subsequent write would work off that original state read, which may now be stale.
+ </para>
+ <para>
+ The default behavior with dealing with a write skew is to throw a <literal>DataVersioningException</literal>,
+ when it is detected when copying state for writing. However, in most applications, a write skew may not
+ be an issue (for example, if the state written has no relationship to the state originally read) and
+ should be allowed. If your application does not care about write skews, you can allow them to happen
+ by setting the <literal>writeSkewCheck</literal> configuration attribute to <literal>false</literal>.
+ See the <link linkend="configuration_reference_chapter">configuration reference</link> for details.
+ </para>
+ <para>
+ Note that write skews cannot happen when using READ_COMMITTED since threads always work off committed
+ state.
+ </para>
+ </section>
</section>
- <section>
- <title>Configuration</title>
+ <section id="mvcc.cfg">
+ <title>Configuring Locking</title>
<para>
- Optimistic locking is enabled by using the NodeLockingScheme XML attribute, and setting it to
- "OPTIMISTIC":
+ Configuring MVCC involves using the <literal><![CDATA[<locking /> ]]></literal> configuration tag, as follows:
</para>
- <programlisting role="XML"><![CDATA[
-...
- <!--
- Node locking scheme:
- OPTIMISTIC
- PESSIMISTIC (default)
- -->
- <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
-...
- ]]></programlisting>
+ <programlisting role="XML"><![CDATA[
+ <locking
+ isolationLevel="REPEATABLE_READ"
+ lockAcquisitionTimeout="10234"
+ nodeLockingScheme="mvcc"
+ writeSkewCheck="false"
+ concurrencyLevel="1000" />
+ ]]></programlisting>
+
<para>
- It is generally advisable that if you have an eviction policy defined along with optimistic locking, you
- define
- the eviction policy's
- <literal>minTimeToLiveSeconds</literal>
- parameter to be slightly greater than the transaction
- timeout value set in your transaction manager. This ensures that data versions in the cache are not
- evicted
- while transactions are in progress
- <footnote>
- <para>See
- <ulink url="http://jira.jboss.com/jira/browse/JBCACHE-1155">JBCACHE-1155</ulink>
- </para>
- </footnote>
- .
+ <itemizedlist>
+ <listitem><literal>nodeLockingScheme</literal> - the node locking scheme used. Defaults to MVCC if
+ not provided, deprecated schemes such as <literal>pessimistic</literal> or <literal>optimistic</literal>
+ may be used but is not encouraged.</listitem>
+ <listitem><literal>isolationLevel</literal> - transaction isolation level. Defaults to REPEATABLE_READ if not provided.</listitem>
+ <listitem><literal>writeSkewCheck</literal> - defaults to <literal>true</literal> if not provided.</listitem>
+ <listitem><literal>concurrencyLevel</literal> - defaults to 500 if not provided.</listitem>
+ <listitem><literal>lockAcquisitionTimeout</literal> - only applies to writers when using MVCC. Defaults to 10000 if not provided.</listitem>
+ </itemizedlist>
</para>
</section>
</section>
+
+ <section id="transactions.locks.dep">
+ <title>Pessimistic and Optimistic Locking Schemes</title>
+ <para>
+ From JBoss Cache 3.x onwards, pessimistic and optimistic locking schemes are deprecated in favor of
+ <link linkend="transactions.locks.mvcc">MVCC</link>. It is recommended that existing applications
+ move off these legacy locking schemes as support for them will eventually be dropped altogether in future
+ releases.
+ </para>
+ <para>
+ Documentation for legacy locking schemes are not included in this user guide, and if necessary, can be
+ referenced in previous versions of this document, which can be found on
+ <ulink url="http://www.jboss.org/jbosscache">the JBoss Cache website</ulink>.
+ </para>
+ </section>
</section>
- <section>
- <title>Transactional Support</title>
+ <section id="transactions.jta">
+ <title>JTA Support</title>
- <para>JBoss Cache can be configured to use and participate in JTA compliant transactions. Alternatively, if
- transaction support is disabled, it is equivalent to setting AutoCommit to
- on where modifications are potentially
- <footnote>
- <para>Depending on whether interval-based asynchronous replication is used</para>
- </footnote>
- replicated after every change (if replication is
- enabled).
+ <para>JBoss Cache can be configured to use and participate in
+ <ulink url="http://java.sun.com/javaee/technologies/jta/">JTA</ulink> compliant transactions. Alternatively, if
+ transaction support is disabled, it is equivalent to using autocommit in JDBC calls, where
+ modifications are potentially replicated after every change (if replication is enabled).
</para>
<para>What JBoss Cache does on every incoming call is:</para>
<orderedlist>
<listitem>
<para>Retrieve the current
- <literal>javax.transaction.Transaction</literal>
- associated with the thread
+ <literal>javax.transaction.Transaction</literal> associated with the thread
</para>
</listitem>
<listitem>
@@ -303,18 +185,12 @@
</listitem>
</orderedlist>
<para>
- In order to do this, the cache has to be provided with a
- reference to environment's
- <literal>javax.transaction.TransactionManager</literal>
- . This is usually done by configuring the cache
- with the class name of an implementation of the
- <literal>TransactionManagerLookup</literal>
- interface. When the cache starts, it will create an instance of this
- class and invoke its
- <literal>getTransactionManager()</literal>
- method, which returns a reference to the
- <literal>TransactionManager</literal>
- .
+ In order to do this, the cache has to be provided with a reference to environment's
+ <literal>javax.transaction.TransactionManager</literal>. This is usually done by configuring the cache
+ with the class name of an implementation of the <literal>TransactionManagerLookup</literal>
+ interface. When the cache starts, it will create an instance of this class and invoke its
+ <literal>getTransactionManager()</literal> method, which returns a reference to the
+ <literal>TransactionManager</literal>.
</para>
<mediaobject>
@@ -324,32 +200,19 @@
</mediaobject>
<para>JBoss Cache ships with
- <literal>JBossTransactionManagerLookup</literal>
- and
- <literal>GenericTransactionManagerLookup</literal>
- . The
- <literal>JBossTransactionManagerLookup</literal>
- is able to bind to a running JBoss AS instance and retrieve a
- <literal>TransactionManager</literal>
- while the
- <literal>GenericTransactionManagerLookup</literal>
+ <literal>JBossTransactionManagerLookup</literal> and <literal>GenericTransactionManagerLookup</literal>. The
+ <literal>JBossTransactionManagerLookup</literal> is able to bind to a running JBoss AS instance and retrieve a
+ <literal>TransactionManager</literal> while the <literal>GenericTransactionManagerLookup</literal>
is able to bind to most popular Java EE application servers and provide the same functionality. A dummy
- implementation -
- <literal>DummyTransactionManagerLookup</literal>
- - is also provided, primarily for unit tests. Being a dummy, this is just for demo and testing purposes and is
- not recommended for production use.
+ implementation - <literal>DummyTransactionManagerLookup</literal> - is also provided for unit tests. Being a
+ dummy, this is not recommended for production use a it has some severe limitations to do with concurrent
+ transactions and recovery.
</para>
<para>
- An alternative to configuring a
- <literal>TransactionManagerLookup</literal>
- is to programatically inject a reference to the
- <literal>TransactionManager</literal>
- into the
- <literal>Configuration</literal>
- object's
- <literal>RuntimeConfig</literal>
- element:
+ An alternative to configuring a <literal>TransactionManagerLookup</literal> is to programatically inject a
+ reference to the <literal>TransactionManager</literal> into the <literal>Configuration</literal> object's
+ <literal>RuntimeConfig</literal> element:
</para>
<programlisting role="JAVA"><![CDATA[
@@ -358,19 +221,13 @@
]]></programlisting>
<para>
- Injecting the
- <literal>TransactionManager</literal>
- is the recommended
- approach when the
- <literal>Configuration</literal>
- is built by some sort of
- IOC container that already has a reference to the TM.
+ Injecting the <literal>TransactionManager</literal> is the recommended approach when the
+ <literal>Configuration</literal> is built by some sort of IOC container that already has a reference to the
+ <literal>TransactionManager</literal>.
</para>
<para>When the transaction commits, we initiate either a one- two-phase commit
- protocol. See
- <link linkend="replication.tx">replicated caches and transactions</link>
- for details.
+ protocol. See <link linkend="replication.tx">replicated caches and transactions</link> for details.
</para>
</section>
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -65,6 +65,7 @@
import org.jgroups.util.RspList;
import javax.transaction.TransactionManager;
+import java.net.URL;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collections;
@@ -276,8 +277,14 @@
{
try
{
- if (configuration.getClusterConfig() == null)
+ if (configuration.getJGroupsConfigFile() != null)
{
+ URL u = configuration.getJGroupsConfigFile();
+ if (log.isTraceEnabled()) log.trace("Grabbing cluster properties from " + u);
+ channel = new JChannel(u);
+ }
+ else if (configuration.getClusterConfig() == null)
+ {
log.debug("setting cluster properties to default value");
channel = new JChannel(configuration.getDefaultClusterConfig());
}
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-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/config/Configuration.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -49,6 +49,7 @@
private transient JGroupsStackParser jGroupsStackParser = new JGroupsStackParser();
private boolean invocationBatchingEnabled;
+ private URL jgroupsConfigFile;
/**
* Behavior of the JVM shutdown hook registered by the cache
@@ -209,6 +210,7 @@
private boolean syncRollbackPhase = false;
private BuddyReplicationConfig buddyReplicationConfig;
+ @Deprecated
private NodeLockingScheme nodeLockingScheme = NodeLockingScheme.MVCC;
private String muxStackName = null;
private boolean usingMultiplexer = false;
@@ -464,6 +466,11 @@
this.buddyReplicationConfig = config;
}
+ /**
+ * @deprecated will default to MVCC once optimistic and pessimistic schemes are removed.
+ * @param nodeLockingScheme
+ */
+ @Deprecated
public void setNodeLockingScheme(NodeLockingScheme nodeLockingScheme)
{
testImmutability("nodeLockingScheme");
@@ -807,6 +814,11 @@
return buddyReplicationConfig;
}
+ /**
+ * @deprecated will be removed once optimistic and pessimistic locking is removed.
+ * @return node locking scheme in use
+ */
+ @Deprecated
public NodeLockingScheme getNodeLockingScheme()
{
return nodeLockingScheme;
@@ -891,6 +903,16 @@
return url;
}
+ public URL getJGroupsConfigFile()
+ {
+ return jgroupsConfigFile;
+ }
+
+ public void setJgroupsConfigFile(URL jgroupsConfigFile)
+ {
+ this.jgroupsConfigFile = jgroupsConfigFile;
+ }
+
/**
* @return the serialization executor pool size.
*/
@@ -954,6 +976,7 @@
return false;
if (listenerAsyncPoolSize != that.listenerAsyncPoolSize) return false;
if (serializationExecutorPoolSize != that.serializationExecutorPoolSize) return false;
+ if (jgroupsConfigFile != that.jgroupsConfigFile) return false;
return true;
}
@@ -995,6 +1018,7 @@
result = 31 * result + objectInputStreamPoolSize;
result = 31 * result + objectOutputStreamPoolSize;
result = 31 * result + serializationExecutorPoolSize;
+ result = 31 * result + (jgroupsConfigFile != null ? jgroupsConfigFile.hashCode() : 0);
return result;
}
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-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -596,6 +596,32 @@
return new ParsedAttributes(stringAttribs, xmlAttribs);
}
+ public static Properties extractProperties(Element source)
+ {
+ Properties p = new Properties();
+ NodeList list = source.getElementsByTagName("property");
+
+ // loop through attributes
+ for (int loop = 0; loop < list.getLength(); loop++)
+ {
+ Node node = list.item(loop);
+ if (node.getNodeType() != Node.ELEMENT_NODE) continue;
+
+ // for each element (attribute) ...
+ Element element = (Element) node;
+ String name = element.getAttribute(NAME);
+ String valueStr = element.getAttribute("value");
+
+ if (valueStr.length() > 0)
+ {
+ valueStr = valueStr.trim();
+ valueStr = StringPropertyReplacer.replaceProperties(valueStr);
+ p.put(name, valueStr);
+ }
+ }
+ return p;
+ }
+
public static String toString(Element e)
{
try
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-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigurationParser.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -26,6 +26,7 @@
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.config.ConfigurationException;
import org.jboss.cache.config.CustomInterceptorConfig;
import org.jboss.cache.config.parsing.element.BuddyElementParser;
@@ -39,6 +40,7 @@
import org.xml.sax.ErrorHandler;
import java.io.InputStream;
+import java.net.URL;
import java.util.List;
/**
@@ -154,12 +156,10 @@
{
configureLocking(getSingleElement("locking"));
configureTransaction(getSingleElement("transaction"));
- configureReplication(getSingleElement("replication"));
+ configureClustering(getSingleElement("clustering"));
configureSerialization(getSingleElement("serialization"));
configureInvalidation(getSingleElement("invalidation"));
configureStartup(getSingleElement("startup"));
- configureStateRetrieval(getSingleElement("stateRetrieval"));
- configureTransport(getSingleElement("transport"));
configureShutdown(getSingleElement("shutdown"));
configureJmxStatistics(getSingleElement("jmxStatistics"));
configureEviction(getSingleElement("eviction"));
@@ -175,6 +175,38 @@
return config;
}
+ private void configureClustering(Element e)
+ {
+ if (e == null) return; //we might not have this configured
+ // there are 2 attribs - mode and clusterName
+ boolean repl = true;
+ String mode = getAttributeValue(e, "mode").toUpperCase();
+ if (mode.startsWith("R"))
+ repl = true;
+ else if (mode.startsWith("I"))
+ repl = false;
+
+ Element asyncEl = getSingleElementInCoreNS("async", e);
+ Element syncEl = getSingleElementInCoreNS("sync", e);
+ if (syncEl != null && asyncEl != null) throw new ConfigurationException("Cannot have sync and async elements within the same cluster element!");
+ boolean sync = asyncEl == null; // even if both are null, we default to sync
+ if (sync)
+ {
+ config.setCacheMode(repl ? CacheMode.REPL_SYNC : CacheMode.INVALIDATION_SYNC);
+ configureSyncMode(syncEl);
+ }
+ else
+ {
+ config.setCacheMode(repl ? CacheMode.REPL_ASYNC : CacheMode.INVALIDATION_ASYNC);
+ configureAsyncMode(asyncEl);
+ }
+ String cn = getAttributeValue(e, "clusterName");
+ if (existsAttribute(cn)) config.setClusterName(cn);
+ configureBuddyReplication(getSingleElementInCoreNS("buddy", e));
+ configureStateRetrieval(getSingleElementInCoreNS("stateRetrieval", e));
+ configureTransport(getSingleElementInCoreNS("jgroupsConfig", e));
+ }
+
private void configureStateRetrieval(Element element)
{
if (element == null) return; //we might not have this configured
@@ -289,18 +321,30 @@
private void configureTransport(Element element)
{
if (element == null) return; //transport might be missing
- String clusterName = getAttributeValue(element, "clusterName");
- if (existsAttribute(clusterName)) config.setClusterName(clusterName);
- String multiplexerStack = getAttributeValue(element, "multiplexerStack");
- if (existsAttribute(multiplexerStack)) config.setMultiplexerStack(multiplexerStack);
- Element clusterConfig = getSingleElementInCoreNS("jgroupsConfig", element);
- if (clusterConfig != null)
+
+ // first see if a configFile is provided
+ String cfgFile = getAttributeValue(element, "configFile");
+ if (existsAttribute(cfgFile))
{
- JGroupsStackParser stackParser = new JGroupsStackParser();
- String clusterConfigStr = stackParser.parseClusterConfigXml(clusterConfig);
- if (clusterConfigStr != null && clusterConfigStr.trim().length() > 0)
- config.setClusterConfig(clusterConfigStr);
+ // try and load this file
+ URL u = new FileLookup().lookupFileLocation(cfgFile);
+ config.setJgroupsConfigFile(u);
}
+ else
+ {
+ String multiplexerStack = getAttributeValue(element, "multiplexerStack");
+ if (existsAttribute(multiplexerStack))
+ {
+ config.setMultiplexerStack(multiplexerStack);
+ }
+ else
+ {
+ JGroupsStackParser stackParser = new JGroupsStackParser();
+ String clusterConfigStr = stackParser.parseClusterConfigXml(element);
+ if (clusterConfigStr != null && clusterConfigStr.trim().length() > 0)
+ config.setClusterConfig(clusterConfigStr);
+ }
+ }
}
private void configureStartup(Element element)
@@ -327,24 +371,6 @@
}
}
- private void configureReplication(Element element)
- {
- if (element == null) return; //might be we do not have a replication enabled
- Element async = getSingleElement("async");
- if (async != null)
- {
- config.setCacheMode(Configuration.CacheMode.REPL_ASYNC);
- configureAsyncMode(getSingleElementInCoreNS("async", element));
- }
- Element sync = getSingleElement("sync");
- if (sync != null)
- {
- config.setCacheMode(Configuration.CacheMode.REPL_SYNC);
- configureSyncMode(getSingleElementInCoreNS("sync", element));
- }
- configureBuddyReplication(getSingleElementInCoreNS("buddy", element));
- }
-
private void configureSyncMode(Element element)
{
String replTimeout = getAttributeValue(element, "replTimeout");
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/element/CustomInterceptorsElementParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/element/CustomInterceptorsElementParser.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/element/CustomInterceptorsElementParser.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,29 +1,28 @@
-/*
- * 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.config.parsing.element;
import org.jboss.cache.config.ConfigurationException;
import org.jboss.cache.config.CustomInterceptorConfig;
-import org.jboss.cache.config.parsing.ParsedAttributes;
import org.jboss.cache.config.parsing.XmlConfigHelper;
import org.jboss.cache.config.parsing.XmlParserBase;
import org.jboss.cache.interceptors.base.CommandInterceptor;
@@ -33,6 +32,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Properties;
/**
* Utility class for parsing 'buddy' element in the .xml configuration file.
@@ -106,8 +106,8 @@
{
throw new ConfigurationException("CommandInterceptor class is not properly loaded in classloader", e);
}
- ParsedAttributes attributes = XmlConfigHelper.extractAttributes(element);
- XmlConfigHelper.setValues(result, attributes.stringAttribs, false, true);
+ Properties p = XmlConfigHelper.extractProperties(element);
+ XmlConfigHelper.setValues(result, p, false, true);
return result;
}
}
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -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.config.parsing.element;
import org.jboss.cache.config.ConfigurationException;
@@ -26,7 +26,6 @@
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.config.MissingPolicyException;
-import org.jboss.cache.config.parsing.ParsedAttributes;
import org.jboss.cache.config.parsing.XmlConfigHelper;
import org.jboss.cache.config.parsing.XmlParserBase;
import org.jboss.cache.eviction.EvictionAlgorithm;
@@ -36,6 +35,7 @@
import java.util.LinkedList;
import java.util.List;
+import java.util.Properties;
/**
* Knows how to parse the <b>eviction</b> xml element.
@@ -185,8 +185,7 @@
public static void parseEvictionPolicyConfig(Element element, EvictionAlgorithmConfig target)
{
target.reset();
- ParsedAttributes attributes = XmlConfigHelper.extractAttributes(element);
- XmlConfigHelper.setValues(target, attributes.stringAttribs, false, true);
- XmlConfigHelper.setValues(target, attributes.xmlAttribs, true, true);
+ Properties p = XmlConfigHelper.extractProperties(element);
+ XmlConfigHelper.setValues(target, p, false, true);
}
}
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-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/CommandInterceptor.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -54,8 +54,6 @@
*/
public class CommandInterceptor extends AbstractVisitor
{
-
-
private CommandInterceptor next;
protected Log log;
Modified: core/trunk/src/main/java/org/jboss/cache/util/FileLookup.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/util/FileLookup.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/java/org/jboss/cache/util/FileLookup.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -24,9 +24,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
/**
* Holds the logic of looking up a file, in the following sequence:
@@ -79,4 +82,28 @@
}
return is;
}
+
+ public URL lookupFileLocation(String filename)
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ URL u = cl == null ? null : cl.getResource(filename);
+ if (u == null)
+ {
+ // check system class loader
+ u = getClass().getClassLoader().getResource(filename);
+ }
+ if (u == null)
+ {
+ File f = new File(filename);
+ if (f.exists()) try
+ {
+ u = f.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // what do we do here?
+ }
+ }
+ return u;
+ }
}
Added: core/trunk/src/main/resources/config-samples/all.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/all.xml (rev 0)
+++ core/trunk/src/main/resources/config-samples/all.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
+
+
+ <!--
+ isolation levels supported: READ_COMMITTED and REPEATABLE_READ
+ nodeLockingSchemes: mvcc, pessimistic (deprecated), optimistic (deprecated)
+ -->
+ <locking
+ isolationLevel="REPEATABLE_READ"
+ lockParentForChildInsertRemove="false"
+ lockAcquisitionTimeout="20000"
+ nodeLockingScheme="mvcc"
+ writeSkewCheck="false"
+ concurrencyLevel="500"/>
+
+ <!--
+ Used to register a transaction manager and participate in ongoing transactions.
+ -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"
+ syncRollbackPhase="false"
+ syncCommitPhase="false"/>
+
+ <!--
+ Used to register JMX statistics in any available MBean server
+ -->
+ <jmxStatistics
+ enabled="false"/>
+
+ <!--
+ If region based marshalling is used, defines whether new regions are inactive on startup.
+ -->
+ <startup
+ regionsInactiveOnStartup="true"/>
+
+ <!--
+ Used to register JVM shutdown hooks.
+ hookBehavior: DEFAULT, REGISTER, DONT_REGISTER
+ -->
+ <shutdown
+ hookBehavior="DEFAULT"/>
+
+ <!--
+ Used to define async listener notification thread pool size
+ -->
+ <listeners
+ asyncPoolSize="1"/>
+
+ <!--
+ Used to enable invocation batching and allow the use of Cache.startBatch()/endBatch() methods.
+ -->
+ <invocationBatching
+ enabled="false"/>
+
+ <!--
+ serialization related configuration, used for replication and cache loading
+ -->
+ <serialization
+ objectInputStreamPoolSize="12"
+ objectOutputStreamPoolSize="14"
+ version="3.0.0"
+ marshallerClass="org.jboss.cache.marshall.VersionAwareMarshaller"
+ useLazyDeserialization="false"
+ useRegionBasedMarshalling="false"/>
+
+ <!--
+ This element specifies that the cache is clustered.
+ modes supported: replication (r) or invalidation (i).
+ -->
+ <clustering mode="replication" clusterName="JBossCache-cluster">
+
+ <!--
+ Defines whether to retrieve state on startup
+ -->
+ <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+
+ <!--
+ Network calls are synchronous.
+ -->
+ <sync replTimeout="20000"/>
+ <!--
+ Uncomment this for async replication.
+ -->
+ <!-- <async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500" serializationExecutorPoolSize="20" /> -->
+
+ <!-- Uncomment to use Buddy Replication -->
+ <!--
+ <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
+ <dataGravitation auto="true" removeOnFind="true" searchBackupTrees="true"/>
+ <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
+ <properties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </properties>
+ </locator>
+ </buddy>
+ -->
+
+ <!--
+ Configures the JGroups channel. Looks up a JGroups config file on the classpath or filesystem. udp.xml
+ ships with jgroups.jar and will be picked up by the class loader.
+ -->
+ <jgroupsConfig configFile="udp.xml">
+ <!-- uncomment to define a JGroups stack here
+
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <pbcast.FLUSH timeout="0"/>
+ -->
+ </jgroupsConfig>
+ </clustering>
+
+ <!--
+ Eviction configuration. WakeupInterval defines how often the eviction thread runs, in milliseconds. 0 means
+ the eviction thread will never run.
+ -->
+ <eviction wakeUpInterval="500">
+ <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
+ </default>
+ <region name="/org/jboss/data1">
+ <property name="timeToLive" value="2000" />
+ </region>
+ <region name="/org/jboss/data2" algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="100000">
+ <property name="maxNodes" value="3000" />
+ <property name="minTimeToLive" value="4000" />
+ </region>
+ </eviction>
+
+ <!--
+ Cache loaders.
+
+ If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted. Similarly, when the state
+ is accessed again, it is removed from the cache loader and loaded into memory.
+
+ Otherwise, state is always maintained in the cache loader as well as in memory.
+
+ Set 'shared' to true if all instances in the cluster use the same cache loader instance, e.g., are talking to the
+ same database.
+ -->
+ <loaders passivation="false" shared="false">
+ <preload>
+ <node fqn="/org/jboss"/>
+ <node fqn="/org/tempdata"/>
+ </preload>
+
+ <!--
+ we can have multiple cache loaders, which get chained
+ -->
+ <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true"
+ ignoreModifications="true" purgeOnStartup="true">
+ <properties>
+ cache.jdbc.datasource=DefaultDS
+ cache.jdbc.table.name=jbosscache
+ cache.jdbc.table.create=true
+ cache.jdbc.table.drop=true
+ </properties>
+ <singletonStore enabled="true" class="org.jboss.cache.loader.SingletonStoreCacheLoader">
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=20000
+ </properties>
+ </singletonStore>
+ </loader>
+ </loaders>
+
+ <!--
+ Define custom interceptors. All custom interceptors need to extend org.jboss.cache.interceptors.base.CommandInterceptor
+ -->
+ <!--
+ <customInterceptors>
+ <interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor">
+ <property name="attrOne" value="value1" />
+ <property name="attrTwo" value="value2" />
+ </interceptor>
+ <interceptor position="last" class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/>
+ <interceptor index="3" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/>
+ <interceptor before="org.jboss.cache.interceptors.CallInterceptor"
+ class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/>
+ <interceptor after="org.jboss.cache.interceptors.CallInterceptor"
+ class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/>
+ </customInterceptors>
+ -->
+</jbosscache>
Modified: core/trunk/src/main/resources/config-samples/buddy-replication.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/buddy-replication.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config-samples/buddy-replication.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,31 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
-
- <!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <!--
- timeout: The max amount of time (in milliseconds) we wait until the state (i.e. the contents of the cache) is
+ <clustering mode="replication">
+ <!--
+ timeout: The max amount of time (in milliseconds) we wait until the state (i.e. the contents of the cache) is
retrieved from existing members in a clustered environment
- -->
- <stateRetrieval timeout="20000"/>
+ -->
+ <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster">
+
<!-- JGroups protocol stack properties. -->
<jgroupsConfig>
<TCP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="true"
@@ -52,11 +38,8 @@
<pbcast.STREAMING_STATE_TRANSFER/>
<pbcast.FLUSH timeout="0"/>
</jgroupsConfig>
- </transport>
- <!-- this is a replicated cache-->
- <replication>
<!-- Number of milliseconds to wait until all responses for a synchronous call have been received -->
<sync replTimeout="15000"/>
@@ -89,5 +72,5 @@
</properties>
</locator>
</buddy>
- </replication>
+ </clustering>
</jbosscache>
Modified: core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,20 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
-
<!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
@@ -22,12 +8,12 @@
<eviction wakeUpInterval="5000">
<!-- Cache wide default -->
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">3000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="3000" />
</default>
<region name="/org/jboss/test/data">
- <attribute name="maxNodes">100</attribute>
- <attribute name="timeToLive">3000</attribute>
+ <property name="maxNodes" value="100" />
+ <property name="timeToLive" value="3000" />
</region>
</eviction>
@@ -41,8 +27,12 @@
<node fqn="/"/>
</preload>
<!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
- <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
- ignoreModifications="false" purgeOnStartup="false">
+ <loader
+ class="org.jboss.cache.loader.JDBCCacheLoader"
+ async="false"
+ fetchPersistentState="true"
+ ignoreModifications="false"
+ purgeOnStartup="false">
<properties>
cache.jdbc.table.name=jbosscache
cache.jdbc.table.create=true
Modified: core/trunk/src/main/resources/config-samples/eviction-enabled.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/eviction-enabled.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config-samples/eviction-enabled.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,52 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
-
<!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<!--
- wakeUpInterval: time interval (millis) when the eviction thread kicks in
- defaultPolicyClass: if policy class is not specified for a region, this one is considered as default
- defaultEventQueueSize if policy event queue size is not specified for a region, this one is considered as default
+ wakeUpInterval: time interval (millis) when the eviction thread kicks in.
-->
<eviction wakeUpInterval="5000">
- <!-- Cache wide default -->
+ <!--
+ Cache wide defaults
+ default algorithmClass: if an algorithm class is not specified for a region, this one is used by default.
+ default eventQueueSize if an event queue size is not specified for a region, this one is used by default.
+ -->
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</default>
<!-- configurations for various regions-->
- <region name="/org/jboss/data">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <region name="/org/jboss/data1">
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</region>
- <region name="/org/jboss/test/data">
- <attribute name="maxNodes">5</attribute>
- <attribute name="timeToLive">4000</attribute>
+ <region name="/org/jboss/data2" actionPolicyClass="org.jboss.cache.eviction.RemoveOnEvictActionPolicy">
+ <property name="maxNodes" value="5" />
+ <property name="timeToLive" value="4000" />
</region>
- <region name="/test">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLive">4000</attribute>
+ <region name="/org/jboss/data3" algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm">
+ <property name="maxNodes" value="10000" />
+ <property name="minTimeToLive" value="4000" />
</region>
- <region name="/maxAgeTest">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLive">8000</attribute>
- <attribute name="maxAge">10000</attribute>
+ <region name="/org/jboss/data1/otherstuff" eventQueueSize="100000">
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="8000" />
+ <property name="maxAge" value="10000" />
</region>
</eviction>
</jbosscache>
Added: core/trunk/src/main/resources/config-samples/external-jgroups-file.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/external-jgroups-file.xml (rev 0)
+++ core/trunk/src/main/resources/config-samples/external-jgroups-file.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
+
+ <!-- Configure the TransactionManager -->
+ <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+
+ <clustering>
+ <sync />
+ <!--
+ Here we specify a path to an external JGroups configuration file. First the classpath is scanned, and then
+ the filesystem for the file. In this case, "udp.xml" ships with jgroups.jar and will be picked up by the
+ classloader.
+ -->
+ <jgroupsConfig configFile="udp.xml"/>
+ </clustering>
+</jbosscache>
Modified: core/trunk/src/main/resources/config-samples/invalidation-async.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/invalidation-async.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config-samples/invalidation-async.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,32 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
-
<!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <!--
- timeout: The max amount of time (in milliseconds) we wait until the
+ <clustering mode="invalidation">
+ <!--
+ timeout: The max amount of time (in milliseconds) we wait until the
state (i.e. the contents of the cache) are retrieved from
existing members in a clustered environment
- -->
- <stateRetrieval timeout="20000"/>
+ -->
+ <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster">
<!-- JGroups protocol stack properties. -->
<jgroupsConfig>
<UDP discard_incompatible_packets="true" enable_bundling="true" enable_diagnostics="false" ip_ttl="2"
@@ -56,11 +42,10 @@
<pbcast.STREAMING_STATE_TRANSFER/>
<pbcast.FLUSH timeout="0"/>
</jgroupsConfig>
- </transport>
- <!-- this uses replication rather than invalidation -->
- <invalidation>
- <!-- invalidation messages are not being sent synchronously -->
- <async useReplQueue="false"/>
- </invalidation>
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+
+ </clustering>
</jbosscache>
Modified: core/trunk/src/main/resources/config-samples/local.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/local.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config-samples/local.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,24 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
- <!-- By not specifying neither an 'replication' nor an 'invalidation' element, the cache is defaulted to local -->
-
-
- <!--
- isolcationLevels : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
-
- <!-- Configure the TransactionManager -->
+ <!-- By not specifying the 'clustering' element, the cache runs in LOCAL mode. -->
+ <!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
</jbosscache>
Modified: core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,66 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
-
<!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <!--
- timeout: The max amount of time (in milliseconds) we wait until the
- state (i.e. the contents of the cache) are retrieved from
- existing members in a clustered environment
- -->
- <stateRetrieval timeout="20000"/>
-
- <!-- here is where we specify the multiplexer stack -->
- <transport clusterName="JBossCache-Cluster" multiplexerStack="fc-fast-minimalthreads"/>
-
- <!-- this is replicated cache-->
- <replication>
- <!-- Number of milliseconds to wait until all responses for a
- synchronous call have been received -->
- <sync replTimeout="15000"/>
-
- <!-- poolName: A way to specify a preferred replication group. If specified, we try and pick a buddy why shares
- the same pool name (falling back to other buddies if not available). This allows the sysadmin
- to hint at backup buddies are picked, so for example, nodes may be hinted to pick buddies
- on a different physical rack or power supply for added fault tolerance.
- communicationTimeout : communication timeout for inter-buddy group organisation messages (such as assigning
- to and removing from groups
- -->
- <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
-
- <!-- auto : Should data gravitation be attempted whenever there is a cache miss on finding a node?
- If false, data will only be gravitated if an Option is set enabling it
- removeOnFind: removes data on remote caches' trees and backup subtrees when gravitated to a
- new data owner
- searchBackupTrees: search backup subtrees as well for data when gravitating. Results in backup nodes
- being able to answer data gravitation requests.-->
- <dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
-
- <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
- <!-- numBuddies is the number of backup nodes each node maintains. ignoreColocatedBuddies means that
- each node will *try* to select a buddy on a different physical host. If not able to do so though,
- it will fall back to colocated nodes. -->
- <properties>
- numBuddies = 1
- ignoreColocatedBuddies = true
- </properties>
- </locator>
- </buddy>
- </replication>
-
+ <clustering>
+ <sync />
+ <!-- Here is where we specify the multiplexer stack to use. -->
+ <jgroupsConfig multiplexerStack="fc-fast-minimalthreads"/>
+ </clustering>
</jbosscache>
Copied: core/trunk/src/main/resources/config-samples/string-property-replaced.xml (from rev 6989, core/trunk/src/test/resources/configs/string-property-replaced.xml)
===================================================================
--- core/trunk/src/main/resources/config-samples/string-property-replaced.xml (rev 0)
+++ core/trunk/src/main/resources/config-samples/string-property-replaced.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
+
+ <locking lockAcquisitionTimeout="${test.property.LockAcquisitionTimeout:15000}"
+ nodeLockingScheme="${test.property.NodeLockingScheme:MVCC}"/>
+
+ <transaction syncCommitPhase="${test.property.SyncCommitPhase:true}" syncRollbackPhase="true"/>
+
+ <serialization useRegionBasedMarshalling="true"/>
+ <clustering>
+ <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp-sync" />
+ <sync replTimeout="20000"/>
+ <buddy enabled="${test.property.BuddyReplicationConfig.enabled:true}"
+ poolName="${test.property.BuddyReplicationConfig.buddyPoolName:default}" communicationTimeout="2000">
+ <dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
+ <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
+ <properties>
+ ignoreColocatedBuddies = true
+ numBuddies = ${test.property.BuddyReplicationConfig.numBuddies:1}
+ </properties>
+ </locator>
+ </buddy>
+ </clustering>
+
+ <startup regionsInactiveOnStartup="true"/>
+ <eviction wakeUpInterval="5000">
+ <default algorithmClass="${test.property.EvictionPolicyConfig.policyClass:org.jboss.cache.eviction.LRUAlgorithm}">
+ <property name="maxNodes" value="${test.property.EvictionPolicyConfig.maxNodes:5000}" />
+ <property name="timeToLive" value="1000000" />
+ </default>
+ </eviction>
+ <loaders passivation="true" shared="false">
+ <preload>
+ <node fqn="/"/>
+ </preload>
+ <loader class="org.jboss.cache.loader.FileCacheLoader" async="false" fetchPersistentState="true"
+ ignoreModifications="false">
+ <properties>
+ location=${test.property.CacheLoaderConfiguration.location,java.io.tmpdir:/tmp}
+ </properties>
+ </loader>
+ </loaders>
+</jbosscache>
Modified: core/trunk/src/main/resources/config-samples/total-replication.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/total-replication.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config-samples/total-replication.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,31 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
-
<!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <!--
- timeout: The max amount of time (in milliseconds) we wait until the state (i.e. the contents of the cache) is
- retrieved from existing members in a clustered environment
- -->
- <stateRetrieval timeout="20000"/>
-
- <transport clusterName="JBossCache-Cluster">
+ <clustering mode="replication">
<!-- JGroups protocol stack properties. -->
<jgroupsConfig>
<UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
@@ -54,14 +34,10 @@
<pbcast.FLUSH timeout="0"/>
</jgroupsConfig>
- </transport>
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
- <!-- this is a replicated cache-->
- <replication>
- <!-- Number of milliseconds to wait until all responses for a synchronous call have been received -->
- <sync replTimeout="15000"/>
-
- <!--<async useReplQueue="false" replQueueInterval="1500" replQueueMaxElements="30000"/>-->
- </replication>
+ </clustering>
</jbosscache>
Modified: core/trunk/src/main/resources/config2to3.xslt
===================================================================
--- core/trunk/src/main/resources/config2to3.xslt 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/config2to3.xslt 2008-10-23 01:10:13 UTC (rev 7002)
@@ -10,8 +10,6 @@
<xsl:call-template name="transaction"/>
<xsl:call-template name="serialization"/>
<xsl:call-template name="startup"/>
- <xsl:call-template name="stateRetrieval"/>
- <xsl:call-template name="transport"/>
<xsl:apply-templates select="//attribute"/>
</xsl:element>
</xsl:template>
@@ -69,6 +67,52 @@
</xsl:if>
</xsl:template>
+ <xsl:template match="//attribute[@name='CacheMode']">
+ <xsl:if test="(normalize-space(.) = 'INVALIDATION_ASYNC') or (normalize-space(.) = 'INVALIDATION_SYNC')">
+ <clustering mode="invalidation">
+ <xsl:if test="//attribute[@name='ClusterName']">
+ <xsl:attribute name="clusterName">
+ <xsl:value-of select="normalize-space(//attribute[@name='ClusterName'])"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="(normalize-space(.) = 'INVALIDATION_ASYNC')">
+ <xsl:element name="async">
+ <xsl:call-template name="asyncAttributes"/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:if test="(normalize-space(.) = 'INVALIDATION_SYNC')">
+ <xsl:element name="sync">
+ <xsl:call-template name="syncAttributes"/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:call-template name="stateRetrieval" />
+ <xsl:call-template name="transport"/>
+ </clustering>
+ </xsl:if>
+ <xsl:if test="(normalize-space(.) = 'REPL_ASYNC') or (normalize-space(.) = 'REPL_SYNC')">
+ <clustering mode="replication">
+ <xsl:if test="//attribute[@name='ClusterName']">
+ <xsl:attribute name="clusterName">
+ <xsl:value-of select="normalize-space(//attribute[@name='ClusterName'])"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="(normalize-space(.) = 'REPL_ASYNC')">
+ <xsl:element name="async">
+ <xsl:call-template name="asyncAttributes"/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:if test="(normalize-space(.) = 'REPL_SYNC')">
+ <xsl:element name="sync">
+ <xsl:call-template name="syncAttributes"/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:call-template name="buddy"/>
+ <xsl:call-template name="stateRetrieval" />
+ <xsl:call-template name="transport"/>
+ </clustering>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template name="serialization">
<xsl:if
test="//attribute[@name='ObjectInputStreamPoolSize'] | //attribute[@name='ObjectOutputStreamPoolSize'] | //attribute[@name='ReplicationVersion'] | //attribute[@name='MarshallerClass'] | //attribute[@name='UseLazyDeserialization'] | //attribute[@name='UseRegionBasedMarshalling']">
@@ -108,38 +152,6 @@
</xsl:if>
</xsl:template>
- <xsl:template match="//attribute[@name='CacheMode']">
- <xsl:if test="(normalize-space(.) = 'INVALIDATION_ASYNC') or (normalize-space(.) = 'INVALIDATION_SYNC')">
- <invalidation>
- <xsl:if test="(normalize-space(.) = 'INVALIDATION_ASYNC')">
- <xsl:element name="async">
- <xsl:call-template name="asyncAttributes"/>
- </xsl:element>
- </xsl:if>
- <xsl:if test="(normalize-space(.) = 'INVALIDATION_SYNC')">
- <xsl:element name="sync">
- <xsl:call-template name="syncAttributes"/>
- </xsl:element>
- </xsl:if>
- </invalidation>
- </xsl:if>
- <xsl:if test="(normalize-space(.) = 'REPL_ASYNC') or (normalize-space(.) = 'REPL_SYNC')">
- <replication>
- <xsl:if test="(normalize-space(.) = 'REPL_ASYNC')">
- <xsl:element name="async">
- <xsl:call-template name="asyncAttributes"/>
- </xsl:element>
- </xsl:if>
- <xsl:if test="(normalize-space(.) = 'REPL_SYNC')">
- <xsl:element name="sync">
- <xsl:call-template name="syncAttributes"/>
- </xsl:element>
- </xsl:if>
- <xsl:call-template name="buddy"/>
- </replication>
- </xsl:if>
- </xsl:template>
-
<xsl:template name="buddy">
<xsl:if test="//attribute[@name='BuddyReplicationConfig']">
<buddy>
@@ -354,22 +366,26 @@
<xsl:template name="attributesSecondsSubstitution">
<xsl:param name="attr"/>
- <attribute>
+ <property>
<xsl:choose>
<xsl:when test="contains($attr/@name,'Seconds')">
<xsl:attribute name="name">
<xsl:value-of select="substring-before($attr/@name,'Seconds')"/>
</xsl:attribute>
- <xsl:value-of select="concat($attr,'000')"/>
+ <xsl:attribute name="value">
+ <xsl:value-of select="concat($attr,'000')"/>
+ </xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="name">
<xsl:value-of select="string($attr/@name)"/>
</xsl:attribute>
- <xsl:value-of select="$attr"/>
+ <xsl:attribute name="value">
+ <xsl:value-of select="$attr"/>
+ </xsl:attribute>
</xsl:otherwise>
</xsl:choose>
- </attribute>
+ </property>
</xsl:template>
<xsl:template match="//attribute[@name='CacheLoaderConfig'] | //attribute[@name='CacheLoaderConfiguration']">
@@ -475,24 +491,17 @@
<xsl:template name="transport">
<xsl:if
- test="//attribute[@name='ClusterName'] | //attribute[@name='MultiplexerStack'] | //attribute[@name='ClusterConfig']">
- <transport>
- <xsl:if test="//attribute[@name='ClusterName']">
- <xsl:attribute name="clusterName">
- <xsl:value-of select="normalize-space(//attribute[@name='ClusterName'])"/>
- </xsl:attribute>
- </xsl:if>
+ test="//attribute[@name='MultiplexerStack'] | //attribute[@name='ClusterConfig']">
+ <jgroupsConfig>
<xsl:if test="//attribute[@name='MultiplexerStack']">
<xsl:attribute name="multiplexerStack">
<xsl:value-of select="normalize-space(//attribute[@name='MultiplexerStack'])"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="//attribute[@name='ClusterConfig']">
- <jgroupsConfig>
<xsl:copy-of select="//attribute[@name='ClusterConfig']/config/*"/>
- </jgroupsConfig>
</xsl:if>
- </transport>
+ </jgroupsConfig>
</xsl:if>
</xsl:template>
Modified: core/trunk/src/main/resources/schema/jbosscache-config-3.0.xsd
===================================================================
--- core/trunk/src/main/resources/schema/jbosscache-config-3.0.xsd 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/main/resources/schema/jbosscache-config-3.0.xsd 2008-10-23 01:10:13 UTC (rev 7002)
@@ -10,21 +10,62 @@
<xs:element name="locking" type="tns:lockingType" minOccurs="0" maxOccurs="1"/>
<xs:element name="transaction" type="tns:transactionType" minOccurs="0" maxOccurs="1"/>
<xs:element name="startup" type="tns:startupType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="stateRetrieval" type="tns:stateRetrievalType" minOccurs="0" maxOccurs="1"/>
<xs:element name="shutdown" type="tns:shutdownType" minOccurs="0" maxOccurs="1"/>
<xs:element name="serialization" type="tns:serializationType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="replication" type="tns:replicationType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="invalidation" type="tns:invalidationType" minOccurs="0" maxOccurs="1"/>
<xs:element name="jmxStatistics" type="tns:jmxStatisticsType" minOccurs="0" maxOccurs="1"/>
<xs:element name="listeners" type="tns:listenersType" minOccurs="0" maxOccurs="1"/>
<xs:element name="invocationBatching" type="tns:invocationBatchingType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="transport" type="tns:transportType" minOccurs="0" maxOccurs="1"/>
<xs:element name="eviction" type="tns:evictionType" minOccurs="0" maxOccurs="1"/>
<xs:element name="loaders" type="tns:loadersType" minOccurs="0" maxOccurs="1"/>
<xs:element name="customInterceptors" type="tns:customInterceptorsType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="clustering" type="tns:clusteringType" minOccurs="0" maxOccurs="1"/>
</xs:all>
</xs:complexType>
+ <xs:complexType name="clusteringType">
+ <xs:all>
+ <xs:element name="sync" type="tns:syncType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="async" type="tns:asyncType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="stateRetrieval" type="tns:stateRetrievalType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="buddy" minOccurs="0" maxOccurs="1">
+ <xs:complexType>
+ <xs:all minOccurs="0">
+ <xs:element name="dataGravitation" maxOccurs="1">
+ <xs:complexType>
+ <xs:attribute name="auto" type="tns:booleanType"/>
+ <xs:attribute name="removeOnFind" type="tns:booleanType"/>
+ <xs:attribute name="searchBackupTrees" type="tns:booleanType"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="locator" maxOccurs="1">
+ <xs:complexType>
+ <xs:all>
+ <xs:element name="properties" type="xs:string" maxOccurs="1"/>
+ </xs:all>
+ <xs:attribute name="class" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:all>
+ <xs:attribute name="enabled" type="tns:booleanType"/>
+ <xs:attribute name="poolName" type="xs:string"/>
+ <xs:attribute name="communicationTimeout" type="xs:integer"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="jgroupsConfig" type="tns:jgroupsConfigType" minOccurs="0" maxOccurs="1"/>
+ </xs:all>
+ <xs:attribute name="mode">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern
+ value="[Rr][Ee][Pp][Ll][Ii][Cc][Aa][Tt][Ii][Oo][Nn]|[Ii][Nn][Vv][Aa][Ll][Ii][Dd][Aa][Tt][Ii][Oo][Nn]|[Rr]|[Ii]|\$\{.*\}"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="clusterName" type="xs:string" />
+
+
+ </xs:complexType>
+
<xs:complexType name="lockingType">
<xs:attribute name="isolationLevel">
<xs:simpleType>
@@ -95,46 +136,6 @@
</xs:restriction>
</xs:simpleType>
- <xs:complexType name="replicationType">
- <xs:sequence>
- <xs:choice>
- <xs:element name="sync" type="tns:syncType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="async" type="tns:asyncType" minOccurs="0" maxOccurs="1"/>
- </xs:choice>
- <xs:element name="buddy" minOccurs="0" maxOccurs="1">
- <xs:complexType>
- <xs:all minOccurs="0">
- <xs:element name="dataGravitation" maxOccurs="1">
- <xs:complexType>
- <xs:attribute name="auto" type="tns:booleanType"/>
- <xs:attribute name="removeOnFind" type="tns:booleanType"/>
- <xs:attribute name="searchBackupTrees" type="tns:booleanType"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="locator" maxOccurs="1">
- <xs:complexType>
- <xs:all>
- <xs:element name="properties" type="xs:string" maxOccurs="1"/>
- </xs:all>
- <xs:attribute name="class" type="xs:string"/>
- </xs:complexType>
- </xs:element>
- </xs:all>
- <xs:attribute name="enabled" type="tns:booleanType"/>
- <xs:attribute name="poolName" type="xs:string"/>
- <xs:attribute name="communicationTimeout" type="xs:integer"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="invalidationType">
- <xs:choice>
- <xs:element name="sync" type="tns:syncType"/>
- <xs:element name="async" type="tns:asyncType"/>
- </xs:choice>
- </xs:complexType>
-
<xs:complexType name="jmxStatisticsType">
<xs:attribute name="enabled" type="tns:booleanType"/>
</xs:complexType>
@@ -147,11 +148,11 @@
<xs:attribute name="enabled" type="tns:booleanType"/>
</xs:complexType>
- <xs:complexType name="transportType">
+ <xs:complexType name="jgroupsConfigType">
<xs:sequence>
- <xs:element name="jgroupsConfig" type="xs:anyType" minOccurs="0" maxOccurs="1"/>
+ <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
- <xs:attribute name="clusterName" type="xs:string"/>
+ <xs:attribute name="configFile" type="xs:string"/>
<xs:attribute name="multiplexerStack" type="xs:string"/>
</xs:complexType>
@@ -176,7 +177,7 @@
<xs:complexType name="evictionRegionType">
<xs:sequence>
- <xs:element name="attribute" maxOccurs="unbounded" type="tns:attributeType"/>
+ <xs:element name="property" maxOccurs="unbounded" type="tns:propertyType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="algorithmClass" type="xs:string"/>
@@ -228,7 +229,7 @@
<xs:element name="interceptor" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
- <xs:element name="attribute" maxOccurs="unbounded" type="tns:attributeType" minOccurs="0"/>
+ <xs:element name="property" maxOccurs="unbounded" type="tns:propertyType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="class" type="xs:string"/>
<xs:attribute name="position">
@@ -246,10 +247,11 @@
</xs:sequence>
</xs:complexType>
- <xs:complexType name="attributeType">
+ <xs:complexType name="propertyType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="value" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Deleted: core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.cache.config;
-
-
-import org.jboss.cache.config.Configuration.CacheMode;
-import org.jboss.cache.config.parsing.XmlConfigurationParser;
-import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.transaction.TransactionSetup;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNull;
-import org.testng.annotations.Test;
-/**
- * @author <a href="mailto:manik AT jboss DOT org">Manik Surtani (manik AT jboss DOT org)</a>
- */
-@Test(groups = {"functional", "jgroups", "transaction"})
-public class ConfigurationTest
-{
- public void testReplSyncStack() throws Exception
- {
- Configuration conf = UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC);
-
- //now test that everything has been read in properly.
- assertEquals(Configuration.CacheMode.REPL_SYNC, conf.getCacheMode());
- assertEquals(TransactionSetup.getManagerLookup(), conf.getTransactionManagerLookupClass());
- assertEquals(IsolationLevel.REPEATABLE_READ, conf.getIsolationLevel());
- assertEquals(false, conf.isUseReplQueue());
- assertEquals("JBossCache-Cluster", conf.getClusterName());
- assertEquals(true, conf.isFetchInMemoryState());
- assertEquals(15000, conf.getStateRetrievalTimeout());
- assertEquals(15000, conf.getSyncReplTimeout());
- assertEquals(10000, conf.getLockAcquisitionTimeout());
- assertNull(conf.getEvictionConfig());
- assertEquals(false, conf.isUseRegionBasedMarshalling());
-
- // not testing the JGroups configs since JGroups doesn't expose their config as a bean.
- // comparing an XML block is a PITA.
- }
-
- public void testMultiplexerStack() throws Exception
- {
- XmlConfigurationParser parser = new XmlConfigurationParser();
- Configuration conf = parser.parseFile("configs/mux.xml");
-
- // test that multiplexer settings have been read in properly.
- //assertEquals("MultiplexerService", "jgroups.mux:name=Multiplexer", conf.getMultiplexerService());
- assertEquals("MultiplexerStack", "tcp", conf.getMultiplexerStack());
- assertNull("ClusterConfig", conf.getClusterConfig());
- }
-
-}
Modified: core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/ConfigurationTransformerTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,13 +1,13 @@
package org.jboss.cache.config;
-import org.testng.annotations.Test;
import org.jboss.cache.config.parsing.ConfigFilesConvertor;
import org.jboss.cache.config.parsing.XmlConfigurationParser;
import org.jboss.cache.config.parsing.XmlConfigurationParser2x;
+import org.testng.annotations.Test;
-import java.io.File;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.File;
/**
* Test how xsl for migrating config files from 2.x to 3.x works.
@@ -62,7 +62,7 @@
String fileName = getFileName(file);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
convertor.parse(fileName, baos, XSLT_FILE);
-// System.out.println("result = \n" + baos);
+ System.out.println("result = \n" + baos);
XmlConfigurationParser newParser = new XmlConfigurationParser();
XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
@@ -94,7 +94,7 @@
String fileName = getFileName(file);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
convertor.parse(fileName, baos, XSLT_FILE);
-// System.out.println("result = \n" + baos);
+ System.out.println("result = \n" + baos);
XmlConfigurationParser newParser = new XmlConfigurationParser();
XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
Modified: core/trunk/src/test/java/org/jboss/cache/config/StringPropertyReplacementTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/StringPropertyReplacementTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/StringPropertyReplacementTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -81,7 +81,7 @@
Configuration cfg = new XmlConfigurationParser().parseFile(STRING_REPLACED_FILE);
- assertEquals(NodeLockingScheme.OPTIMISTIC, cfg.getNodeLockingScheme());
+ assertEquals(NodeLockingScheme.MVCC, cfg.getNodeLockingScheme());
assertFalse(cfg.isSyncCommitPhase());
assertTrue(cfg.isSyncRollbackPhase());
assertEquals(15000, cfg.getLockAcquisitionTimeout());
Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/CacheConfigsTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/CacheConfigsTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/CacheConfigsTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,6 +1,7 @@
package org.jboss.cache.config.parsing;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.lock.IsolationLevel;
import org.testng.annotations.Test;
@@ -25,7 +26,7 @@
" xmlns=\"urn:jboss:jbosscache-core:config:3.0\">\n" +
" <locking isolationLevel=\"REPEATABLE_READ\" lockAcquisitionTimeout=\"15000\"/>\n" +
" <transaction transactionManagerLookupClass=\"org.jboss.cache.transaction.GenericTransactionManagerLookup\"/>\n" +
- " <stateRetrieval timeout=\"20000\"/>\n" +
+ " <clustering><stateRetrieval timeout=\"20000\"/></clustering>\n" +
" </jbosscache>\n" +
" </cache-config>\n" +
"\n" +
@@ -34,7 +35,7 @@
" xmlns=\"urn:jboss:jbosscache-core:config:3.0\">\n" +
" <locking isolationLevel=\"READ_COMMITTED\" lockAcquisitionTimeout=\"15000\"/>\n" +
" <transaction transactionManagerLookupClass=\"org.jboss.cache.transaction.GenericTransactionManagerLookup\"/>\n" +
- " <stateRetrieval timeout=\"20000\"/>\n" +
+ " <clustering><stateRetrieval timeout=\"20000\"/></clustering>\n" +
" </jbosscache>\n" +
" </cache-config>\n" +
"\n" +
@@ -42,7 +43,7 @@
" <jbosscache xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
" xmlns=\"urn:jboss:jbosscache-core:config:3.0\">\n" +
" <locking isolationLevel=\"READ_COMMITTED\" lockAcquisitionTimeout=\"100\"/>\n" +
- " <stateRetrieval timeout=\"100\"/>\n" +
+ " <clustering><stateRetrieval timeout=\"100\"/></clustering>\n" +
" </jbosscache>\n" +
" </cache-config>\n" +
"</cache-configs>";
@@ -53,7 +54,7 @@
Map<String, Configuration> map = ccxp.parseConfigs(bais);
Map toExpect = buildExpectedValues();
- assert map.equals(toExpect);
+ assert map.equals(toExpect) : "Expected " + toExpect + " but was " + map;
}
public void testLegacyFormat() throws CloneNotSupportedException
@@ -64,6 +65,7 @@
" <attribute name=\"LockAcquisitionTimeout\">15000</attribute>\n" +
" <attribute name=\"TransactionManagerLookupClass\">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>\n" +
" <attribute name=\"StateRetrievalTimeout\">20000</attribute>\n" +
+ " <attribute name=\"CacheMode\">REPL_SYNC</attribute>"+
" </cache-config>\n" +
"\n" +
" <cache-config name=\"B\">\n" +
@@ -71,12 +73,14 @@
" <attribute name=\"LockAcquisitionTimeout\">15000</attribute>\n" +
" <attribute name=\"TransactionManagerLookupClass\">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>\n" +
" <attribute name=\"StateRetrievalTimeout\">20000</attribute>\n" +
+ " <attribute name=\"CacheMode\">REPL_SYNC</attribute>"+
" </cache-config>\n" +
"\n" +
" <cache-config name=\"C\">\n" +
" <attribute name=\"IsolationLevel\">READ_COMMITTED</attribute>\n" +
" <attribute name=\"LockAcquisitionTimeout\">100</attribute>\n" +
" <attribute name=\"StateRetrievalTimeout\">100</attribute>\n" +
+ " <attribute name=\"CacheMode\">REPL_SYNC</attribute>"+
" </cache-config>\n" +
"</cache-configs>";
@@ -98,6 +102,7 @@
cfg.setLockAcquisitionTimeout(15000);
cfg.setTransactionManagerLookupClass("org.jboss.cache.transaction.GenericTransactionManagerLookup");
cfg.setStateRetrievalTimeout(20000);
+ cfg.setCacheMode(CacheMode.REPL_SYNC);
cfg = new Configuration();
map.put("B", cfg);
@@ -105,12 +110,14 @@
cfg.setLockAcquisitionTimeout(15000);
cfg.setTransactionManagerLookupClass("org.jboss.cache.transaction.GenericTransactionManagerLookup");
cfg.setStateRetrievalTimeout(20000);
+ cfg.setCacheMode(CacheMode.REPL_SYNC);
cfg = new Configuration();
map.put("C", cfg);
cfg.setIsolationLevel(IsolationLevel.READ_COMMITTED);
cfg.setLockAcquisitionTimeout(100);
cfg.setStateRetrievalTimeout(100);
+ cfg.setCacheMode(CacheMode.REPL_SYNC);
return map;
}
Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/Eviction2xto3xCompatibilityTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/Eviction2xto3xCompatibilityTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/Eviction2xto3xCompatibilityTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -21,16 +21,15 @@
*/
package org.jboss.cache.config.parsing;
-import org.testng.annotations.Test;
-import org.testng.annotations.BeforeMethod;
-import org.testng.reporters.XMLUtils;
-import org.w3c.dom.Element;
-import org.jboss.cache.config.parsing.element.EvictionElementParser;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.config.EvictionAlgorithmConfig;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
-import org.jboss.cache.config.EvictionAlgorithmConfig;
-import org.jboss.cache.Fqn;
+import org.jboss.cache.config.parsing.element.EvictionElementParser;
import org.jboss.cache.eviction.MRUAlgorithmConfig;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import org.w3c.dom.Element;
/**
* Eviction was internally changed from version 2.x to version 3.x.
@@ -106,12 +105,12 @@
String newFormat =
"<eviction wakeUpInterval=\"5000\">\n" +
" <default algorithmClass=\"org.jboss.cache.eviction.LRUAlgorithm\" eventQueueSize=\"200000\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000000</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"5000\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"1000000\"></property>\n" +
" </default>\n" +
" <region name=\"/org/jboss/data\" algorithmClass=\"org.jboss.cache.eviction.LFUAlgorithm\" eventQueueSize=\"200000\">\n" +
- " <attribute name=\"minTimeToLive\">1000000</attribute>\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
+ " <property name=\"minTimeToLive\" value=\"1000000\"></property>\n" +
+ " <property name=\"maxNodes\" value=\"5000\"></property>\n" +
" </region>\n" +
"</eviction>";
Element oldEl = XmlConfigHelper.stringToElementInCoreNS(oldFormat);
Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/EvictionElementParserTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/EvictionElementParserTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/EvictionElementParserTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -35,12 +35,12 @@
String xml =
" <eviction wakeUpInterval=\"5\">\n" +
" <default algorithmClass=\"org.jboss.cache.eviction.MRUAlgorithm\">\n" +
- " <attribute name=\"maxNodes\">10</attribute>\n" +
- " <attribute name=\"minTimeToLive\">10</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"10\"></property>\n" +
+ " <property name=\"minTimeToLive\" value=\"10\"></property>\n" +
" </default>\n" +
" <region name=\"/org/jboss/xyz\" eventQueueSize=\"21\">\n" +
- " <attribute name=\"maxNodes\">2103</attribute>\n" +
- " <attribute name=\"minTimeToLive\">22</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"2103\"></property>\n" +
+ " <property name=\"minTimeToLive\" value=\"22\"></property>\n" +
" </region>\n" +
" </eviction>";
EvictionConfig evictionConfig = getEvictionConfig(xml, false);
@@ -49,15 +49,15 @@
}
/**
- * test unnecessary attributes
+ * test unnecessary propertys
*/
public void testUnnecessaryAttributes()
{
String xml =
" <eviction wakeUpInterval=\"5\" defaultPolicyClass=\"org.jboss.cache.eviction.MRUPolicy\" defaultEventQueueSize=\"123456\">\n" +
" <default>\n" +
- " <attribute name=\"maxNodes\">6</attribute>\n" +
- " <attribute name=\"minTimeToLive\">7</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"6\"></property>\n" +
+ " <property name=\"minTimeToLive\" value=\"7\"></property>\n" +
" </default>\n" +
" </eviction>";
try
@@ -80,16 +80,16 @@
String xml =
" <eviction wakeUpInterval=\"5\">\n" +
" <default algorithmClass=\"org.jboss.cache.eviction.MRUAlgorithm\" eventQueueSize=\"123456\">\n" +
- " <attribute name=\"maxNodes\">6</attribute>\n" +
- " <attribute name=\"minTimeToLive\">7</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"6\"></property>\n" +
+ " <property name=\"minTimeToLive\" value=\"7\"></property>\n" +
" </default>\n" +
" <region name=\"/org/jboss/data\">\n" +
- " <attribute name=\"minTimeToLive\">1002</attribute>\n" +
- " <attribute name=\"maxNodes\">2021</attribute>\n" +
+ " <property name=\"minTimeToLive\" value=\"1002\"></property>\n" +
+ " <property name=\"maxNodes\" value=\"2021\"></property>\n" +
" </region>\n" +
" <region name=\"/org/jboss/xyz\" algorithmClass=\"org.jboss.cache.eviction.LRUAlgorithm\" eventQueueSize=\"21\">\n" +
- " <attribute name=\"maxNodes\">2103</attribute>\n" +
- " <attribute name=\"timeToLive\">22</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"2103\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"22\"></property>\n" +
" </region>\n" +
" </eviction>";
EvictionConfig config = getEvictionConfig(xml, false);
@@ -130,21 +130,21 @@
String xml =
" <eviction wakeUpInterval=\"45000\">\n" +
" <default algorithmClass=\"org.jboss.cache.eviction.LRUAlgorithm\" eventQueueSize=\"4\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000000</attribute>\n" +
- " <attribute name=\"maxAge\">15000</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"5000\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"1000000\"></property>\n" +
+ " <property name=\"maxAge\" value=\"15000\"></property>\n" +
" </default>\n" +
" <region name=\"/fifo\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000000</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"5000\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"1000000\"></property>\n" +
" </region>\n" +
" <region name=\"/mru\">\n" +
- " <attribute name=\"maxNodes\">10000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000000</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"10000\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"1000000\"></property>\n" +
" </region>\n" +
" <region name=\"/lfu\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000000</attribute>\n" +
+ " <property name=\"maxNodes\" value=\"5000\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"1000000\"></property>\n" +
" </region>\n" +
" </eviction>";
EvictionConfig evConfig = getEvictionConfig(xml, false);
@@ -163,11 +163,11 @@
String xml =
" <eviction>\n" +
" <default algorithmClass=\"org.jboss.cache.eviction.LRUAlgorithm\" eventQueueSize=\"200000\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000</attribute>\n" +
+ " <property name=\"maxNodes\">5000</property>\n" +
+ " <property name=\"timeToLive\">1000</property>\n" +
" </default>\n" +
" <region name=\"/org/jboss/data\">\n" +
- " <attribute name=\"timeToLive\">1002</attribute>\n" +
+ " <property name=\"timeToLive\">1002</property>\n" +
" </region>\n" +
" </eviction>";
try
@@ -190,7 +190,7 @@
String xml =
" <eviction wakeUpInterval=\"5000\">\n" +
" <region name=\"/org/jboss/data\" eventQueueSize=\"5\">\n" +
- " <attribute name=\"timeToLive\">1002</attribute>\n" +
+ " <property name=\"timeToLive\">1002</property>\n" +
" </region>\n" +
" </eviction>";
try
@@ -212,7 +212,7 @@
String xml =
" <eviction wakeUpInterval=\"5000\">\n" +
" <region name=\"/org/jboss/data\" algorithmClass=\"org.jboss.cache.eviction.LRUAlgorithm\">\n" +
- " <attribute name=\"timeToLive\">1002</attribute>\n" +
+ " <property name=\"timeToLive\">1002</property>\n" +
" </region>\n" +
" </eviction>";
EvictionConfig ec = getEvictionConfig(xml, false);
@@ -245,12 +245,12 @@
String xml =
" <eviction wakeUpInterval=\"5000\">\n" +
" <default>\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000</attribute>\n" +
+ " <property name=\"maxNodes\">5000</property>\n" +
+ " <property name=\"timeToLive\">1000</property>\n" +
" </default>\n" +
" <region name=\"/org/jboss/data\" algorithmClass=\"org.jboss.cache.eviction.LFUAlgorithm\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"minNodes\">1000</attribute>\n" +
+ " <property name=\"maxNodes\">5000</property>\n" +
+ " <property name=\"minNodes\">1000</property>\n" +
" </region>\n" +
" </eviction>";
try
@@ -271,8 +271,8 @@
" <default algorithmClass=\"" + NullEvictionAlgorithm.class.getName() + "\" actionPolicyClass=\"" + RemoveOnEvictActionPolicy.class.getName() + "\">\n" +
" </default>\n" +
" <region name=\"/one\" algorithmClass=\"org.jboss.cache.eviction.LFUAlgorithm\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"minNodes\">1000</attribute>\n" +
+ " <property name=\"maxNodes\">5000</property>\n" +
+ " <property name=\"minNodes\">1000</property>\n" +
" </region>\n" +
" <region name=\"/two\" actionPolicyClass=\"" + DefaultEvictionActionPolicy.class.getName() + "\">\n" +
" </region>\n" +
Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/SampleConfigFilesCorrectnessTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/SampleConfigFilesCorrectnessTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/SampleConfigFilesCorrectnessTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -26,13 +26,13 @@
import org.apache.log4j.Logger;
import org.apache.log4j.spi.LoggingEvent;
import org.jboss.cache.Cache;
+import org.jboss.cache.UnitTestCacheFactory;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.io.File;
import java.io.FilenameFilter;
-import org.jboss.cache.UnitTestCacheFactory;
/**
* The purpose of this test is to make sure that the config files we ship are correct both according to xml schema and
@@ -93,8 +93,8 @@
{
System.out.println("Processing file: " + aConfFile);
assert !appender.isFoundUnknownWarning();
- Cache cache = ucf.createCache(CONFIG_ROOT + "/" + aConfFile);
- cache.stop();
+ Cache cache = ucf.createCache(CONFIG_ROOT + "/" + aConfFile, false);
+// cache.stop();
assert !appender.isFoundUnknownWarning();
}
}
Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -67,8 +67,8 @@
public void testCacheMode()
{
- assert syncConfig.getCacheMode().equals(Configuration.CacheMode.REPL_SYNC);
- assert asyncConfig.getCacheMode().equals(Configuration.CacheMode.REPL_ASYNC);
+ assert syncConfig.getCacheMode().equals(Configuration.CacheMode.REPL_SYNC) : "Was " + syncConfig.getCacheMode();
+ assert asyncConfig.getCacheMode().equals(Configuration.CacheMode.REPL_ASYNC): "Was " + syncConfig.getCacheMode();
}
public void testAsyncSerializationExecutorSize()
@@ -84,12 +84,12 @@
public void testClusterName()
{
- assert syncConfig.getClusterName().equals("JBossCache-Cluster");
+ assert syncConfig.getClusterName().equals("JBossCache-cluster");
}
public void testGetClusterConfig()
{
- assert syncConfig.getClusterConfig().indexOf("MERGE2") >= 0;
+ assert asyncConfig.getClusterConfig().indexOf("MERGE2") >= 0;
}
public void testFetchInMemoryState()
@@ -246,6 +246,10 @@
List<CustomInterceptorConfig> interceptorConfigs = syncConfig.getCustomInterceptors();
assert interceptorConfigs.size() == 5;
assert interceptorConfigs.get(0).getInterceptor() instanceof AaaCustomInterceptor;
+ AaaCustomInterceptor a = (AaaCustomInterceptor) interceptorConfigs.get(0).getInterceptor();
+ assert a.getAttrOne().equals("value1");
+ assert a.getAttrTwo().equals("value2");
+ assert a.getAttrThree() == null;
assert interceptorConfigs.get(1).getInterceptor() instanceof BbbCustomInterceptor;
assert interceptorConfigs.get(2).getInterceptor() instanceof AaaCustomInterceptor;
assert interceptorConfigs.get(3).getInterceptor() instanceof BbbCustomInterceptor;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java 2008-10-23 01:10:13 UTC (rev 7002)
@@ -21,12 +21,15 @@
*/
package org.jboss.cache.loader;
-import org.testng.annotations.Test;
-import org.testng.annotations.AfterMethod;
-import org.jboss.cache.Cache;
+import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Configuration.CacheMode;
+import org.jboss.cache.transaction.GenericTransactionManagerLookup;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
/**
* UT for testing JDBCCacheLoader during state transfer.
@@ -34,7 +37,7 @@
* @since 3.0
*/
@Test(groups = "functional")
-public class JDBCCacheLoaderStateTransferTest
+public class JDBCCacheLoaderStateTransferTest extends AbstractCacheLoaderTestBase
{
CacheSPI first;
@@ -47,14 +50,40 @@
if (second != null) second.stop();
}
+ private Configuration getConfiguration(int instance) throws Exception
+ {
+ Configuration c = new Configuration();
+ c.setTransactionManagerLookupClass(GenericTransactionManagerLookup.class.getName());
+ CacheLoaderConfig clc = getSingleCacheLoaderConfig("/", JDBCCacheLoader.class.getName(), "cache.jdbc.table.name=jbosscache\n" +
+ " cache.jdbc.table.create=true\n" +
+ " cache.jdbc.table.drop=true\n" +
+ " cache.jdbc.table.primarykey=jbosscache_pk\n" +
+ " cache.jdbc.fqn.column=fqn\n" +
+ " cache.jdbc.fqn.type=varchar(255)\n" +
+ " cache.jdbc.node.column=node\n" +
+ " cache.jdbc.node.type=blob\n" +
+ " cache.jdbc.parent.column=parent\n" +
+ " cache.jdbc.sql-concat=1 || 2\n" +
+ " cache.jdbc.driver = org.apache.derby.jdbc.EmbeddedDriver\n" +
+ " cache.jdbc.url=jdbc:derby:jbossdb"+instance+";create=true\n" +
+ " cache.jdbc.user=user1\n" +
+ " cache.jdbc.password=user1\n" +
+ " cache.jdbc.batch.enable=true\n" +
+ " cache.jdbc.batch.size=1000", false, true, false);
+ clc.setPassivation(false);
+ clc.getFirstCacheLoaderConfig().setPurgeOnStartup(true);
+ c.setCacheLoaderConfig(clc);
+ c.setCacheMode(CacheMode.REPL_SYNC);
+ return c;
+ }
+
public void testSimpleStateTransfer() throws Exception
{
- first = (CacheSPI) new DefaultCacheFactory().createCache("configs/repl-with-cl.xml");
+ first = (CacheSPI) new DefaultCacheFactory().createCache(getConfiguration(0));
first.put("/a/b/c", "key", "value");
first.put("/a/b/d", "key", "value");
first.put("/a/b/e", "key", "value");
-
- second = (CacheSPI) new DefaultCacheFactory().createCache("configs/repl-with-cl2.xml");
+ second = (CacheSPI) new DefaultCacheFactory().createCache(getConfiguration(2));
assert second.get("/a/b/c","key").equals("value");
assert second.get("/a/b/d","key").equals("value");
assert second.get("/a/b/e","key").equals("value");
@@ -64,10 +93,11 @@
}
- public void testMoreState()
+ public void testMoreState() throws Exception
{
long startTime = System.currentTimeMillis();
- first = (CacheSPI) new DefaultCacheFactory().createCache("configs/repl-with-cl.xml");
+
+ first = (CacheSPI) new DefaultCacheFactory().createCache(getConfiguration(0));
long cacheStartTime = System.currentTimeMillis() - startTime;
System.out.println("cacheStartTime = " + cacheStartTime);
for (int i = 0; i < 5012; i++)
@@ -76,7 +106,7 @@
if (i%1000 == 0) System.out.println(i + " operations executed so far");
}
startTime = System.currentTimeMillis();
- second = (CacheSPI) new DefaultCacheFactory().createCache("configs/repl-with-cl2.xml");
+ second = (CacheSPI) new DefaultCacheFactory().createCache(getConfiguration(2));
long stateTranferTime = System.currentTimeMillis() - startTime - cacheStartTime;
for (int i = 0; i < 5012; i+=100)
Modified: core/trunk/src/test/resources/configs/buddy-replication-cache.xml
===================================================================
--- core/trunk/src/test/resources/configs/buddy-replication-cache.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/buddy-replication-cache.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -4,8 +4,19 @@
xmlns="urn:jboss:jbosscache-core:config:3.0">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster">
+ <clustering clusterName="JBossCache-Cluster">
+ <sync replTimeout="15000"/>
+
+ <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
+ <dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
+ <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
+ <properties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </properties>
+ </locator>
+ </buddy>
+ <stateRetrieval timeout="20000"/>
<jgroupsConfig>
<TCP recv_buf_size="20000000" use_send_queues="false" loopback="false" discard_incompatible_packets="true"
max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="true"
@@ -31,17 +42,5 @@
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<pbcast.FLUSH timeout="0"/>
</jgroupsConfig>
- </transport>
- <replication>
- <sync replTimeout="15000"/>
- <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
- <dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
- <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
- <properties>
- numBuddies = 1
- ignoreColocatedBuddies = true
- </properties>
- </locator>
- </buddy>
- </replication>
+ </clustering>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/clonable-config.xml
===================================================================
--- core/trunk/src/test/resources/configs/clonable-config.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/clonable-config.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="urn:jboss:jbosscache-core:config:3.0">
<locking isolationLevel="SERIALIZABLE" lockAcquisitionTimeout="1" nodeLockingScheme="optimistic"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval fetchInMemoryState="false" timeout="3"/>
- <transport clusterName="CloneCluster" multiplexerStack="udp">
- <jgroupsConfig>
+ <clustering clusterName="CloneCluster">
+ <stateRetrieval fetchInMemoryState="false" timeout="3"/>
+ <jgroupsConfig multiplexerStack="udp">
<UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
@@ -31,8 +31,6 @@
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<pbcast.FLUSH timeout="0"/>
</jgroupsConfig>
- </transport>
- <replication>
<sync replTimeout="2"/>
<buddy enabled="true" poolName="cloneGroup" communicationTimeout="7">
<dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
@@ -43,22 +41,23 @@
</properties>
</locator>
</buddy>
- </replication>
+
+ </clustering>
<eviction wakeUpInterval="45000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="4">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
- <attribute name="maxAge">15000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
+ <property name="maxAge" value="15000" />
</default>
<region name="/fifo" algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm">
- <attribute name="maxNodes">5000</attribute>
+ <property name="maxNodes" value="5000" />
</region>
<region name="/mru" algorithmClass="org.jboss.cache.eviction.MRUAlgorithm">
- <attribute name="maxNodes">10000</attribute>
+ <property name="maxNodes" value="10000" />
</region>
<region name="/lfu" algorithmClass="org.jboss.cache.eviction.LFUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="minNodes">4000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="minNodes" value="4000" />
</region>
</eviction>
<loaders passivation="false" shared="true">
Modified: core/trunk/src/test/resources/configs/conf2x/clonable-config.xml
===================================================================
--- core/trunk/src/test/resources/configs/conf2x/clonable-config.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/conf2x/clonable-config.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -22,67 +22,8 @@
<attribute name="ClusterName">CloneCluster</attribute>
- <!-- Use both a stack name and a ClusterConfig so we can test both -->
<attribute name="MultiplexerStack">udp</attribute>
- <attribute name="ClusterConfig">
- <config>
- <UDP mcast_addr="228.10.10.10"
- mcast_port="45588"
- tos="8"
- ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000"
- mcast_recv_buf_size="25000000"
- mcast_send_buf_size="640000"
- loopback="false"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- ip_ttl="2"
- enable_bundling="false"
- enable_diagnostics="true"
- use_concurrent_stack="true"
-
- thread_naming_pattern="pl"
-
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="25"
- thread_pool.keep_alive_time="30000"
- thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
-
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
- oob_thread_pool.max_threads="4"
- oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
- oob_thread_pool.queue_max_size="10"
- oob_thread_pool.rejection_policy="Run"/>
-
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK
- use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
- view_bundling="true" view_ack_collection_timeout="5000"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <!-- <pbcast.STATE_TRANSFER/> -->
- <pbcast.FLUSH timeout="0"/>
- </config>
- </attribute>
-
<attribute name="FetchInMemoryState">false</attribute>
<attribute name="StateRetrievalTimeout">3</attribute>
<attribute name="SyncReplTimeout">2</attribute>
Modified: core/trunk/src/test/resources/configs/conf2x/multiplexer-enabled-cache.xml
===================================================================
--- core/trunk/src/test/resources/configs/conf2x/multiplexer-enabled-cache.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/conf2x/multiplexer-enabled-cache.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -54,66 +54,6 @@
<depends>jgroups.mux:name=Multiplexer</depends>
<attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
- <!-- JGroups protocol stack properties.
- ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
- -->
- <attribute name="ClusterConfig">
- <config>
- <TCP recv_buf_size="20000000" use_send_queues="false"
- loopback="false"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- enable_bundling="true"
- enable_unicast_bundling="true"
- enable_diagnostics="true"
-
- use_concurrent_stack="true"
-
- thread_naming_pattern="pl"
-
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="4"
- thread_pool.keep_alive_time="30000"
- thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="50000"
- thread_pool.rejection_policy="discard"
-
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="2"
- oob_thread_pool.max_threads="4"
- oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="false"
- oob_thread_pool.queue_max_size="10"
- oob_thread_pool.rejection_policy="Run"/>
-
- <!--<PING timeout="2000" num_initial_members="3"/>-->
- <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000"
- join_retry_timeout="2000" shun="false"
- view_bundling="true" view_ack_collection_timeout="5000"/>
- <FC max_credits="5000000"
- min_threshold="0.20"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <!-- <pbcast.STATE_TRANSFER/> -->
- <pbcast.FLUSH timeout="0"/>
- </config>
- </attribute>
-
-
<!--
The max amount of time (in milliseconds) we wait until the
state (ie. the contents of the cache) are retrieved from
Modified: core/trunk/src/test/resources/configs/conf2x/optimistically-locked-cache.xml
===================================================================
--- core/trunk/src/test/resources/configs/conf2x/optimistically-locked-cache.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/conf2x/optimistically-locked-cache.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -52,7 +52,8 @@
REPL_ASYNC
REPL_SYNC
-->
- <attribute name="CacheMode">LOCAL</attribute>
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+ <attribute name="UseReplicationQueue">true</attribute>
<!-- Max number of milliseconds to wait for a lock acquisition -->
<attribute name="LockAcquisitionTimeout">10000</attribute>
Modified: core/trunk/src/test/resources/configs/conf2x/policyPerRegion-eviction.xml
===================================================================
--- core/trunk/src/test/resources/configs/conf2x/policyPerRegion-eviction.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/conf2x/policyPerRegion-eviction.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -39,12 +39,12 @@
REPL_ASYNC
REPL_SYNC
-->
- <attribute name="CacheMode">LOCAL</attribute>
+ <attribute name="CacheMode">REPL_SYNC</attribute>
<!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
cluster in order to find each other.
-->
- <attribute name="ClusterName">JBossCache-Cluster</attribute>
+ <attribute name="ClusterName">JBossCache-Cluster123</attribute>
<!--Uncomment next three statements to enable JGroups multiplexer.
This configuration is dependent on the JGroups multiplexer being
Modified: core/trunk/src/test/resources/configs/local-lru-eviction.xml
===================================================================
--- core/trunk/src/test/resources/configs/local-lru-eviction.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/local-lru-eviction.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -4,29 +4,31 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster"/>
+ <clustering clusterName="JBossCache-Cluster">
+ <stateRetrieval timeout="20000"/>
+ </clustering>
+
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</default>
<region name="/org/jboss/data">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</region>
<region name="/org/jboss/test/data">
- <attribute name="maxNodes">5</attribute>
- <attribute name="timeToLive">4000</attribute>
+ <property name="maxNodes" value="5" />
+ <property name="timeToLive" value="4000" />
</region>
<region name="/test">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLive">4000</attribute>
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="4000" />
</region>
<region name="/maxAgeTest">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLive">8000</attribute>
- <attribute name="maxAge">10000</attribute>
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="8000" />
+ <property name="maxAge" value="10000" />
</region>
</eviction>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/local-passivation.xml
===================================================================
--- core/trunk/src/test/resources/configs/local-passivation.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/local-passivation.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -4,16 +4,14 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster"/>
<eviction wakeUpInterval="1000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/org/jboss/test/data">
- <attribute name="maxNodes">100</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="100" />
+ <property name="timeToLive" value="1000" />
</region>
</eviction>
<loaders passivation="true" shared="false">
Modified: core/trunk/src/test/resources/configs/local-tx.xml
===================================================================
--- core/trunk/src/test/resources/configs/local-tx.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/local-tx.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -5,20 +5,18 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="false"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster"/>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</default>
<region name="/org/jboss/data">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</region>
<region name="/org/jboss/test/data">
- <attribute name="maxNodes">5</attribute>
- <attribute name="timeToLive">4000</attribute>
+ <property name="maxNodes" value="5" />
+ <property name="timeToLive" value="4000" />
</region>
</eviction>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/mixedPolicy-eviction.xml
===================================================================
--- core/trunk/src/test/resources/configs/mixedPolicy-eviction.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/mixedPolicy-eviction.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -4,51 +4,26 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster">
- <jgroupsConfig>
- <UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
- discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
- use_incoming_packet_handler="true" ip_ttl="2" enable_bundling="false" enable_diagnostics="true"
- use_concurrent_stack="true" thread_naming_pattern="pl" thread_pool.enabled="true"
- thread_pool.min_threads="1" thread_pool.max_threads="25" thread_pool.keep_alive_time="30000"
- thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
- oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="4"
- oob_thread_pool.keep_alive_time="10000" oob_thread_pool.queue_enabled="true"
- oob_thread_pool.queue_max_size="10" oob_thread_pool.rejection_policy="Run"/>
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false" view_bundling="true"
- view_ack_collection_timeout="5000"/>
- <FC max_credits="20000000" min_threshold="0.10"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <pbcast.FLUSH timeout="0"/>
- </jgroupsConfig>
- </transport>
+ <clustering>
+ <stateRetrieval timeout="20000"/>
+ <jgroupsConfig configFile="udp.xml" />
+ </clustering>
+
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</default>
<region name="/org/jboss/data" algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm">
- <attribute name="maxNodes">5000</attribute>
+ <property name="maxNodes" value="5000" />
</region>
<region name="/test/" algorithmClass="org.jboss.cache.eviction.MRUAlgorithm">
- <attribute name="maxNodes">10000</attribute>
+ <property name="maxNodes" value="10000" />
</region>
<region name="/maxAgeTest/">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLive">8000</attribute>
- <attribute name="maxAge">10000</attribute>
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="8000" />
+ <property name="maxAge" value="10000" />
</region>
</eviction>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/mux.xml
===================================================================
--- core/trunk/src/test/resources/configs/mux.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/mux.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
-
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000"/>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster" multiplexerStack="tcp"/>
+ <clustering>
+ <stateRetrieval timeout="20000"/>
+ <jgroupsConfig multiplexerStack="tcp"/>
+ </clustering>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/mvcc-repl-sync-br.xml
===================================================================
--- core/trunk/src/test/resources/configs/mvcc-repl-sync-br.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/mvcc-repl-sync-br.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns="urn:jboss:jbosscache-core:config:3.0">
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
- <transport clusterName="JBossCache-Cluster">
+ <clustering>
+ <stateRetrieval fetchInMemoryState="false"/>
<jgroupsConfig>
<TCP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false"
enable_unicast_bundling="false" loopback="false" max_bundle_size="64000" max_bundle_timeout="30"
@@ -29,8 +28,6 @@
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<pbcast.FLUSH timeout="0"/>
</jgroupsConfig>
- </transport>
- <replication>
<async/>
<buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
<dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
@@ -41,5 +38,5 @@
</properties>
</locator>
</buddy>
- </replication>
+ </clustering>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/parser-test-async.xml
===================================================================
--- core/trunk/src/test/resources/configs/parser-test-async.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/parser-test-async.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -12,12 +12,20 @@
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="false"/>
+
+ <startup regionsInactiveOnStartup="true"/>
+ <shutdown hookBehavior="REGISTER"/>
+ <listeners asyncPoolSize="5"/>
+ <invocationBatching enabled="true"/>
+
<!-- serialization related configuration, used for replication and cache loading -->
<serialization objectInputStreamPoolSize="12" objectOutputStreamPoolSize="14" version="1.2.4"
marshallerClass="some.Clazz" useLazyDeserialization="true" useRegionBasedMarshalling="true"/>
- <replication>
+ <clustering mode="replication" clusterName="JBossCache-cluster">
<async useReplQueue="false" serializationExecutorPoolSize="250"/>
+ <stateRetrieval timeout="15124" fetchInMemoryState="true"/>
<buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
<dataGravitation auto="true" removeOnFind="true" searchBackupTrees="true"/>
<locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
@@ -27,13 +35,6 @@
</properties>
</locator>
</buddy>
- </replication>
-
- <stateRetrieval timeout="15124" fetchInMemoryState="true"/>
- <startup regionsInactiveOnStartup="true"/>
- <shutdown hookBehavior="REGISTER"/>
-
- <transport clusterName="JBossCache-Cluster" multiplexerStack="file_name">
<jgroupsConfig>
<PING timeout="2000" num_initial_members="3"/>
<MERGE2 max_interval="30000" min_interval="10000"/>
@@ -53,22 +54,19 @@
<!-- <pbcast.STATE_TRANSFER/> -->
<pbcast.FLUSH timeout="0"/>
</jgroupsConfig>
- </transport>
+ </clustering>
-
- <jmxStatistics enabled="false"/>
-
<eviction wakeUpInterval="5">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/org/jboss/data">
- <attribute name="timeToLive">1002</attribute>
+ <property name="timeToLive" value="1002" />
</region>
<region name="/org/jboss/xyz" algorithmClass="org.jboss.cache.eviction.MRUAlgorithm" eventQueueSize="21">
- <attribute name="maxNodes">2103</attribute>
- <attribute name="minTimeToLive">22</attribute>
+ <property name="maxNodes" value="2103" />
+ <property name="minTimeToLive" value="22" />
</region>
</eviction>
@@ -99,9 +97,8 @@
<!-- this is new behavior added within 3.x only. it support configuring custom interceptors through configurations -->
<customInterceptors>
<interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor">
- <attribute name="attrOne">value1</attribute>
- <attribute name="attrTwo">value2</attribute>
- <attribute name="attrThree">value3</attribute>
+ <property name="attrOne" value="value1" />
+ <property name="attrTwo" value="value2" />
</interceptor>
<interceptor position="last" class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/>
<interceptor index="3" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/>
@@ -112,6 +109,4 @@
</customInterceptors>
<!-- the number of threads to use for asynchronous cache listeners - defaults to 1 -->
- <listeners asyncPoolSize="5"/>
- <invocationBatching enabled="true"/>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/parser-test.xml
===================================================================
--- core/trunk/src/test/resources/configs/parser-test.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/parser-test.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -12,12 +12,19 @@
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
+ <jmxStatistics enabled="false"/>
+
+ <startup regionsInactiveOnStartup="true"/>
+ <shutdown hookBehavior="REGISTER"/>
+ <listeners asyncPoolSize="5"/>
+ <invocationBatching enabled="true"/>
+
<!-- serialization related configuration, used for replication and cache loading -->
<serialization objectInputStreamPoolSize="12" objectOutputStreamPoolSize="14" version="1.2.4"
marshallerClass="some.Clazz" useLazyDeserialization="true" useRegionBasedMarshalling="true"/>
- <replication>
- <sync replTimeout="15421"/>
+ <clustering mode="replication" clusterName="JBossCache-cluster">
+ <stateRetrieval timeout="15124" fetchInMemoryState="true"/>
<buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
<dataGravitation auto="true" removeOnFind="true" searchBackupTrees="true"/>
<locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
@@ -27,48 +34,21 @@
</properties>
</locator>
</buddy>
- </replication>
+ <sync replTimeout="15421"/>
+ <jgroupsConfig multiplexerStack="file_name" />
+ </clustering>
- <stateRetrieval timeout="15124" fetchInMemoryState="true"/>
- <startup regionsInactiveOnStartup="true"/>
- <shutdown hookBehavior="REGISTER"/>
-
- <transport clusterName="JBossCache-Cluster" multiplexerStack="file_name">
- <jgroupsConfig>
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
- view_bundling="true" view_ack_collection_timeout="5000"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <!-- <pbcast.STATE_TRANSFER/> -->
- <pbcast.FLUSH timeout="0"/>
- </jgroupsConfig>
- </transport>
-
-
- <jmxStatistics enabled="false"/>
-
<eviction wakeUpInterval="5">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/org/jboss/data">
- <attribute name="timeToLive">1002</attribute>
+ <property name="timeToLive" value="1002" />
</region>
<region name="/org/jboss/xyz" algorithmClass="org.jboss.cache.eviction.MRUAlgorithm" eventQueueSize="21">
- <attribute name="maxNodes">2103</attribute>
- <attribute name="minTimeToLive">22</attribute>
+ <property name="maxNodes" value="2103" />
+ <property name="minTimeToLive" value="22" />
</region>
</eviction>
@@ -99,9 +79,8 @@
<!-- this is new behavior added within 3.x only. it support configuring custom interceptors through configurations -->
<customInterceptors>
<interceptor position="first" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor">
- <attribute name="attrOne">value1</attribute>
- <attribute name="attrTwo">value2</attribute>
- <attribute name="attrThree">value3</attribute>
+ <property name="attrOne" value="value1" />
+ <property name="attrTwo" value="value2" />
</interceptor>
<interceptor position="last" class="org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor"/>
<interceptor index="3" class="org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor"/>
@@ -112,6 +91,4 @@
</customInterceptors>
<!-- the number of threads to use for asynchronous cache listeners - defaults to 1 -->
- <listeners asyncPoolSize="5"/>
- <invocationBatching enabled="true"/>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/policyPerRegion-eviction.xml
===================================================================
--- core/trunk/src/test/resources/configs/policyPerRegion-eviction.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/policyPerRegion-eviction.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,58 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
- <stateRetrieval timeout="20000"/>
- <transport clusterName="JBossCache-Cluster">
- <jgroupsConfig>
- <UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
- discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
- use_incoming_packet_handler="true" ip_ttl="2" enable_bundling="false" enable_diagnostics="true"
- use_concurrent_stack="true" thread_naming_pattern="pl" thread_pool.enabled="true"
- thread_pool.min_threads="1" thread_pool.max_threads="25" thread_pool.keep_alive_time="30000"
- thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
- oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="4"
- oob_thread_pool.keep_alive_time="10000" oob_thread_pool.queue_enabled="true"
- oob_thread_pool.queue_max_size="10" oob_thread_pool.rejection_policy="Run"/>
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false" view_bundling="true"
- view_ack_collection_timeout="5000"/>
- <FC max_credits="20000000" min_threshold="0.10"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <pbcast.FLUSH timeout="0"/>
- </jgroupsConfig>
- </transport>
-
+ <clustering clusterName="JBossCache-Cluster123" />
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000000" />
</default>
<region name="/org/jboss/data" algorithmClass="org.jboss.cache.eviction.LFUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="minNodes">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="minNodes" value="1000" />
</region>
<region name="/org/jboss/test/data" algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm">
- <attribute name="maxNodes">5</attribute>
+ <property name="maxNodes" value="5" />
</region>
<region name="/test/" algorithmClass="org.jboss.cache.eviction.MRUAlgorithm">
- <attribute name="maxNodes">10000</attribute>
+ <property name="maxNodes" value="10000" />
</region>
<region name="/maxAgeTest/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">10000</attribute>
- <attribute name="timeToLive">8000</attribute>
- <attribute name="maxAge">10000</attribute>
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="8000" />
+ <property name="maxAge" value="10000" />
</region>
</eviction>
</jbosscache>
Deleted: core/trunk/src/test/resources/configs/repl-with-cl.xml
===================================================================
--- core/trunk/src/test/resources/configs/repl-with-cl.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/repl-with-cl.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
-
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
-
- <!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
-
- <transport clusterName="JBossCache-Cluster">
- <jgroupsConfig>
- <TCP recv_buf_size="20000000" use_send_queues="false" loopback="false" discard_incompatible_packets="true"
- max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="true"
- enable_unicast_bundling="true" enable_diagnostics="true" use_concurrent_stack="true"
- thread_naming_pattern="pl" thread_pool.enabled="true" thread_pool.min_threads="1"
- thread_pool.max_threads="4" thread_pool.keep_alive_time="30000" thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="50000" thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="2" oob_thread_pool.max_threads="4" oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="10"
- oob_thread_pool.rejection_policy="Run"/>
- <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" join_retry_timeout="2000" shun="false"
- view_bundling="true" view_ack_collection_timeout="5000"/>
- <FC max_credits="5000000" min_threshold="0.20"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <pbcast.FLUSH timeout="0"/>
- </jgroupsConfig>
- </transport>
-
-
- <!-- Cache Passivation for Tree Cache
- On passivation, The objects are written to the backend store on eviction if passivation
- is true, otherwise the objects are persisted. On activation, the objects are restored in
- the memory cache and removed from the cache loader if 'passivation' attribute is true,
- otherwise the objects are only loaded from the cache loader -->
- <loaders passivation="false" shared="false">
- <preload>
- <node fqn="/"/>
- </preload>
- <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
- <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
- ignoreModifications="false" purgeOnStartup="true">
- <properties>
- cache.jdbc.table.name=jbosscache
- cache.jdbc.table.create=true
- cache.jdbc.table.drop=true
- cache.jdbc.table.primarykey=jbosscache_pk
- cache.jdbc.fqn.column=fqn
- cache.jdbc.fqn.type=varchar(255)
- cache.jdbc.node.column=node
- cache.jdbc.node.type=blob
- cache.jdbc.parent.column=parent
- cache.jdbc.sql-concat=1 || 2
- cache.jdbc.driver = org.apache.derby.jdbc.EmbeddedDriver
- cache.jdbc.url=jdbc:derby:jbossdb;create=true
- cache.jdbc.user=user1
- cache.jdbc.password=user1
- </properties>
- </loader>
- </loaders>
- <replication>
- <sync replTimeout="30000"/>
- </replication>
-
-</jbosscache>
Deleted: core/trunk/src/test/resources/configs/repl-with-cl2.xml
===================================================================
--- core/trunk/src/test/resources/configs/repl-with-cl2.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/repl-with-cl2.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
-
- <!--
- isolationLevel : SERIALIZABLE - (not supported in mvcc)
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED (not supported in mvcc)
- NONE
- lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
- nodeLockingScheme : mvcc (default)
- optimistic
- pessimistic
- -->
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
-
- <!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
-
- <transport clusterName="JBossCache-Cluster">
- <jgroupsConfig>
- <TCP recv_buf_size="20000000" use_send_queues="false" loopback="false" discard_incompatible_packets="true"
- max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="true"
- enable_unicast_bundling="true" enable_diagnostics="true" use_concurrent_stack="true"
- thread_naming_pattern="pl" thread_pool.enabled="true" thread_pool.min_threads="1"
- thread_pool.max_threads="4" thread_pool.keep_alive_time="30000" thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="50000" thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="2" oob_thread_pool.max_threads="4" oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="10"
- oob_thread_pool.rejection_policy="Run"/>
- <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" join_retry_timeout="2000" shun="false"
- view_bundling="true" view_ack_collection_timeout="5000"/>
- <FC max_credits="5000000" min_threshold="0.20"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <pbcast.FLUSH timeout="0"/>
- </jgroupsConfig>
- </transport>
-
- <stateRetrieval fetchInMemoryState="false" timeout="0"/>
-
-
- <!-- Cache Passivation for Tree Cache
- On passivation, The objects are written to the backend store on eviction if passivation
- is true, otherwise the objects are persisted. On activation, the objects are restored in
- the memory cache and removed from the cache loader if 'passivation' attribute is true,
- otherwise the objects are only loaded from the cache loader -->
- <loaders passivation="false" shared="false">
- <preload>
- <node fqn="/"/>
- </preload>
- <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
- <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
- ignoreModifications="false" purgeOnStartup="true">
- <properties>
- cache.jdbc.table.name=jbosscache
- cache.jdbc.table.create=true
- cache.jdbc.table.drop=true
- cache.jdbc.table.primarykey=jbosscache_pk
- cache.jdbc.fqn.column=fqn
- cache.jdbc.fqn.type=varchar(255)
- cache.jdbc.node.column=node
- cache.jdbc.node.type=blob
- cache.jdbc.parent.column=parent
- cache.jdbc.sql-concat=1 || 2
- cache.jdbc.driver = org.apache.derby.jdbc.EmbeddedDriver
- cache.jdbc.url=jdbc:derby:jbossdb2;create=true
- cache.jdbc.user=user1
- cache.jdbc.password=user1
- cache.jdbc.batch.enable=true
- cache.jdbc.batch.size=1000
- </properties>
- </loader>
- </loaders>
-
- <replication>
- <sync replTimeout="30000"/>
- </replication>
-</jbosscache>
Modified: core/trunk/src/test/resources/configs/replSync.xml
===================================================================
--- core/trunk/src/test/resources/configs/replSync.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/replSync.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,40 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
- <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000"/>
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
+
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="true"/>
- <stateRetrieval fetchInMemoryState="true" timeout="15000"/>
- <transport clusterName="JBossCache-Cluster">
- <jgroupsConfig>
- <UDP mcast_addr="228.10.10.10" mcast_port="45588" tos="8" ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" loopback="false"
- discard_incompatible_packets="true" max_bundle_size="64000" max_bundle_timeout="30"
- use_incoming_packet_handler="true" ip_ttl="2" enable_bundling="false" enable_diagnostics="true"
- use_concurrent_stack="true" thread_naming_pattern="pl" thread_pool.enabled="true"
- thread_pool.min_threads="1" thread_pool.max_threads="25" thread_pool.keep_alive_time="30000"
- thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
- oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="4"
- oob_thread_pool.keep_alive_time="10000" oob_thread_pool.queue_enabled="true"
- oob_thread_pool.queue_max_size="10" oob_thread_pool.rejection_policy="Run"/>
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD timeout="10000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false" view_bundling="true"
- view_ack_collection_timeout="5000"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <pbcast.FLUSH timeout="0"/>
- </jgroupsConfig>
- </transport>
-
- <replication>
+ <clustering>
+ <stateRetrieval fetchInMemoryState="true" timeout="15000"/>
+ <jgroupsConfig configFile="udp.xml" />
<sync replTimeout="15000"/>
- </replication>
+ </clustering>
</jbosscache>
Modified: core/trunk/src/test/resources/configs/string-property-replaced.xml
===================================================================
--- core/trunk/src/test/resources/configs/string-property-replaced.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/configs/string-property-replaced.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:jboss:jbosscache-core:config:3.0">
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
+
<locking lockAcquisitionTimeout="${test.property.LockAcquisitionTimeout:15000}"
- nodeLockingScheme="${test.property.NodeLockingScheme:OPTIMISTIC}"/>
+ nodeLockingScheme="${test.property.NodeLockingScheme:MVCC}"/>
+
<transaction syncCommitPhase="${test.property.SyncCommitPhase:true}" syncRollbackPhase="true"/>
+
<serialization useRegionBasedMarshalling="true"/>
- <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
- <startup regionsInactiveOnStartup="true"/>
- <transport clusterName="optimistic-entity" multiplexerStack="udp-sync">
- <jgroupsConfig/>
- </transport>
- <replication>
+ <clustering>
+ <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp-sync" />
<sync replTimeout="20000"/>
<buddy enabled="${test.property.BuddyReplicationConfig.enabled:true}"
poolName="${test.property.BuddyReplicationConfig.buddyPoolName:default}" communicationTimeout="2000">
@@ -22,11 +21,13 @@
</properties>
</locator>
</buddy>
- </replication>
+ </clustering>
+
+ <startup regionsInactiveOnStartup="true"/>
<eviction wakeUpInterval="5000">
<default algorithmClass="${test.property.EvictionPolicyConfig.policyClass:org.jboss.cache.eviction.LRUAlgorithm}">
- <attribute name="maxNodes">${test.property.EvictionPolicyConfig.maxNodes:5000}</attribute>
- <attribute name="timeToLive">1000000</attribute>
+ <property name="maxNodes" value="${test.property.EvictionPolicyConfig.maxNodes:5000}" />
+ <property name="timeToLive" value="1000000" />
</default>
</eviction>
<loaders passivation="true" shared="false">
Deleted: core/trunk/src/test/resources/jbc2-registry-configs.xml
===================================================================
(Binary files differ)
Modified: core/trunk/src/test/resources/jbc3-registry-configs.xml
===================================================================
--- core/trunk/src/test/resources/jbc3-registry-configs.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/jbc3-registry-configs.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -17,19 +17,20 @@
transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="true"/>
<startup regionsInactiveOnStartup="true"/>
- <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
- <transport clusterName="optimistic-entity" multiplexerStack="udp-sync"/>
- <invalidation>
+ <clustering mode="i" clusterName="optimistic-entity">
+ <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp-sync"/>
<sync replTimeout="20000"/>
- </invalidation>
+ </clustering>
+
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/TS">
- <attribute name="maxNodes">0</attribute>
- <attribute name="timeToLive">0</attribute>
+ <property name="maxNodes" value="0" />
+ <property name="timeToLive" value="0" />
</region>
</eviction>
</registry:cache-config>
@@ -40,19 +41,20 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="pessimistic"/>
<serialization useRegionBasedMarshalling="true"/>
<startup regionsInactiveOnStartup="true"/>
- <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
- <transport clusterName="pessimistic-entity" multiplexerStack="udp-sync"/>
- <invalidation>
+ <clustering clusterName="pessimistic-entity" mode="i">
+ <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp-sync"/>
<sync replTimeout="20000"/>
- </invalidation>
+ </clustering>
+
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/TS">
- <attribute name="maxNodes">0</attribute>
- <attribute name="timeToLive">0</attribute>
+ <property name="maxNodes" value="0" />
+ <property name="timeToLive" value="0" />
</region>
</eviction>
</registry:cache-config>
@@ -65,12 +67,12 @@
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/TS">
- <attribute name="maxNodes">0</attribute>
- <attribute name="timeToLive">0</attribute>
+ <property name="maxNodes" value="0" />
+ <property name="timeToLive" value="0" />
</region>
</eviction>
</registry:cache-config>
@@ -83,19 +85,19 @@
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="false"/>
<startup regionsInactiveOnStartup="false"/>
- <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
- <transport clusterName="replicated-query" multiplexerStack="udp"/>
- <replication>
- <async/>
- </replication>
+ <clustering clusterName="replicated-query" mode="r">
+ <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp"/>
+ <async />
+ </clustering>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/TS" >
- <attribute name="maxNodes">0</attribute>
- <attribute name="timeToLive">0</attribute>
+ <property name="maxNodes" value="0" />
+ <property name="timeToLive" value="0" />
</region>
</eviction>
</registry:cache-config>
@@ -108,19 +110,19 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="pessimistic"/>
<serialization useRegionBasedMarshalling="true"/>
<startup regionsInactiveOnStartup="true"/>
- <stateRetrieval fetchInMemoryState="true" timeout="20000"/>
- <transport clusterName="timestamps-cache" multiplexerStack="udp"/>
- <replication>
- <async/>
- </replication>
+ <clustering clusterName="timestamps-cache" mode="r">
+ <stateRetrieval fetchInMemoryState="true" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp"/>
+ <async />
+ </clustering>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/TS">
- <attribute name="maxNodes">0</attribute>
- <attribute name="timeToLive">0</attribute>
+ <property name="maxNodes" value="0" />
+ <property name="timeToLive" value="0" />
</region>
</eviction>
</registry:cache-config>
@@ -136,19 +138,19 @@
transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="true"/>
<startup regionsInactiveOnStartup="true"/>
- <stateRetrieval fetchInMemoryState="true" timeout="20000"/>
- <transport clusterName="optimistic-shared" multiplexerStack="udp"/>
- <replication>
+ <clustering clusterName="optimistic-shared" mode="r">
+ <stateRetrieval fetchInMemoryState="true" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp"/>
<sync replTimeout="20000"/>
- </replication>
+ </clustering>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/TS">
- <attribute name="maxNodes">0</attribute>
- <attribute name="timeToLive">0</attribute>
+ <property name="maxNodes" value="0" />
+ <property name="timeToLive" value="0" />
</region>
</eviction>
</registry:cache-config>
@@ -166,19 +168,19 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="pessimistic"/>
<serialization useRegionBasedMarshalling="true"/>
<startup regionsInactiveOnStartup="true"/>
- <stateRetrieval fetchInMemoryState="true" timeout="20000"/>
- <transport clusterName="pessimistic-shared" multiplexerStack="udp"/>
- <replication>
+ <clustering clusterName="pessimistic-shared" mode="r">
+ <stateRetrieval fetchInMemoryState="true" timeout="20000"/>
+ <jgroupsConfig multiplexerStack="udp"/>
<sync replTimeout="20000"/>
- </replication>
+ </clustering>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/TS">
- <attribute name="maxNodes">0</attribute>
- <attribute name="timeToLive">0</attribute>
+ <property name="maxNodes" value="0" />
+ <property name="timeToLive" value="0" />
</region>
</eviction>
</registry:cache-config>
Modified: core/trunk/src/test/resources/log4j.xml
===================================================================
--- core/trunk/src/test/resources/log4j.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/log4j.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -46,7 +46,7 @@
<!-- ================ -->
<category name="org.jboss.cache">
- <priority value="WARN"/>
+ <priority value="ERROR"/>
</category>
<category name="org.jboss.cache.factories">
@@ -66,8 +66,8 @@
<!-- ======================= -->
<root>
- <!--<appender-ref ref="CONSOLE"/>-->
- <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ <!--<appender-ref ref="FILE"/>-->
</root>
</log4j:configuration>
Modified: core/trunk/src/test/resources/unit-test-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/unit-test-cache-service.xml 2008-10-22 16:10:20 UTC (rev 7001)
+++ core/trunk/src/test/resources/unit-test-cache-service.xml 2008-10-23 01:10:13 UTC (rev 7002)
@@ -4,23 +4,23 @@
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000"/>
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="false"/>
- <stateRetrieval fetchInMemoryState="true" timeout="15000"/>
- <transport clusterName="JBossCache-Cluster"/>
- <replication>
+ <clustering>
<sync replTimeout="15000"/>
- </replication>
+ <stateRetrieval fetchInMemoryState="true" timeout="15000"/>
+ </clustering>
+
<eviction wakeUpInterval="2000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</default>
<region name="/org/jboss/data">
- <attribute name="maxNodes">5000</attribute>
- <attribute name="timeToLive">1000</attribute>
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="1000" />
</region>
<region name="/org/jboss/test/data">
- <attribute name="maxNodes">5</attribute>
- <attribute name="timeToLive">4</attribute>
+ <property name="maxNodes" value="5" />
+ <property name="timeToLive" value="4" />
</region>
</eviction>
<loaders passivation="true" shared="false">
16 years, 2 months
JBoss Cache SVN: r7001 - benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-10-22 12:10:20 -0400 (Wed, 22 Oct 2008)
New Revision: 7001
Added:
benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/config.sh
Log:
enhanced session simulator
Added: benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt (rev 0)
+++ benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/Readme.txt 2008-10-22 16:10:20 UTC (rev 7001)
@@ -0,0 +1,16 @@
+Terracotta replicates through an centralized server, so this needs to be installed and configured as well.
+Before running the tests on your environment, please follow the following steps in order to install the Terracotta server.
+
+1) Download and install terracotta from http://www.terracotta.org. For simplicity we'll assume that Terracotta is install in TC_ROOT
+2) Create the DSO boot jar by running TC_ROOT/bin/make-boot-jar.sh. This will generate a jar file in the directory TC_ROOT/lib/dso-boot
+ E.g. lib/dso-boot/dso-boot-hotspot_linux_150_11.jar. This jar file is system specific (as its name shows), so it's name might
+ vary from system to system.
+3) Update ./config.sh
+ a) make sure TC_HOME points to the terracotta installation directory (i.e. TC_ROOT)
+ b) make sure that the jar file generated at 2) is in the class path
+ Note: each line that needs to be changed is prefixed by a comment: "#next line should be modified based on the environment"
+4) Before running the tests, make sure you start the TC server first. A server with default configuration can be started using the script: TC_ROOT/samples/start-demo-server.sh
+5) Run the tests by by using allJBossCacheTests.sh or runNode.sh
+
+Note: steps 1-3 should only be performed once
+
Modified: benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/config.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/config.sh 2008-10-22 04:47:51 UTC (rev 7000)
+++ benchmarks/benchmark-fwk/trunk/cache-products/terracotta-2.5.0/config.sh 2008-10-22 16:10:20 UTC (rev 7001)
@@ -3,6 +3,8 @@
#see "$CACHE_ROOT/cache-products/cache.sh" for details
THIS_DIR=./cache-products/terracotta-2.5.0
+
+#next line should be modified based on the environment
TC_HOME="${HOME}/java/terracotta-2.5.0"
#addint terracotta wrapper class to classpath
@@ -10,6 +12,8 @@
#other specific JVM options
JVM_OPTIONS="$JVM_OPTIONS -DpreferIPv4Stack=true -Dtc.config=$THIS_DIR/tc-client-config.xml -Dtc.install-root=${TC_HOME}"
+
+#next line should be modified based on the environment
JVM_OPTIONS="$JVM_OPTIONS -Xbootclasspath/p:${TC_HOME}/lib/dso-boot/dso-boot-hotspot_linux_150_11.jar"
JVM_OPTIONS="$JVM_OPTIONS -DcacheBenchFwk.cacheWrapperClassName=org.cachebench.cachewrappers.TerracottaWrapper"
16 years, 2 months
JBoss Cache SVN: r7000 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES.
by jbosscache-commits@lists.jboss.org
Author: mospina
Date: 2008-10-22 00:47:51 -0400 (Wed, 22 Oct 2008)
New Revision: 7000
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po
Log:
translation in progress
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po 2008-10-22 01:42:43 UTC (rev 6999)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po 2008-10-22 04:47:51 UTC (rev 7000)
@@ -8,7 +8,7 @@
"Project-Id-Version: Cache_loaders\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2008-10-20 11:30+1000\n"
+"PO-Revision-Date: 2008-10-22 14:21+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -1132,6 +1132,10 @@
"emphasis>. <emphasis>Analogous to the <literal>CacheLoaderPreload</literal> "
"attribute in pre-1.3.0 configurations.</emphasis>"
msgstr ""
+"<literal>preload</literal> nos permite definir una lista de nodos o incluso subárboles completos que son visitados por el caché en el arranque con el fin de precargar los datos asociados con esos nodos. El predeterminado (\"/\") carga todos los datos disponibles en el almacenamiento backend en el caché, lo cual probablemente no es una buena idea dado que puede que los datos en el almacenamiento backend sean grandes. Como ejemplo, <literal>/a, /product/catalogue</literal> carga los subárboles "
+"<literal>/a</literal> y <literal>/product/catalogue</literal> en el caché pero nada más. Cualquier otra cosa es cargada de manera perezosa al accederla. "
+"El realizar la precarga tiene sentido cuando uno anticipa que va a utilizar elementos bajo un subárbol dado de manera frecuente. <emphasis>Observe que la precarga carga todos los nodos y los atributos asociados del nodo dado, recursivamente hasta el nodo raíz</"
+"emphasis>. <emphasis>Analogo al atributo <literal>CacheLoaderPreload</literal> e configuraciones anteriores a 1.3.0.</emphasis>"
#. Tag: para
#: Cache_loaders.xml:133
@@ -1144,7 +1148,7 @@
"service. <emphasis>Analogous to the "
"<literal>CacheLoaderFetchPersistentState</literal> attribute in pre-1.3.0 "
"configurations.</emphasis>"
-msgstr ""
+msgstr "<literal>fetchPersistentState</literal> determina si se debe buscar o no el estado persistente de un caché al unirse a un clúster. Sólo se puede configurar un cargador de caché como verdadero; si se configura más de uno entonces se presentará una excepción al iniciar su servicio de caché. <emphasis>Analogo al atributo <literal>CacheLoaderFetchPersistentState</literal> en configuraciones previas a 1.3.0.</emphasis>"
#. Tag: para
#: Cache_loaders.xml:136
@@ -1162,6 +1166,11 @@
"<emphasis>Analogous to the <literal>CacheLoaderAsynchronous</literal> "
"attribute in pre-1.3.0 configurations.</emphasis>"
msgstr ""
+"<literal>async</literal> determina si las escrituras en el bloque del cargador de caché se bloquean hasta que sean completadas o si se ejecutan en un hilo separado de manera que las escrituras retornen inmediatamente. Si esto se configura como verdadero, una instancia de <literal>org.jboss.cache."
+"loader.AsyncCacheLoader</literal> es construida con una instancia del cargador de caché que en realidad se va a utilizar. Entonces el <literal>AsyncCacheLoader</literal> delega todas las peticiones al cargador de caché subyacente utilizando un hilo separado si es necesario. Para obtener mayores detalles consulte Javadocs en <literal>org.jboss.cache.loader."
+"AsyncCacheLoader</literal>. Si no se especifica, el elemento "
+"<literal>async</literal> por defecto es <emphasis>false</emphasis>. "
+"<emphasis>Analogo al atributo <literal>CacheLoaderAsynchronous</literal> en configuraciones previas a 1.3.0.</emphasis>"
#. Tag: para
#: Cache_loaders.xml:139
@@ -1173,6 +1182,9 @@
"(and even if) a write succeeds. This needs to be kept in mind when setting "
"the <literal>async</literal> element to true."
msgstr ""
+"<emphasis role=\"bold\">Nota sobre el uso del elemento <literal>async</literal>:</"
+"emphasis> siempre hay la posibilidad de lecturas no limpias ya que todas las escrituras se realizan de manera asincrónica y por lo tanto es imposible garantizar cuando "
+"(e incluso si) tiene éxito una escritura. Es necesario tener esto en mente al configurar el elemento <literal>async</literal> como verdadero."
#. Tag: para
#: Cache_loaders.xml:142
@@ -1186,7 +1198,7 @@
"allows you to write to the 'local' file cache loader but not the shared JDBC "
"cache loader. This property defaults to <literal>false</literal>, so writes "
"are propagated to all cache loaders configured."
-msgstr ""
+msgstr "<literal>ignoreModifications</literal> determina si los métodos de escritura se deben pasar al cargador de caché especifico. Se pueden presentar situaciones en donde datos transitorios de aplicaciones sólo se deben encontrar en un cargador de caché basado en un archivo en el mismo servidor que el caché en-memoria, por ejemplo, con un cargador de caché JDBC compartido adicional utilizado por todos los servidores en la red. Esta funcionalidad le permite escribir en el cargador de caché del archivo 'local' pero no en el cargador de caché JDBC compartido. Esta propiedad por defecto es <literal>false</literal> así que las escrituras son propagadas a todos loc cargadores de caché configurados."
#. Tag: para
#: Cache_loaders.xml:145
@@ -1203,7 +1215,7 @@
#: Cache_loaders.xml:151
#, no-c-format
msgid "Cache passivation"
-msgstr ""
+msgstr "Pasivación de caché"
#. Tag: para
#: Cache_loaders.xml:152
@@ -1211,7 +1223,7 @@
msgid ""
"A CacheLoader can be used to enforce node passivation and activation on "
"eviction in a TreeCache."
-msgstr ""
+msgstr "Un CacheLoader se puede utilizar para reforzar la activación y pasivación de nodos en la eliminación en un TreeCache."
#. Tag: para
#: Cache_loaders.xml:155
@@ -1223,7 +1235,7 @@
"process of restoring an object from the data store into the in-memory cache "
"when it's needed to be used. In both cases, the configured CacheLoader will "
"be used to read from the data store and write to the data store."
-msgstr ""
+msgstr "<emphasis>Cache Passivation</emphasis> es el proceso de remover un objeto del caché en-memoria y escribirlo en un almacenamiento de datos secundario (por ejemplo, un sistema de archivos, una base de datos) en la eliminación. La <emphasis>activación de caché</emphasis> es el proceso de reestablecer un objeto desde el almacenamiento de datos en el caché en-memoria cuando es necesario utilizarlo. En ambos casos, el CacheLoader configurado se utilizará para leer del almacenamiento de datos y escribir en el almacenamiento de datos."
#. Tag: para
#: Cache_loaders.xml:158
@@ -1238,7 +1250,7 @@
"children have been loaded, they're removed from the cache loader and a "
"notification is emitted to the tree cache listeners that the node has been "
"activated."
-msgstr ""
+msgstr "Cuando la política de eliminación en efecto llama a evict() para eliminar un nodo del caché, si la pasivación se encuentra habilitada, entonces se emitirá una notificación a los escuchas de caché de árbol de que el nodo se está haciendo pasivo y el nodo y sus hijos se almacenarán en el almacenamiento cargador de caché. Cuando un usuario llama a get() en un nodo que fue eliminado anteriormente, el nodo es cargado (de manera perezosa) del almacenamiento cargador de caché en el caché en-memoria. Cuando el nodo y sus hijos han sido cargados, estos se borran del cargador de caché y se emite una notificación a tres escuchas de caché de que el nodo ha sido activado."
#. Tag: para
#: Cache_loaders.xml:161
@@ -1250,12 +1262,14 @@
"element when configuring a cache loader. When passivation is used, only the "
"first cache loader configured is used. All others are ignored."
msgstr ""
+"Para habilitar la activación/pasivación de caché puede configurar <literal>passivation</"
+"literal> como verdadero. Por defecto es falso. Lo puede configurar por medio del archivo de configuración caché XML. El XML anterior muestra el elemento <literal>passivation</literal> al configurar el cargador caché. Cuando se utiliza la pasivación, sólo se utiliza el primer cargador de caché y los demás se ignoran. "
#. Tag: title
#: Cache_loaders.xml:167
#, no-c-format
msgid "CacheLoader use cases"
-msgstr ""
+msgstr "Ejemplos de CacheLoader"
#. Tag: title
#: Cache_loaders.xml:169
@@ -1283,25 +1297,25 @@
"database or a filesystem, and when accessing fields of a POJO, they will be "
"lazily loaded using the CacheLoader to access a backend store. This feature "
"effectively provides simple persistency for any POJO."
-msgstr ""
+msgstr "Al utilizar PojoCache, esto significa que todos los POJOs se pueden almacenar en una base de datos o en un sistema de archivos y al acceder campos de un POJO serán cargados de manera perezosa utilizando el CacheLoader para acceder a un almacenamiento backend. Esta funcionalidad proporciona efectivamente persistencia simple para cualquier POJO."
#. Tag: title
#: Cache_loaders.xml:179
#, no-c-format
msgid "Replicated caches with all nodes sharing the same store"
-msgstr ""
+msgstr "Cachés replicados con todos los nodos compartiendo el mismo almacenamiento"
#. Tag: para
#: Cache_loaders.xml:180
#, no-c-format
msgid "The following figure shows 2 JBossCache nodes sharing the same backend store:"
-msgstr ""
+msgstr "La siguiente figura muestra dos nodos JBossCache compartiendo el mismo almacenamiento backend:"
#. Tag: title
#: Cache_loaders.xml:184
#, no-c-format
msgid "2 nodes sharing a backend store"
-msgstr ""
+msgstr "dos nodos compartiendo un almacenamiento backend"
#. Tag: para
#: Cache_loaders.xml:191
@@ -1355,19 +1369,19 @@
"is <emphasis>not</emphasis> on the caller's thread, in order not to slow "
"down the cluster by accessing (for example) a database. This is a non-issue "
"when using asynchronous replication."
-msgstr ""
+msgstr "Este es un caso similar al anterior pero aquí sólo un nodo en el clúster interactúa con un almacenamiento backend por medio de su CacheLoader. Todos los otros nodos realizan la replicación en memoria. Un ejemplo para esto es la replicación de sesión HTTP, en donde todos los nodos replican las sesiones en memoria y ademas un nodo guarda las sesiones en un almacenamiento backend persitente. Observe que aquí puede tener sentido que el CacheLoader almacene cambios de manera asincrónica que <emphasis>no</emphasis> está en el hilo del que realiza la llamada con el fin de no hacer más lento el clúster al acceder (por ejemplo) una base de datos. Este no es un problema cuando se utiliza la replicación asincrónica. "
#. Tag: title
#: Cache_loaders.xml:218
#, no-c-format
msgid "Replicated caches with each node having its own store"
-msgstr ""
+msgstr "Cachés replicados y cada nodo tiene su propio almacenamiento"
#. Tag: title
#: Cache_loaders.xml:220
#, no-c-format
msgid "2 nodes each having its own backend store"
-msgstr ""
+msgstr "Dos nodos cada uno con su propio almacenamiento backend"
#. Tag: para
#: Cache_loaders.xml:227
@@ -1379,7 +1393,7 @@
"changes synchronously and in a transaction, the two phase commit protocol "
"takes care that all modifications are replicated and persisted in each "
"datastore, or none is replicated and persisted (atomic updates)."
-msgstr ""
+msgstr "Aquí cada nodo tiene su porpio almacenamiento de datos. Las modificaciones al caché son (a) replicados a través del clúster y (b) persistidos durante el uso de CacheLoader. Esto significa que todos los almacenamientos de datos tienen exactamente el mismo estado. Al replicar los cambios sincrónicamente y en una transacción, el protocolo de dos fases se encarga de que todas las modificaciones sean replicadas y persistidas en cada almacenamiento de datos o que ninguna sea replicada ni persistida (actualizaciones atómicas)."
#. Tag: para
#: Cache_loaders.xml:230
@@ -1389,7 +1403,7 @@
"that means it doesn't implement recovery. When used with a "
"TransactionManager that supports recovery, this functionality is not "
"available."
-msgstr ""
+msgstr "Observe que actualmente JBossCache <emphasis>no</emphasis> es un XAResource, lo que significa que no implementa la recuperación. Cuando se utiliza con un TransactionManager que soporta la recuperación esta funcionalidad no se encuentra disponible. "
#. Tag: para
#: Cache_loaders.xml:233
@@ -1397,13 +1411,13 @@
msgid ""
"The challenge here is state transfer: when a new node starts it needs to do "
"the following:"
-msgstr ""
+msgstr "El reto aquí es la transferencia de estado: cuando un nodo inicia necesita hacer lo siguiente:"
#. Tag: para
#: Cache_loaders.xml:238
#, no-c-format
msgid "Tell the coordinator (oldest node in a cluster) to send it the state"
-msgstr ""
+msgstr "Decirle al coordinador (el nodo más antiguo en un clúster) que envie el estado"
#. Tag: para
#: Cache_loaders.xml:243
@@ -1412,7 +1426,7 @@
"The coordinator then needs to wait until all in-flight transactions have "
"completed. During this time, it will not allow for new transactions to be "
"started."
-msgstr ""
+msgstr "Luego el coordinador necesita esperar hasta que todas las transacciones hayan sido completadas. Durante este tiempo no permitirá que se inicien nuevas transacciones. "
#. Tag: para
#: Cache_loaders.xml:248
@@ -1421,7 +1435,7 @@
"Then the coordinator asks its CacheLoader for the entire state using "
"<literal>loadEntireState()</literal>. It then sends back that state to the "
"new node."
-msgstr ""
+msgstr "Luego el coordinador le pide a su CacheLoader todo el estado utilizando <literal>loadEntireState()</literal>. Después envía el estado de vuelta a un nodo nuevo. "
#. Tag: para
#: Cache_loaders.xml:253
@@ -1431,6 +1445,8 @@
"overwriting the old state. This is the <literal>CacheLoader.storeEntireState"
"()</literal> method"
msgstr ""
+"El nuevo nodo le dice a su CacheLoader que almacene ese estado en su almacenamiento, sobreescribiendo el estado antiguo. Este es el método <literal>CacheLoader.storeEntireState"
+"()</literal>"
#. Tag: para
#: Cache_loaders.xml:258
@@ -1438,7 +1454,7 @@
msgid ""
"As an option, the transient (in-memory) state can be transferred as well "
"during the state transfer."
-msgstr ""
+msgstr "Opcionalmente, el estado transitorio (en memoria) se puede transferir también durante la transferencia de estado."
#. Tag: para
#: Cache_loaders.xml:263
@@ -1447,13 +1463,13 @@
"The new node now has the same state in its backend store as everyone else in "
"the cluster, and modifications received from other nodes will now be "
"persisted using the local CacheLoader."
-msgstr ""
+msgstr "Ahora el nuevo nodo tiene el mismo estado que todos en su almacenamiento backend en el clúster y las modificaciones recibidas de otros nodos ahora serán persistidas utilizando el CacheLoader local."
#. Tag: title
#: Cache_loaders.xml:271
#, no-c-format
msgid "Hierarchical caches"
-msgstr ""
+msgstr "Cachés jerárquicos"
#. Tag: para
#: Cache_loaders.xml:272
@@ -1463,7 +1479,7 @@
"<literal>LocalDelegatingCacheLoader</literal>. This type of hierarchy can "
"currently only be set up programmatically. The code below shows how a first-"
"level cache delegates to a local second-level cache:"
-msgstr ""
+msgstr "Si necesita configurar una jerarquía dentro de una sola MV puede utilizar el <literal>LocalDelegatingCacheLoader</literal>. Este tipo de jerarquía actualmente sólo puede ser configurada programáticamente. El código a continuación muestra la manera en que un caché de primer nivel delega a un caché de segundo nivel local:"
#. Tag: programlisting
#: Cache_loaders.xml:275
@@ -1523,7 +1539,7 @@
"any reason, the second cache in the cluster to come online becomes the "
"coordinator and so on. The XML below shows how to configure a cluster using "
"<literal>RpcDelegatingCacheLoader</literal>:"
-msgstr ""
+msgstr "Si necesita configurar una jerarquía a través de MVs pero dentro de un clúster puede utilizar el <literal>RpcDelegatingCacheLoader</literal>, el cual delega todas las peticiones de carga de caché de cachés no coordinadores al caché coordinador del clúster. El caché coordinador es el primer caché en el clúster en ponerse en línea. Observe que si el caché coordinador deja el clúster por cualquier razón, el segundo caché en el clúster en ponerse en línea se convierte en el coordinador, etc. El XML que sigue muestra cómo cnfigurar un clúster utilizando <literal>RpcDelegatingCacheLoader</literal>:"
#. Tag: programlisting
#: Cache_loaders.xml:279
@@ -1616,7 +1632,7 @@
"Note that currently (JBossCache 1.3.0) this cache loader is not well "
"supported, and has not been tested. We suggest to use "
"TcpDelegatingCacheLoader instead (see next)."
-msgstr ""
+msgstr "Observe que actualmente (JBossCache 1.3.0) este cargador de caché no está bien soportado y no ha sido probado. Le sugerimos que utilice en su lugar TcpDelegatingCacheLoader (vea a continuación)."
#. Tag: title
#: Cache_loaders.xml:286
@@ -1633,7 +1649,7 @@
"different process on the same host, or (c) in a different process on a "
"different host. Option (a) is mostly used for unit testing, and the "
"envisaged use is (b) and (c)."
-msgstr ""
+msgstr "Este cargador de caché permite delegar cargas y almacenamientos a otra instancia de JBossCache, la cual se puede encontrar (a) en el mismo espacio de dirección, (b)en un proceso diferente en el mismo host, o (c) en un proceso diferente en un host diferente. La opción (a) la mayoría de las veces se utiliza para pruebas de unidades y los previstos son (b) y (c). "
#. Tag: para
#: Cache_loaders.xml:290
@@ -1643,7 +1659,7 @@
"standalone process, or embedded as an MBean inside JBoss. The TcpCacheServer "
"has a reference to another JBossCache, which it can create itself, or which "
"is given to it (e.g. by JBoss, using dependency injection)."
-msgstr ""
+msgstr "Un TcpDelegatingCacheLoader le habla a un TcpCacheServer remoto, el cual puede ser un proceso autónomo o incluido como un MBean dentro de JBoss. El TcpCacheServer tiene una referencia a otro JBossCache, el cual puede crearse a sí mismo o el cual le es dado (por ejemplo, por JBoss utilizando la inyección de dependencias). "
#. Tag: para
#: Cache_loaders.xml:293
@@ -1651,13 +1667,13 @@
msgid ""
"The TcpDelegatingCacheLoader is configured with the host and port of the "
"remote TcpCacheServer, and uses this to communicate to it."
-msgstr ""
+msgstr "El TcpDelegatingCacheLoader es configurado con el host y el puerto del TcpCacheServer remoto y utiliza esto para comunicarse con este. "
#. Tag: para
#: Cache_loaders.xml:296
#, no-c-format
msgid "An example set of a TcpCacheServer running inside of JBoss is shown below:"
-msgstr ""
+msgstr "A continuación se puede ver un ejemplo de un TcpCacheServer ejecutando dentro de JBoss:"
#. Tag: programlisting
#: Cache_loaders.xml:299
16 years, 2 months
JBoss Cache SVN: r6999 - in pojo/branches/2.2: src/main/docbook/faq/en and 3 other directories.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2008-10-21 21:42:43 -0400 (Tue, 21 Oct 2008)
New Revision: 6999
Modified:
pojo/branches/2.2/pom.xml
pojo/branches/2.2/src/main/docbook/faq/en/master.xml
pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml
pojo/branches/2.2/src/main/docbook/userguide/en/master.xml
pojo/branches/2.2/src/test/java/org/jboss/cache/pojo/BuddyReplicationTest.java
Log:
Prepare for 2.2.1
Modified: pojo/branches/2.2/pom.xml
===================================================================
--- pojo/branches/2.2/pom.xml 2008-10-21 22:41:07 UTC (rev 6998)
+++ pojo/branches/2.2/pom.xml 2008-10-22 01:42:43 UTC (rev 6999)
@@ -4,8 +4,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
- <jbosscache-pojo-version>2.2.0.GA</jbosscache-pojo-version>
- <jbosscache-core-version>2.2.0.GA</jbosscache-core-version>
+ <jbosscache-pojo-version>2.2.1.GA</jbosscache-pojo-version>
+ <jbosscache-core-version>2.2.1.GA</jbosscache-core-version>
<jboss.aop.version>2.0.0.GA</jboss.aop.version>
</properties>
<parent>
Modified: pojo/branches/2.2/src/main/docbook/faq/en/master.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/faq/en/master.xml 2008-10-21 22:41:07 UTC (rev 6998)
+++ pojo/branches/2.2/src/main/docbook/faq/en/master.xml 2008-10-22 01:42:43 UTC (rev 6999)
@@ -5,7 +5,7 @@
<article class="faq" lang="en">
<articleinfo>
<title>Frequently Asked Questions about POJO Cache</title>
- <releaseinfo>Release 2.2.0.GA</releaseinfo>
+ <releaseinfo>Release 2.2.1.GA</releaseinfo>
<pubdate>October 2008</pubdate>
<author>
Modified: pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml 2008-10-21 22:41:07 UTC (rev 6998)
+++ pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml 2008-10-22 01:42:43 UTC (rev 6999)
@@ -2,7 +2,7 @@
<article lang="en">
<articleinfo>
<title>POJO Cache Tutorial</title>
- <releaseinfo>Release 2.2.0</releaseinfo>
+ <releaseinfo>Release 2.2.1</releaseinfo>
<pubdate>October 2008</pubdate>
<author>
<firstname>Ben</firstname>
Modified: pojo/branches/2.2/src/main/docbook/userguide/en/master.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/userguide/en/master.xml 2008-10-21 22:41:07 UTC (rev 6998)
+++ pojo/branches/2.2/src/main/docbook/userguide/en/master.xml 2008-10-22 01:42:43 UTC (rev 6999)
@@ -18,7 +18,7 @@
<bookinfo>
<title>POJO Cache</title>
<subtitle>User Documentation</subtitle>
- <releaseinfo>Release 2.2.0.GA</releaseinfo>
+ <releaseinfo>Release 2.2.1.GA</releaseinfo>
<pubdate>October 2008</pubdate>
<author>
Modified: pojo/branches/2.2/src/test/java/org/jboss/cache/pojo/BuddyReplicationTest.java
===================================================================
--- pojo/branches/2.2/src/test/java/org/jboss/cache/pojo/BuddyReplicationTest.java 2008-10-21 22:41:07 UTC (rev 6998)
+++ pojo/branches/2.2/src/test/java/org/jboss/cache/pojo/BuddyReplicationTest.java 2008-10-22 01:42:43 UTC (rev 6999)
@@ -47,7 +47,7 @@
* @version $Revision$
*/
@Test(groups = {"functional"})
-public class BuddyReplicationTest
+public class BuddyReplicationTest
{
Log log = LogFactory.getLog(ReplicatedTest.class);
PojoCache cache, cache1;
@@ -65,7 +65,7 @@
addBuddyReplication(cfg2);
cache1 = PojoCacheFactory.createCache(cfg2, toStart);
cache1.start();
-
+
// Enable gravitation
cache.getThreadContext().setGravitationEnabled(true);
cache1.getThreadContext().setGravitationEnabled(true);
@@ -88,6 +88,7 @@
brc.setBuddyLocatorConfig(blc);
cfg.setBuddyReplicationConfig(brc);
+ cfg.setSyncCommitPhase(true);
}
private Person createPerson(String id, String name, int age)
16 years, 2 months