JBoss Cache SVN: r5602 - core/trunk/src/main/java/org/jboss/cache/statetransfer.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-21 10:36:06 -0400 (Mon, 21 Apr 2008)
New Revision: 5602
Modified:
core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java
Log:
Incorrect Fqn construction
Modified: core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java 2008-04-21 09:43:44 UTC (rev 5601)
+++ core/trunk/src/main/java/org/jboss/cache/statetransfer/DefaultStateTransferIntegrator.java 2008-04-21 14:36:06 UTC (rev 5602)
@@ -315,7 +315,7 @@
// change the Fqn to fit under it
if (offset > 0)
{
- fqn = Fqn.fromRelativeElements(parent.getFqn().getAncestor(offset), fqn);
+ fqn = Fqn.fromRelativeFqn(parent.getFqn().getAncestor(offset), fqn);
}
size = fqn.size();
if (size <= parent_level)
16 years, 2 months
JBoss Cache SVN: r5601 - core/trunk/src/main/java/org/jboss/cache/commands/cachedata.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-21 05:43:44 -0400 (Mon, 21 Apr 2008)
New Revision: 5601
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java
Log:
fqn declared twice!!
Modified: core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java 2008-04-21 09:43:24 UTC (rev 5600)
+++ core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java 2008-04-21 09:43:44 UTC (rev 5601)
@@ -22,8 +22,6 @@
private CacheData cacheData;
- private Fqn fqn;
-
public GetDataMapCommand()
{
}
16 years, 2 months
JBoss Cache SVN: r5600 - core/trunk/src/test/java/org/jboss/cache/loader.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-21 05:43:24 -0400 (Mon, 21 Apr 2008)
New Revision: 5600
Modified:
core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java
Log:
check that the loader has been cleaned first
Modified: core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java 2008-04-21 09:42:59 UTC (rev 5599)
+++ core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java 2008-04-21 09:43:24 UTC (rev 5600)
@@ -804,11 +804,13 @@
public void testGetData() throws Exception
{
Fqn f = Fqn.fromString("/a");
+ assert !cache.exists(f);
+ assert !loader.exists(f);
cache.put(f, "one", "one");
cache.put(f, "two", "two");
cache.evict(f);
Map data = cache.getRoot().getChild(f).getData();
- assertEquals("Correct # of entries", 2, data.size());
+ assertEquals("incorrect # of entries", 2, data.size());
assertEquals("Has key 'one", "one", data.get("one"));
assertEquals("Has key 'two", "two", data.get("two"));
16 years, 2 months
JBoss Cache SVN: r5599 - core/trunk/src/main/java/org/jboss/cache/marshall.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-21 05:42:59 -0400 (Mon, 21 Apr 2008)
New Revision: 5599
Modified:
core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
Log:
typo
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-04-18 22:56:25 UTC (rev 5598)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-04-21 09:42:59 UTC (rev 5599)
@@ -1,12 +1,11 @@
package org.jboss.cache.marshall;
+import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.CacheCommand;
import org.jboss.cache.commands.remote.DirectCommand;
-import org.jboss.cache.invocation.CacheInvocationDelegate;
-import org.jboss.cache.invocation.InvocationContextContainer;
-import org.jboss.cache.invocation.InterceptorChain;
import org.jboss.cache.invocation.CacheLifecycleManager;
-import org.jboss.cache.InvocationContext;
+import org.jboss.cache.invocation.InterceptorChain;
+import org.jboss.cache.invocation.InvocationContextContainer;
import org.jgroups.Channel;
import org.jgroups.MembershipListener;
import org.jgroups.Message;
@@ -84,7 +83,7 @@
if (cmd instanceof DirectCommand)
{
- if (trace) log.trace("This is a direct command - so performing directlty and not via the invoker.");
+ if (trace) log.trace("This is a direct command - so performing directly and not via the invoker.");
DirectCommand dCmd = (DirectCommand) cmd;
return dCmd.performDirectly();
}
16 years, 2 months
JBoss Cache SVN: r5598 - experimental/jsr166/src/jsr166y.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2008-04-18 18:56:25 -0400 (Fri, 18 Apr 2008)
New Revision: 5598
Modified:
experimental/jsr166/src/jsr166y/ConcurrentReferenceHashMap.java
experimental/jsr166/src/jsr166y/MapLoops.java
Log:
remove use of switch on enums in favor of faster reference checking
drop the 2 type refs on hashentry since it is space critical
Modified: experimental/jsr166/src/jsr166y/ConcurrentReferenceHashMap.java
===================================================================
--- experimental/jsr166/src/jsr166y/ConcurrentReferenceHashMap.java 2008-04-18 16:26:54 UTC (rev 5597)
+++ experimental/jsr166/src/jsr166y/ConcurrentReferenceHashMap.java 2008-04-18 22:56:25 UTC (rev 5598)
@@ -309,38 +309,31 @@
final int hash;
volatile Object valueRef;
final HashEntry<K,V> next;
- final ReferenceType keyType;
- final ReferenceType valueType;
HashEntry(K key, int hash, HashEntry<K,V> next, V value,
ReferenceType keyType, ReferenceType valueType,
ReferenceQueue<K> refQueue) {
- this.keyType = keyType;
- this.valueType = valueType;
- this.keyRef = newKeyReference(key, hash, refQueue);
+ this.keyRef = newKeyReference(key, keyType, hash, refQueue);
this.hash = hash;
this.next = next;
- this.valueRef = newValueReference(value);
+ this.valueRef = newValueReference(value, valueType);
}
- final Object newKeyReference(K key, int hash, ReferenceQueue<K> refQueue) {
- switch (keyType) {
- case WEAK:
- return new WeakKeyReference<K>(key, hash, refQueue);
- case SOFT:
- return new SoftKeyReference<K>(key, hash, refQueue);
- }
+ final Object newKeyReference(K key, ReferenceType keyType, int hash,
+ ReferenceQueue<K> refQueue) {
+ if (keyType == ReferenceType.WEAK)
+ return new WeakKeyReference<K>(key, hash, refQueue);
+ if (keyType == ReferenceType.SOFT)
+ return new SoftKeyReference<K>(key, hash, refQueue);
return key;
}
- final Object newValueReference(V value) {
- switch (valueType) {
- case WEAK:
- return new WeakReference<V>(value);
- case SOFT:
- return new SoftReference<V>(value);
- }
+ final Object newValueReference(V value, ReferenceType valueType) {
+ if (valueType == ReferenceType.WEAK)
+ return new WeakReference<V>(value);
+ if (valueType == ReferenceType.SOFT)
+ return new SoftReference<V>(value);
return value;
}
@@ -365,8 +358,8 @@
return (V) value;
}
- final void setValue(V value) {
- this.valueRef = newValueReference(value);
+ final void setValue(V value, ReferenceType valueType) {
+ this.valueRef = newValueReference(value, valueType);
}
@SuppressWarnings("unchecked")
@@ -588,7 +581,7 @@
boolean replaced = false;
if (e != null && oldValue.equals(e.value())) {
replaced = true;
- e.setValue(newValue);
+ e.setValue(newValue, valueType);
}
return replaced;
} finally {
@@ -607,7 +600,7 @@
V oldValue = null;
if (e != null) {
oldValue = e.value();
- e.setValue(newValue);
+ e.setValue(newValue, valueType);
}
return oldValue;
} finally {
@@ -638,7 +631,7 @@
if (e != null) {
oldValue = e.value();
if (!onlyIfAbsent)
- e.setValue(value);
+ e.setValue(value, valueType);
}
else {
oldValue = null;
Modified: experimental/jsr166/src/jsr166y/MapLoops.java
===================================================================
--- experimental/jsr166/src/jsr166y/MapLoops.java 2008-04-18 16:26:54 UTC (rev 5597)
+++ experimental/jsr166/src/jsr166y/MapLoops.java 2008-04-18 22:56:25 UTC (rev 5598)
@@ -48,7 +48,7 @@
}
}
else
- mapClass = ConcurrentWeakHashMap.class;
+ mapClass = ConcurrentReferenceHashMap.class;
if (args.length > 1)
maxThreads = Integer.parseInt(args[1]);
16 years, 2 months
JBoss Cache SVN: r5597 - in core/trunk/src: main/java/org/jboss/cache/commands/cachedata and 6 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-18 12:26:54 -0400 (Fri, 18 Apr 2008)
New Revision: 5597
Modified:
core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java
core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java
core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
core/trunk/src/test/java/org/jboss/cache/api/NodeAPIOptimisticTest.java
core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java
core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
core/trunk/src/test/java/org/jboss/cache/api/NodeMoveOptimisticTest.java
core/trunk/src/test/java/org/jboss/cache/api/NodeReplicatedMoveOptimisticTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LFUAlgorithmTest.java
core/trunk/src/test/resources/log4j.xml
Log:
revactored chained invocation pattern
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -28,6 +28,9 @@
import org.jboss.cache.transaction.TransactionTable;
import org.jboss.cache.util.ThreadGate;
import org.jboss.cache.util.reflect.ReflectionUtil;
+import org.jboss.cache.invocation.InvocationContextContainer;
+import org.jboss.cache.invocation.InterceptorChain;
+import org.jboss.cache.invocation.CacheLifecycleManager;
import org.jgroups.Address;
import org.jgroups.Channel;
import org.jgroups.ChannelException;
@@ -82,17 +85,22 @@
private Configuration configuration;
private Notifier notifier;
private CacheSPI spi;
+ private InvocationContextContainer invocationContextContainer;
private boolean trace = log.isTraceEnabled();
private Marshaller marshaller;
private TransactionManager txManager;
private TransactionTable txTable;
+ private InterceptorChain interceptorChain;
+ private CacheLifecycleManager lifecycleManager;
private boolean isUsingBuddyReplication;
private boolean isInLocalMode;
@Inject
private void setupDependencies(CacheMessageListener messageListener, Configuration configuration, Notifier notifier,
- CacheSPI spi, Marshaller marshaller, TransactionTable txTable, TransactionManager txManager)
+ CacheSPI spi, Marshaller marshaller, TransactionTable txTable,
+ TransactionManager txManager, InvocationContextContainer container, InterceptorChain interceptorChain,
+ CacheLifecycleManager lifecycleManager)
{
this.messageListener = messageListener;
this.configuration = configuration;
@@ -101,6 +109,9 @@
this.marshaller = marshaller;
this.txManager = txManager;
this.txTable = txTable;
+ this.invocationContextContainer = container;
+ this.interceptorChain = interceptorChain;
+ this.lifecycleManager = lifecycleManager;
}
// ------------ START: Lifecycle methods ------------
@@ -273,11 +284,13 @@
// but only if we are using region based marshalling?!??
if (configuration.isUseRegionBasedMarshalling())
{
- disp = new InactiveRegionAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(), spi);
+ disp = new InactiveRegionAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
+ spi, invocationContextContainer, interceptorChain, lifecycleManager);
}
else
{
- disp = new CommandAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(), spi);
+ disp = new CommandAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
+ invocationContextContainer, invocationContextContainer, interceptorChain, lifecycleManager);
}
disp.setRequestMarshaller(marshaller);
Modified: core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/commands/cachedata/GetDataMapCommand.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -8,6 +8,8 @@
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.invocation.CacheData;
+import java.util.Collections;
+
/**
* Implements functionality defined by {@link org.jboss.cache.Cache#getData(org.jboss.cache.Fqn)}
*
@@ -41,7 +43,7 @@
{
NodeSPI n = cacheData.findNode(fqn);
if (n == null) return null;
- return n.getDataDirect();
+ return Collections.unmodifiableMap(n.getDataDirect());
}
public Object accept(InvocationContext ctx, CommandsVisitor handler) throws Throwable
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -65,7 +65,7 @@
try
{
if (trace) log.trace("Clustered get: invoking call with Fqn " + cacheDataComand.getFqn());
- callResults = interceptorChain.invoke(cacheDataComand, false);
+ callResults = interceptorChain.invokeRemote(cacheDataComand);
boolean found = validResult(callResults);
if (trace) log.trace("Got result " + callResults + ", found=" + found);
if (found && callResults == null) callResults = createEmptyResults();
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -80,7 +80,7 @@
{
if (trace) log.trace("Invoking command " + cacheCommand + ", with originLocal flag set to false.");
- Object retVal = invoker.invoke(cacheCommand, false);
+ Object retVal = invoker.invokeRemote(cacheCommand);
// we only need to return values for a set of remote calls; not every call.
if (returnValueForRemoteCall(cacheCommand))
{
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/AbstractInvocationDelegate.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -3,7 +3,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheException;
-import org.jboss.cache.CacheStatus;
import org.jboss.cache.InvocationContext;
import org.jboss.cache.commands.CacheCommand;
import org.jboss.cache.config.Configuration;
@@ -46,120 +45,10 @@
this.lifecycleManager = lifecycleManager;
}
- /**
- * Passes a method call up the interceptor chain.
- *
- * @param call methodcall to pass
- * @return an Object, the generic return type for the interceptors.
- * @throws Throwable in the event of problems
- */
- public Object invoke(CacheCommand command) throws CacheException
- {
- assertIsConstructed();
- InvocationContext ctx = invocationContextContainer.get();
- return invoke(command, ctx.getOptionOverrides().isSkipCacheStatusCheck(), ctx);
- }
- /**
- * Passes a method call up the interceptor chain, optionally allowing you to skip cache status checks.
- *
- * @return an Object, the generic return type for the interceptors.
- * @throws Throwable in the event of problems
- */
- protected Object invoke(CacheCommand command, boolean skipCacheStatusCheck) throws CacheException
- {
- assertIsConstructed();
- return invoke(command, skipCacheStatusCheck, invocationContextContainer.get());
- }
-
protected void assertIsConstructed()
{
if (invocationContextContainer == null) throw new IllegalStateException("The cache has been destroyed!");
}
- private Object invoke(CacheCommand command, boolean skipCacheStatusCheck, InvocationContext ctx) throws CacheException
- {
- if (!lifecycleManager.getCacheStatus().allowInvocations() && !skipCacheStatusCheck)
- {
- // only throw an exception if this is a locally originating call - JBCACHE-1179
- if (originLocal)
- {
- throw new IllegalStateException("Cache not in STARTED state!");
- }
- else
- {
- if (lifecycleManager.getCacheStatus() == CacheStatus.STARTING)
- {
- try
- {
- blockUntilCacheStarts();
- }
- catch (InterruptedException e)
- {
- Thread.currentThread().interrupt();
- }
- }
- else
- {
- log.warn("Received a remote call but the cache is not in STARTED state - ignoring call.");
- return null;
- }
- }
- }
-
- CacheCommand oldCommand = null;
- try
- {
- // check if we had a method call lurking around
- oldCommand = ctx.getExecutingCommand();
- ctx.setExecutingCommand(command);
- // only set this if originLocal is EXPLICITLY passed in as FALSE. Otherwise leave it as a default.
- if (!originLocal) ctx.setOriginLocal(false);
- return invoker.invoke(ctx, command);
- }
- catch (CacheException e)
- {
- throw e;
- }
- catch (RuntimeException e)
- {
- throw e;
- }
- catch (Throwable t)
- {
- throw new CacheException(t);
- }
- finally
- {
- if (!originLocal) ctx.setOriginLocal(true);
- // reset old method call
- if (ctx == null) ctx = invocationContextContainer.get();
- ctx.setExecutingCommand(oldCommand);
- }
- }
-
- /**
- * Blocks until the current cache instance is in it's {@link org.jboss.cache.CacheStatus#STARTED started} phase. Blocks
- * for up to {@link org.jboss.cache.config.Configuration#getStateRetrievalTimeout()} milliseconds, throwing an IllegalStateException
- * if the cache doesn't reach this state even after this maximum wait time.
- *
- * @throws InterruptedException if interrupted while waiting
- * @throws IllegalStateException if even after waiting the cache has not started.
- */
- private void blockUntilCacheStarts() throws InterruptedException, IllegalStateException
- {
- int pollFrequencyMS = 100;
- long startupWaitTime = configuration.getStateRetrievalTimeout();
- long giveUpTime = System.currentTimeMillis() + startupWaitTime;
-
- while (System.currentTimeMillis() < giveUpTime)
- {
- if (lifecycleManager.getCacheStatus().allowInvocations()) break;
- Thread.sleep(pollFrequencyMS);
- }
-
- // check if we have started.
- if (!lifecycleManager.getCacheStatus().allowInvocations())
- throw new IllegalStateException("Cache not in STARTED state, even after waiting " + configuration.getStateRetrievalTimeout() + " millis.");
- }
}
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -56,24 +56,6 @@
{
}
-// @Inject
-// public void initialize(CacheData cacheData)
-// {
-// this.stateTransferManager = stateTransferManager;
-// this.cacheLoaderManager = cacheLoaderManager;
-// this.notifier = notifier;
-// this.transactionManager = transactionManager;
-// this.buddyManager = buddyManager;
-// this.transactionTable = transactionTable;
-// this.rpcManager = rpcManager;
-// this.regionManager = regionManager;
-// this.marshaller = marshaller;
-// this.cacheData = cacheData;
-// this.commandsFactory = commandsFactory;
-// this.transactionHelper = transactionHelper;
-
- // }
-
@Inject
public void initialize(StateTransferManager stateTransferManager, CacheLoaderManager cacheLoaderManager, Notifier notifier,
TransactionManager transactionManager, BuddyManager buddyManager, TransactionTable transactionTable,
@@ -244,8 +226,9 @@
public GravitateResult gravitateData(Fqn fqn, boolean searchBuddyBackupSubtrees, InvocationContext ctx)
{
+ cacheStatusCheck(ctx);
GravitateDataCommand command = commandsFactory.buildGravitateDataCacheCommand(fqn, searchBuddyBackupSubtrees);
- return (GravitateResult) invoke(command);
+ return (GravitateResult) invoker.invoke(ctx, command);
// return (GravitateResult) command.perform(null);
}
@@ -333,8 +316,10 @@
public void move(Fqn<?> nodeToMove, Fqn<?> newParent) throws NodeNotExistsException
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
MoveCommand command = commandsFactory.buildMoveCommand(nodeToMove, newParent);
- invoke(command);
+ invoker.invoke(ctx, command);
}
public void move(String nodeToMove, String newParent) throws NodeNotExistsException
@@ -354,10 +339,12 @@
public void evict(Fqn<?> fqn, boolean recursive)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
List<Fqn> nodesToEvict = cacheData.getNodesForEviction(fqn, recursive);
for (Fqn aFqn : nodesToEvict)
{
- invoke(commandsFactory.buildEvictFqnCommand(aFqn));
+ invoker.invoke(ctx, commandsFactory.buildEvictFqnCommand(aFqn));
}
}
@@ -368,8 +355,10 @@
public V get(Fqn<?> fqn, K key)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(fqn, key, true);
- return (V) invoke(command);
+ return (V) invoker.invoke(ctx, command);
}
public V get(String fqn, K key)
@@ -396,12 +385,13 @@
}
}
return result;
- }
- else
+ } else
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GlobalTransaction tx = transactionHelper.getCurrentTransaction();
RemoveNodeCommand command = commandsFactory.buildRemoveNodeCommand(tx, fqn, true, true, false);
- Object retval = invoke(command);
+ Object retval = invoker.invoke(ctx, command);
return retval != null && (Boolean) retval;
}
}
@@ -413,8 +403,10 @@
public NodeSPI<K, V> getNode(Fqn<?> fqn)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GetNodeCommand command = commandsFactory.buildGetNodeCommand(fqn);
- return (NodeSPI) invoke(command);
+ return (NodeSPI) invoker.invoke(ctx, command);
}
public NodeSPI<K, V> getNode(String fqn)
@@ -424,9 +416,11 @@
public V remove(Fqn<?> fqn, K key) throws CacheException
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GlobalTransaction tx = transactionHelper.getCurrentTransaction();
RemoveKeyCommand command = commandsFactory.buildRemoveKeyCommand(tx, fqn, key, true);
- return (V) invoke(command);
+ return (V) invoker.invoke(ctx, command);
}
public V remove(String fqn, K key)
@@ -436,8 +430,10 @@
public void put(Fqn<?> fqn, Map<K, V> data)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
PutDataMapCommand command = commandsFactory.buildPutDataMapCommand(null, fqn, data, true, false);
- invoke(command);
+ invoker.invoke(ctx, command);
}
public void put(String fqn, Map<K, V> data)
@@ -447,15 +443,16 @@
public void putForExternalRead(Fqn<?> fqn, K key, V value)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
// if the node exists then this should be a no-op.
if (peek(fqn, false, false) == null)
{
getInvocationContext().getOptionOverrides().setFailSilently(true);
getInvocationContext().getOptionOverrides().setForceAsynchronous(true);
PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(null, fqn, key, value, false, true);
- invoke(command);
- }
- else
+ invoker.invoke(ctx, command);
+ } else
{
if (log.isDebugEnabled())
log.debug("putForExternalRead() called with Fqn " + fqn + " and this node already exists. This method is hence a no op.");
@@ -464,9 +461,11 @@
public V put(Fqn<?> fqn, K key, V value)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GlobalTransaction tx = transactionHelper.getCurrentTransaction();
PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(tx, fqn, key, value, false, false);
- return (V) invoke(command);
+ return (V) invoker.invoke(ctx, command);
}
public V put(String fqn, K key, V value)
@@ -498,8 +497,10 @@
*/
public Map<K, V> getData(Fqn<?> fqn)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GetDataMapCommand command = commandsFactory.buildGetDataMapCommand(fqn);
- return (Map<K, V>) invoke(command);
+ return (Map<K, V>) invoker.invoke(ctx, command);
}
/**
@@ -523,8 +524,10 @@
*/
public Set<K> getKeys(Fqn<?> fqn)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GetKeysCommand command = commandsFactory.buildGetKeysCommand(fqn);
- return (Set<K>) invoke(command);
+ return (Set<K>) invoker.invoke(ctx, command);
}
/**
@@ -540,8 +543,10 @@
*/
public void clearData(Fqn fqn)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GlobalTransaction tx = getCurrentTransaction();
- invoke(commandsFactory.buildRemoveDataCommand(tx, fqn, true, false, false));
+ invoker.invoke(ctx, commandsFactory.buildRemoveDataCommand(tx, fqn, true, false, false));
}
/**
@@ -553,8 +558,10 @@
*/
public <E> Set<E> getChildrenNames(Fqn<E> fqn)
{
+ InvocationContext ctx = invocationContextContainer.get();
+ cacheStatusCheck(ctx);
GetChildrenNamesCommand command = commandsFactory.buildGetChildrenNamesCommand(fqn);
- Set<E> retval = (Set<E>) invoke(command);
+ Set<E> retval = (Set<E>) invoker.invoke(ctx, command);
if (retval != null)
retval = Collections.unmodifiableSet(new HashSet<E>(retval));
else
@@ -577,7 +584,7 @@
assertIsConstructed();
BlockChannelCommand command = commandsFactory.buildBlockChannelCommand();
// need to skip status check here because this typically happens before the cache is in it's STARTED state
- invoke(command, true);
+ invoker.invoke(invocationContextContainer.get(), command);
}
public void unblock()
@@ -585,7 +592,15 @@
assertIsConstructed();
UnblockChannelCommand command = commandsFactory.buildUnblockChannelCommand();
// need to skip status check here because this typically happens before the cache is in it's STARTED state
- invoke(command, true);
+ invoker.invoke(invocationContextContainer.get(), command);
}
+ protected void cacheStatusCheck(InvocationContext ctx)
+ {
+ assertIsConstructed();
+ if (!ctx.getOptionOverrides().isSkipCacheStatusCheck())
+ {
+ lifecycleManager.allowsInvocation(true);
+ }
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -146,8 +146,7 @@
log.warn("Needed to call stop() before destroying but stop() " +
"threw exception. Proceeding to destroy", e);
}
- }
- else
+ } else
return;
}
@@ -283,8 +282,7 @@
};
Runtime.getRuntime().addShutdownHook(shutdownHook);
- }
- else
+ } else
{
if (log.isTraceEnabled())
log.trace("Not registering a shutdown hook. Configured behavior = " + configuration.getShutdownHookBehavior());
@@ -417,8 +415,7 @@
category.append(rpcManager.getLocalAddress().toString().replace('.', '_'));
}
}
- }
- else
+ } else
{
// we're in LOCAL mode
category.append("_LOCAL");
@@ -445,6 +442,64 @@
}
}
+ /**
+ * For local calls, if chache is not in STARTED mode will throw an IllegalStateException.
+ * For remote cache, if cache is STRTED returns true. If cache is STARTING waits for the cache to wait
+ * for {@link org.jboss.cache.config.Configuration#getStateRetrievalTimeout()} milliseconds, if cache starts
+ * returns true, otherwise returns false.
+ */
+ public boolean allowsInvocation(boolean originLocal)
+ {
+ if (getCacheStatus().allowInvocations()) return true;
+ // only throw an exception if this is a locally originating call - JBCACHE-1179
+ if (originLocal)
+ {
+ throw new IllegalStateException("Cache not in STARTED state!");
+ }
+ if (getCacheStatus() == CacheStatus.STARTING)
+ {
+ try
+ {
+ blockUntilCacheStarts();
+ return true;
+ }
+ catch (InterruptedException e)
+ {
+ Thread.currentThread().interrupt();
+ }
+ } else
+ {
+ log.warn("Received a remote call but the cache is not in STARTED state - ignoring call.");
+ }
+ return false;
+ }
+
+ /**
+ * Blocks until the current cache instance is in it's {@link org.jboss.cache.CacheStatus#STARTED started} phase. Blocks
+ * for up to {@link org.jboss.cache.config.Configuration#getStateRetrievalTimeout()} milliseconds, throwing an IllegalStateException
+ * if the cache doesn't reach this state even after this maximum wait time.
+ *
+ * @throws InterruptedException if interrupted while waiting
+ * @throws IllegalStateException if even after waiting the cache has not started.
+ */
+ private void blockUntilCacheStarts() throws InterruptedException, IllegalStateException
+ {
+ int pollFrequencyMS = 100;
+ long startupWaitTime = configuration.getStateRetrievalTimeout();
+ long giveUpTime = System.currentTimeMillis() + startupWaitTime;
+
+ while (System.currentTimeMillis() < giveUpTime)
+ {
+ if (getCacheStatus().allowInvocations()) break;
+ Thread.sleep(pollFrequencyMS);
+ }
+
+ // check if we have started.
+ if (!getCacheStatus().allowInvocations())
+ throw new IllegalStateException("Cache not in STARTED state, even after waiting " + configuration.getStateRetrievalTimeout() + " millis.");
+ }
+
+
public CacheStatus getCacheStatus()
{
return cacheStatus;
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -3,6 +3,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.InvocationContext;
+import org.jboss.cache.CacheException;
import org.jboss.cache.commands.CacheCommand;
import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.interceptors.base.ChainedInterceptor;
@@ -226,19 +227,35 @@
/**
* Walks the command through the interceptor chain. The received ctx is being passed in.
*/
- public Object invoke(InvocationContext ctx, CacheCommand command) throws Throwable
+ public Object invoke(InvocationContext ctx, CacheCommand command)
{
- return command.accept(ctx, firstInChain);
+ ctx.setExecutingCommand(command);
+ try
+ {
+ return command.accept(ctx, firstInChain);
+ }
+ catch (CacheException e)
+ {
+ throw e;
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Throwable t)
+ {
+ throw new CacheException(t);
+ }
}
/**
* Similar to {@link #invoke(org.jboss.cache.InvocationContext, org.jboss.cache.commands.CacheCommand)}, but
* constructs a invocation context on the fly, using {@link InvocationContextContainer#get()}
*/
- public Object invoke(CacheCommand cacheCommand, boolean isOriginLocal) throws Throwable
+ public Object invokeRemote(CacheCommand cacheCommand) throws Throwable
{
InvocationContext ctxt = invocationContextContainer.get();
- ctxt.setOriginLocal(isOriginLocal);
+ ctxt.setOriginLocal(false);
return cacheCommand.accept(ctxt, firstInChain);
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -3,6 +3,10 @@
import org.jboss.cache.commands.CacheCommand;
import org.jboss.cache.commands.remote.DirectCommand;
import org.jboss.cache.invocation.CacheInvocationDelegate;
+import org.jboss.cache.invocation.InvocationContextContainer;
+import org.jboss.cache.invocation.InterceptorChain;
+import org.jboss.cache.invocation.CacheLifecycleManager;
+import org.jboss.cache.InvocationContext;
import org.jgroups.Channel;
import org.jgroups.MembershipListener;
import org.jgroups.Message;
@@ -17,13 +21,19 @@
*/
public class CommandAwareRpcDispatcher extends RpcDispatcher
{
- protected CacheInvocationDelegate cid;
+ protected InvocationContextContainer invocationContextContainer;
+ protected InterceptorChain interceptorChain;
+ protected CacheLifecycleManager lifecycleManager;
protected boolean trace;
- public CommandAwareRpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj)
+ public CommandAwareRpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj,
+ InvocationContextContainer container, InterceptorChain interceptorChain,
+ CacheLifecycleManager lifecycleManager)
{
super(channel, l, l2, server_obj);
- cid = (CacheInvocationDelegate) server_obj;
+ this.invocationContextContainer = container;
+ this.lifecycleManager = lifecycleManager;
+ this.interceptorChain = interceptorChain;
trace = log.isTraceEnabled();
}
@@ -78,8 +88,13 @@
DirectCommand dCmd = (DirectCommand) cmd;
return dCmd.performDirectly();
}
-
- return cid.invoke(cmd);
+ InvocationContext ctx = invocationContextContainer.get();
+ ctx.setOriginLocal(false);
+ if (!lifecycleManager.allowsInvocation(false))
+ {
+ return null;
+ }
+ return interceptorChain.invoke(ctx, cmd);
}
@Override
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -1,6 +1,9 @@
package org.jboss.cache.marshall;
import org.jboss.cache.commands.CacheCommand;
+import org.jboss.cache.invocation.InvocationContextContainer;
+import org.jboss.cache.invocation.InterceptorChain;
+import org.jboss.cache.invocation.CacheLifecycleManager;
import org.jgroups.Channel;
import org.jgroups.MembershipListener;
import org.jgroups.Message;
@@ -20,9 +23,11 @@
/**
* Only provide the flavour of the {@link RpcDispatcher} constructor that we care about.
*/
- public InactiveRegionAwareRpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj)
+ public InactiveRegionAwareRpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object serverObj,
+ InvocationContextContainer container, InterceptorChain interceptorChain,
+ CacheLifecycleManager lifecycleManager)
{
- super(channel, l, l2, server_obj);
+ super(channel, l, l2, serverObj, container, interceptorChain, lifecycleManager);
}
@Override
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeAPIOptimisticTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeAPIOptimisticTest.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeAPIOptimisticTest.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -12,4 +12,10 @@
{
optimistic = true;
}
+
+ @Override
+ public void testDoubleRemovalOfData() throws Exception
+ {
+ super.testDoubleRemovalOfData(); //To change body of overridden methods use File | Settings | File Templates.
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -375,6 +375,8 @@
tm.begin();
assertEquals(cache.get("/foo/1/2/3", "item"), 1);
cache.removeNode("/foo/1");
+ cache.exists("/foo/1");
+ assertFalse(cache.exists("/foo/1"));
assertNull(cache.get("/foo/1", "item"));
cache.removeNode("/foo/1/2/3");
assertNull(cache.get("/foo/1/2/3", "item"));
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -286,6 +286,7 @@
protected void doCacheLoaderTest(boolean pasv, boolean useTx) throws Exception
{
+// cache.stop();
cache.destroy();
cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig(pasv, "", DummyInMemoryCacheLoader.class.getName(), null, false, false, false, false));
cache.start();
@@ -311,56 +312,12 @@
nodeD.put(k, vD);
nodeE = nodeD.addChild(E);
nodeE.put(k, vE);
- /*
- Node nodeF = nodeE.addChild(Fqn.fromString("F"));
- nodeF.put(k, vE);
- Node nodeG = nodeF.addChild(Fqn.fromString("G"));
- nodeG.put(k, vE);
- */
-
- assertNotNull(cache.peek(A, false));
- assertNotNull(cache.peek(B, false));
- assertNull(cache.peek(C, false));
- assertNotNull(cache.peek(Fqn.fromRelativeFqn(A, C), false));
- assertNotNull(cache.peek(Fqn.fromRelativeFqn(Fqn.fromRelativeFqn(A, C), D), false));
- assertNotNull(cache.peek(Fqn.fromRelativeFqn(Fqn.fromRelativeFqn(Fqn.fromRelativeFqn(A, C), D), E), false));
-
- // test data
- assertEquals(vA, nodeA.get(k));
- assertEquals(vB, nodeB.get(k));
- assertEquals(vC, nodeC.get(k));
- assertEquals(vD, nodeD.get(k));
- assertEquals(vE, nodeE.get(k));
-
- // parentage
- assertEquals(rootNode, nodeA.getParent());
- assertEquals(rootNode, nodeB.getParent());
- assertEquals(nodeA, nodeC.getParent());
- assertEquals(nodeC, nodeD.getParent());
- assertEquals(nodeD, nodeE.getParent());
-
- System.out.println("Loader" + loader);
-
cache.evict(Fqn.ROOT, true);
// move
if (useTx) tm.begin();
cache.move(nodeC.getFqn(), nodeB.getFqn());
-
- // Fqn[] fqns = {A, B, new Fqn(B, C), new Fqn(new Fqn(B, C), D), new Fqn(new Fqn(new Fqn(B, C), D), E)};
- // System.out.println("*** LOADER BEFORE COMMIT ");
- // for (Fqn f: fqns)
- // {
- // System.out.println(" Fqn: " + f);
- // System.out.println(" Contents in loader: " + loader.get(f));
- // }
if (useTx) tm.commit();
- // System.out.println("*** LOADER AFTER COMMIT ");
- // for (Fqn f: fqns)
- // {
- // System.out.println(" Fqn: " + f);
- // System.out.println(" Contents in loader: " + loader.get(f));
- // }
// after eviction, the node objects we hold are probably stale.
nodeA = rootNode.getChild(A);
@@ -375,15 +332,6 @@
Fqn old_D = Fqn.fromRelativeFqn(old_C, D);
Fqn old_E = Fqn.fromRelativeFqn(old_D, E);
- assertNotNull(cache.peek(A, false));
- assertNotNull(cache.peek(B, false));
- assertNull(cache.peek(C, false));
- assertNull(cache.peek(Fqn.fromRelativeFqn(A, C), false));
- assertNotNull(cache.peek(Fqn.fromRelativeFqn(B, C), false));
-
- assertNotNull(cache.peek(Fqn.fromRelativeFqn(Fqn.fromRelativeFqn(B, C), D), false));
- assertNotNull(cache.peek(Fqn.fromRelativeFqn(Fqn.fromRelativeFqn(Fqn.fromRelativeFqn(B, C), D), E), false));
-
// test data
assertEquals(vA, nodeA.get(k));
assertEquals(vB, nodeB.get(k));
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeMoveOptimisticTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeMoveOptimisticTest.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeMoveOptimisticTest.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -6,7 +6,9 @@
*/
package org.jboss.cache.api;
+import org.testng.annotations.Test;
+
public class NodeMoveOptimisticTest extends NodeMoveAPITest
{
public NodeMoveOptimisticTest()
@@ -23,4 +25,18 @@
{
// no op
}
+
+ @Override
+ @Test(groups = {"functional"})
+ public void testWithCacheloaders() throws Exception
+ {
+ super.testWithCacheloaders(); //To change body of overridden methods use File | Settings | File Templates.
+ }
+
+ @Override
+ @Test(groups = {"functional"})
+ public void testWithPassivation() throws Exception
+ {
+ super.testWithPassivation(); //To change body of overridden methods use File | Settings | File Templates.
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeReplicatedMoveOptimisticTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeReplicatedMoveOptimisticTest.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeReplicatedMoveOptimisticTest.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -15,4 +15,10 @@
{
optimistic = true;
}
+
+ @Override
+ public void testReplicatability()
+ {
+ super.testReplicatability(); //To change body of overridden methods use File | Settings | File Templates.
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LFUAlgorithmTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LFUAlgorithmTest.java 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LFUAlgorithmTest.java 2008-04-18 16:26:54 UTC (rev 5597)
@@ -125,7 +125,7 @@
// }
// }
//
- // algo.invoke(region);
+ // algo.invokeRemote(region);
//// LFUQueue queue = (LFUQueue) algo.evictionQueue;
//// Iterator it = queue.iterate();
//
Modified: core/trunk/src/test/resources/log4j.xml
===================================================================
--- core/trunk/src/test/resources/log4j.xml 2008-04-18 15:12:16 UTC (rev 5596)
+++ core/trunk/src/test/resources/log4j.xml 2008-04-18 16:26:54 UTC (rev 5597)
@@ -22,7 +22,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
- <param name="File" value="../jbosscache.log"/>
+ <param name="File" value="jbosscache.log"/>
<param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
@@ -31,7 +31,7 @@
<!-- Rollover at the top of each hour
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-->
- <param name="Threshold" value="DEBUG"/>
+ <param name="Threshold" value="TRACE"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -63,7 +63,7 @@
<!-- ================ -->
<category name="org.jboss.cache">
- <priority value="WARN"/>
+ <priority value="TRACE"/>
</category>
<category name="org.jboss.tm">
@@ -79,7 +79,7 @@
<!-- ======================= -->
<root>
- <!-- <appender-ref ref="CONSOLE"/> -->
+ <!--<appender-ref ref="CONSOLE"/>-->
<appender-ref ref="FILE"/>
</root>
16 years, 2 months
JBoss Cache SVN: r5596 - core/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-18 11:12:16 -0400 (Fri, 18 Apr 2008)
New Revision: 5596
Modified:
core/trunk/pom.xml
Log:
Removed unnecessary dependencies
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-18 14:24:38 UTC (rev 5595)
+++ core/trunk/pom.xml 2008-04-18 15:12:16 UTC (rev 5596)
@@ -190,21 +190,6 @@
<version>1.1.0-SNAPSHOT</version>
<type>jdocbook-style</type>
</dependency>
- <dependency>
- <groupId>com.uwyn</groupId>
- <artifactId>jhighlight</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>de.java2html</groupId>
- <artifactId>java2html</artifactId>
- <version>5.0</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>highlight</artifactId>
- <version>3.1.4.GA</version>
- </dependency>
</dependencies>
<executions>
16 years, 2 months
JBoss Cache SVN: r5595 - core/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-18 10:24:38 -0400 (Fri, 18 Apr 2008)
New Revision: 5595
Modified:
core/trunk/pom.xml
Log:
Updated docbook stylesheet paths as per changes in jboss.org stuff
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-18 14:22:27 UTC (rev 5594)
+++ core/trunk/pom.xml 2008-04-18 14:24:38 UTC (rev 5595)
@@ -90,13 +90,13 @@
<artifactId>http</artifactId>
<version>1.0</version>
<scope>test</scope>
- </dependency>
- <dependency>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
<scope>test</scope>
- </dependency>
+ </dependency>
<!-- test dependencies -->
<dependency>
@@ -229,17 +229,17 @@
<formats>
<format>
<formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-pdf.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
<finalName>userguide_en.pdf</finalName>
</format>
<format>
<formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
<format>
<formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/nochunk-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -270,17 +270,17 @@
<formats>
<format>
<formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-pdf.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
<finalName>tutorial_en.pdf</finalName>
</format>
<format>
<formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
<format>
<formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/nochunk-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -311,17 +311,17 @@
<formats>
<format>
<formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-pdf.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
<finalName>faq_en.pdf</finalName>
</format>
<format>
<formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
<format>
<formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/nochunk-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -391,5 +391,5 @@
</dependencies>
</profile>
</profiles>
-
+
</project>
16 years, 2 months
JBoss Cache SVN: r5594 - in core/branches/2.1.X: src/test/resources and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-18 10:22:27 -0400 (Fri, 18 Apr 2008)
New Revision: 5594
Modified:
core/branches/2.1.X/pom.xml
core/branches/2.1.X/src/test/resources/log4j.xml
Log:
Modified: core/branches/2.1.X/pom.xml
===================================================================
--- core/branches/2.1.X/pom.xml 2008-04-18 14:21:15 UTC (rev 5593)
+++ core/branches/2.1.X/pom.xml 2008-04-18 14:22:27 UTC (rev 5594)
@@ -217,17 +217,17 @@
<formats>
<format>
<formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-pdf.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
<finalName>userguide_en.pdf</finalName>
</format>
<format>
<formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
<format>
<formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/nochunk-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -258,17 +258,17 @@
<formats>
<format>
<formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-pdf.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
<finalName>tutorial_en.pdf</finalName>
</format>
<format>
<formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
<format>
<formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/nochunk-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
@@ -299,17 +299,17 @@
<formats>
<format>
<formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-pdf.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
<finalName>faq_en.pdf</finalName>
</format>
<format>
<formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/main-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
<format>
<formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/nochunk-html.xsl</stylesheetResource>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
Modified: core/branches/2.1.X/src/test/resources/log4j.xml
===================================================================
--- core/branches/2.1.X/src/test/resources/log4j.xml 2008-04-18 14:21:15 UTC (rev 5593)
+++ core/branches/2.1.X/src/test/resources/log4j.xml 2008-04-18 14:22:27 UTC (rev 5594)
@@ -63,7 +63,7 @@
<!-- ================ -->
<category name="org.jboss.cache">
- <priority value="WARN"/>
+ <priority value="TRACE"/>
</category>
<category name="org.jboss.cache.factories">
@@ -83,8 +83,8 @@
<!-- ======================= -->
<root>
- <!--<appender-ref ref="CONSOLE"/>-->
- <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ <!--<appender-ref ref="FILE"/>-->
</root>
</log4j:configuration>
16 years, 2 months
JBoss Cache SVN: r5593 - core/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-18 10:21:15 -0400 (Fri, 18 Apr 2008)
New Revision: 5593
Removed:
core/tags/2.1.1.GA/
Log:
Not a GA yet
16 years, 2 months