JBoss Cache SVN: r4740 - in core/branches/1.4.X: tests/functional/org/jboss/cache/lock and 2 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-11-08 10:40:14 -0500 (Thu, 08 Nov 2007)
New Revision: 4740
Added:
core/branches/1.4.X/tests/functional/org/jboss/cache/lock/pessimistic/
core/branches/1.4.X/tests/functional/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java
Modified:
core/branches/1.4.X/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/branches/1.4.X/tests/functional/org/jboss/cache/misc/TestingUtil.java
Log:
JBCACHE-1165 - added test and fixed. No more endless loop and concurrent put/remove issues with Pessimistic Locking.
Modified: core/branches/1.4.X/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/branches/1.4.X/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2007-11-08 15:20:59 UTC (rev 4739)
+++ core/branches/1.4.X/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2007-11-08 15:40:14 UTC (rev 4740)
@@ -118,6 +118,7 @@
fqn = (Fqn) args[1];
lock_type = DataNode.LOCK_TYPE_WRITE;
recursive = true; // remove node and *all* child nodes
+ createIfNotExists = true;
// JBCACHE-871 We need to store the node
storeLockedNode = true;
break;
@@ -308,6 +309,19 @@
// Try to acquire the lock; recording that we did if successful
acquireNodeLock(child_node, owner, gtx, currentLockType, lock_timeout);
+ // make sure the lock we acquired isn't on a deleted node/is an orphan!!
+ DataNode repeek = cache.peek(child_node.getFqn());
+ if (repeek != null && child_node != repeek)
+ {
+ log.trace("Was waiting for and obtained a lock on a node that doesn't exist anymore! Attempting lock acquisition again.");
+ // we have an orphan!! Lose the unnecessary lock and re-acquire the lock (and potentially recreate the node).
+ child_node.getLock().release(owner);
+
+ // do the loop again, but don't assign child_node to n so that child_node is processed again.
+ i--;
+ continue;
+ }
+
if (recursive && isTargetNode(i, treeNodeSize))
{
{
Added: core/branches/1.4.X/tests/functional/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java
===================================================================
--- core/branches/1.4.X/tests/functional/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java (rev 0)
+++ core/branches/1.4.X/tests/functional/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java 2007-11-08 15:40:14 UTC (rev 4740)
@@ -0,0 +1,104 @@
+package org.jboss.cache.lock.pessimistic;
+
+import junit.framework.TestCase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.DummyTransactionManagerLookup;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.TreeCache;
+import org.jboss.cache.lock.IsolationLevel;
+import org.jboss.cache.misc.TestingUtil;
+
+import javax.transaction.TransactionManager;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class ConcurrentPutRemoveTest extends TestCase
+{
+ private TransactionManager tm;
+
+ private TreeCache cache;
+
+ private final Log log = LogFactory.getLog(ConcurrentPutRemoveTest.class);
+ private List threads;
+
+
+ public void setUp() throws Exception
+ {
+ cache = new TreeCache();
+ cache.setIsolationLevel(IsolationLevel.READ_COMMITTED);
+ cache.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ cache.setLockAcquisitionTimeout(1000);
+ cache.start();
+ tm = cache.getTransactionManager();
+ threads = new ArrayList();
+ }
+
+ public void tearDown() throws Exception
+ {
+ TestingUtil.killCaches(new TreeCache[]{cache});
+ }
+
+ public void testLock() throws Exception
+ {
+ for (int x = 0; x < 2; x++)
+ {
+ SeparateThread t = new SeparateThread(x);
+ threads.add(t);
+ t.start();
+ }
+ for (Iterator i = threads.iterator(); i.hasNext();)
+ {
+ SeparateThread separateThread = (SeparateThread) i.next();
+ separateThread.join();
+ if (separateThread.getException() != null)
+ {
+ throw separateThread.getException();
+ }
+ }
+ }
+
+ private class SeparateThread extends Thread
+ {
+ Exception e = null;
+
+ private int num = 0;
+
+ public SeparateThread(int num)
+ {
+ this.num = num;
+ }
+
+ public Exception getException()
+ {
+ return e;
+ }
+
+ public void run()
+ {
+ Thread.currentThread().setName("Thread:" + num);
+ try
+ {
+ for (int x = 0; x < 100; x++)
+ {
+ tm.begin();
+ log.warn("Before Remove (" + x + ")");
+ //inside transaction
+ cache.remove(Fqn.fromString("/a"));
+ log.warn("After Remove (" + x + ")");
+ tm.commit();
+ //outside transaction
+ log.warn("Before Put (" + x + ")");
+ cache.put(Fqn.fromString("/a/b/c/d"), "text" + x, "b");
+ log.warn("After Put (" + x + ")");
+ }
+ }
+ catch (Exception e)
+ {
+ this.e = e;
+ }
+ }
+ }
+
+}
Modified: core/branches/1.4.X/tests/functional/org/jboss/cache/misc/TestingUtil.java
===================================================================
--- core/branches/1.4.X/tests/functional/org/jboss/cache/misc/TestingUtil.java 2007-11-08 15:20:59 UTC (rev 4739)
+++ core/branches/1.4.X/tests/functional/org/jboss/cache/misc/TestingUtil.java 2007-11-08 15:40:14 UTC (rev 4740)
@@ -7,12 +7,13 @@
package org.jboss.cache.misc;
-import java.util.Vector;
-import java.io.File;
-
+import org.jboss.cache.Fqn;
import org.jboss.cache.TreeCache;
import org.jboss.cache.TreeCacheMBean;
+import java.io.File;
+import java.util.Vector;
+
/**
* Utilities for unit testing JBossCache.
*
@@ -23,6 +24,48 @@
{
/**
+ * Kills a cache - stops it, clears any data in any cache loaders, and rolls back any associated txs
+ */
+ public static void killCaches(TreeCache[] caches)
+ {
+ if (caches == null) return;
+
+ for (int i = 0; i<caches.length; i++)
+ {
+ TreeCache c = caches[i];
+ if (c != null)
+ {
+ if (c.getTransactionManager() != null)
+ {
+ try
+ {
+ c.getTransactionManager().rollback();
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+
+ if (c.getCacheLoader() != null)
+ {
+ try
+ {
+ c.getCacheLoader().remove(Fqn.ROOT);
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+
+ c.stop();
+ c.destroy();
+ }
+ }
+ }
+
+ /**
* Loops, continually calling {@link #areCacheViewsComplete(TreeCache[])}
* until it either returns true or <code>timeout</code> ms have elapsed.
*
17 years, 1 month
JBoss Cache SVN: r4739 - core/trunk/src/test/java/org/jboss/cache/lock/pessimistic.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2007-11-08 10:20:59 -0500 (Thu, 08 Nov 2007)
New Revision: 4739
Removed:
core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/LockUpgradeTest.java
Log:
JBCACHE-1166 - normal deadlock scenario, so removing test. see JIRA for more details
Deleted: core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/LockUpgradeTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/LockUpgradeTest.java 2007-11-08 03:55:05 UTC (rev 4738)
+++ core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/LockUpgradeTest.java 2007-11-08 15:20:59 UTC (rev 4739)
@@ -1,93 +0,0 @@
-package org.jboss.cache.lock.pessimistic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.transaction.TransactionManager;
-
-import junit.framework.TestCase;
-
-import org.jboss.cache.CacheImpl;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.config.Configuration.CacheMode;
-import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.transaction.DummyTransactionManager;
-import org.jboss.cache.transaction.DummyTransactionManagerLookup;
-import org.testng.annotations.Test;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.AfterMethod;
-
-/**
- * Test behaviour of concurent put/remove
- *
- * @author jhalat
- */
-@Test(groups = {"functional"}, enabled = false) // Known failure - see JBCACHE-1166
-public class LockUpgradeTest{
-
- private TransactionManager tm;
-
- private CacheImpl cache;
-
- @BeforeMethod(alwaysRun = true)
- protected void setUp() throws Exception {
- Configuration c = new Configuration();
- c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
- cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(c);
- tm = cache.getConfiguration().getRuntimeConfig().getTransactionManager();
- }
-
- @AfterMethod(alwaysRun = true)
- protected void tearDown() throws Exception {
- cache.stop();
- cache.destroy();
- }
-
- public void testLock() throws Exception {
- List<WorkThread> threads = new ArrayList<WorkThread>();
- for (int x = 0; x < 2; x++) {
- WorkThread t = new WorkThread(x == 1);
- threads.add(t);
- t.start();
- }
- for (WorkThread separateThread : threads) {
- separateThread.join();
- if (separateThread.getException() != null) {
- throw separateThread.getException();
- }
- }
- }
-
- private class WorkThread extends Thread {
- Exception e = null;
-
- private boolean remove;
-
- public WorkThread(boolean remove) {
- this.remove = remove;
- }
-
- public Exception getException() {
- return e;
- }
-
- public void run() {
- try {
- for (int x = 0; x < 1000; x++) {
- tm.begin();
- if (remove) {
- cache.remove("/a/b/c/d");
- cache.remove("/a");
- } else {
- cache.put("/a/b/c/d", "key","text" + x);
- }
- tm.commit();
- Thread.sleep(1);
- }
- } catch (Exception e) {
- this.e = e;
- }
- }
- }
-}
17 years, 1 month
JBoss Cache SVN: r4738 - support/trunk/common.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-11-07 22:55:05 -0500 (Wed, 07 Nov 2007)
New Revision: 4738
Modified:
support/trunk/common/pom.xml
Log:
Increased heap size for tests
Modified: support/trunk/common/pom.xml
===================================================================
--- support/trunk/common/pom.xml 2007-11-08 03:43:39 UTC (rev 4737)
+++ support/trunk/common/pom.xml 2007-11-08 03:55:05 UTC (rev 4738)
@@ -154,6 +154,8 @@
</systemProperties>
<groups>functional</groups>
<forkMode>always</forkMode>
+ <!-- increasing JVM heap size -->
+ <argLine>-Xmx1024M</argLine>
<!-- Warning, this does not work right on 2.4-SNAPSHOT, (see SUREFIRE-349) -->
<!-- This seems to fail in some cases on 2.3 as well, disable for now -->
17 years, 1 month
JBoss Cache SVN: r4737 - in core/trunk/src: test/java/org/jboss/cache/marshall and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-11-07 22:43:39 -0500 (Wed, 07 Nov 2007)
New Revision: 4737
Modified:
core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java
core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java
core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java
core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java
Log:
JBCACHE-1211 - somewhat better fix, using variable length ints and longs
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java 2007-11-08 02:00:52 UTC (rev 4736)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java 2007-11-08 03:43:39 UTC (rev 4737)
@@ -302,7 +302,7 @@
else if (o instanceof DefaultDataVersion)
{
out.writeByte(MAGICNUMBER_DEFAULT_DATA_VERSION);
- out.writeLong(((DefaultDataVersion) o).getRawVersion());
+ marshallDefaultDataVersion((DefaultDataVersion) o, out);
}
else if (o.getClass().equals(ArrayList.class))
{
@@ -466,7 +466,7 @@
private void marshallCollection(Collection c, ObjectOutputStream out, Map refMap) throws Exception
{
- out.writeInt(c.size());
+ writeUnsignedInt(out, c.size());
for (Object o : c)
{
marshallObject(o, out, refMap);
@@ -476,7 +476,7 @@
private void marshallMap(Map map, ObjectOutputStream out, Map<Object, Integer> refMap) throws Exception
{
int mapSize = map.size();
- out.writeInt(mapSize);
+ writeUnsignedInt(out, mapSize);
if (mapSize == 0) return;
for (Map.Entry me : (Set<Map.Entry>) map.entrySet())
@@ -548,7 +548,7 @@
retVal = unmarshallIpAddress(in);
return retVal;
case MAGICNUMBER_DEFAULT_DATA_VERSION:
- retVal = new DefaultDataVersion(in.readLong());
+ retVal = unmarshallDefaultDataVersion(in);
return retVal;
case MAGICNUMBER_ARRAY_LIST:
return unmarshallArrayList(in, refMap);
@@ -680,7 +680,7 @@
private List unmarshallArrayList(ObjectInputStream in, Map refMap) throws Exception
{
- int listSize = in.readInt();
+ int listSize = readUnsignedInt(in);
List list = new ArrayList(listSize);
populateFromStream(in, refMap, list, listSize);
return list;
@@ -689,7 +689,7 @@
private List unmarshallLinkedList(ObjectInputStream in, Map refMap) throws Exception
{
List list = new LinkedList();
- populateFromStream(in, refMap, list, in.readInt());
+ populateFromStream(in, refMap, list, readUnsignedInt(in));
return list;
}
@@ -704,8 +704,7 @@
{
// read in as a HashMap first
Map m = unmarshallHashMap(in, refMap);
- MapCopy mc = new MapCopy(m);
- return mc;
+ return new MapCopy(m);
}
private Map unmarshallTreeMap(ObjectInputStream in, Map refMap) throws Exception
@@ -731,7 +730,7 @@
private void populateFromStream(ObjectInputStream in, Map refMap, Map mapToPopulate) throws Exception
{
- int size = in.readInt();
+ int size = readUnsignedInt(in);
for (int i = 0; i < size; i++)
{
mapToPopulate.put(unmarshallObject(in, refMap), unmarshallObject(in, refMap));
@@ -740,7 +739,7 @@
private void populateFromStream(ObjectInputStream in, Map refMap, Set setToPopulate) throws Exception
{
- int size = in.readInt();
+ int size = readUnsignedInt(in);
for (int i = 0; i < size; i++)
{
setToPopulate.add(unmarshallObject(in, refMap));
@@ -755,6 +754,16 @@
}
}
+ protected void marshallDefaultDataVersion(DefaultDataVersion ddv, ObjectOutputStream out) throws Exception
+ {
+ writeUnsignedLong(out, ddv.getRawVersion());
+ }
+
+ protected DefaultDataVersion unmarshallDefaultDataVersion(ObjectInputStream in) throws Exception
+ {
+ return new DefaultDataVersion(readUnsignedLong(in));
+ }
+
/**
* Reads a reference from a given stream.
* @param in the stream to read from
@@ -776,4 +785,24 @@
{
out.writeShort(reference);
}
+
+ protected int readUnsignedInt(ObjectInputStream in) throws IOException
+ {
+ return in.readInt();
+ }
+
+ protected void writeUnsignedInt(ObjectOutputStream out, int i) throws IOException
+ {
+ out.writeInt(i);
+ }
+
+ protected long readUnsignedLong(ObjectInputStream in) throws IOException
+ {
+ return in.readLong();
+ }
+
+ protected void writeUnsignedLong(ObjectOutputStream out, long i) throws IOException
+ {
+ out.writeLong(i);
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java 2007-11-08 02:00:52 UTC (rev 4736)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java 2007-11-08 03:43:39 UTC (rev 4737)
@@ -8,8 +8,12 @@
/**
* An evolution of {@link org.jboss.cache.marshall.CacheMarshaller200}, created to fix <a href="http://jira.jboss.org/jira/browse/JBCACHE-1211">JBCACHE-1211</a>.
+ * <p/>
+ * To prevent ints taking too much space, they are written as variable-length ints. Details <a href="http://lucene.apache.org/java/docs/fileformats.html#VInt">here</a> on VInts.
*
* @author Manik Surtani
+ * @see <a href="http://lucene.apache.org/java/docs/fileformats.html#VInt">VInt</a>
+ * @see <a href="http://lucene.apache.org/java/docs/fileformats.html#VLong">VLong</a>
* @since 2.1.0
*/
public class CacheMarshaller210 extends CacheMarshaller200
@@ -21,7 +25,8 @@
/**
* This version of writeReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
- * @param out stream to write to
+ *
+ * @param out stream to write to
* @param reference reference to write
* @throws IOException propagated from OOS
* @see <a href="http://jira.jboss.org/jira/browse/JBCACHE-1211">JBCACHE-1211</a>
@@ -29,11 +34,12 @@
@Override
protected void writeReference(ObjectOutputStream out, int reference) throws IOException
{
- out.writeInt(reference);
+ writeUnsignedInt(out, reference);
}
/**
* This version of readReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
+ *
* @param in stream to read from
* @return reference
* @throws IOException propagated from OUS
@@ -42,6 +48,78 @@
@Override
protected int readReference(ObjectInputStream in) throws IOException
{
- return in.readInt();
+ return readUnsignedInt(in);
}
+
+ /**
+ * Reads an int stored in variable-length format. Reads between one and
+ * five bytes. Smaller values take fewer bytes. Negative numbers are not
+ * supported.
+ */
+ @Override
+ protected int readUnsignedInt(ObjectInputStream in) throws IOException
+ {
+ byte b = in.readByte();
+ int i = b & 0x7F;
+ for (int shift = 7; (b & 0x80) != 0; shift += 7)
+ {
+ b = in.readByte();
+ i |= (b & 0x7FL) << shift;
+ }
+ return i;
+ }
+
+ /**
+ * Writes an int in a variable-length format. Writes between one and
+ * five bytes. Smaller values take fewer bytes. Negative numbers are not
+ * supported.
+ *
+ * @param i int to write
+ */
+ @Override
+ protected void writeUnsignedInt(ObjectOutputStream out, int i) throws IOException
+ {
+ while ((i & ~0x7F) != 0)
+ {
+ out.writeByte((byte) ((i & 0x7f) | 0x80));
+ i >>>= 7;
+ }
+ out.writeByte((byte) i);
+ }
+
+ /**
+ * Reads an int stored in variable-length format. Reads between one and
+ * nine bytes. Smaller values take fewer bytes. Negative numbers are not
+ * supported.
+ */
+ @Override
+ protected long readUnsignedLong(ObjectInputStream in) throws IOException
+ {
+ byte b = in.readByte();
+ long i = b & 0x7F;
+ for (int shift = 7; (b & 0x80) != 0; shift += 7)
+ {
+ b = in.readByte();
+ i |= (b & 0x7FL) << shift;
+ }
+ return i;
+ }
+
+ /**
+ * Writes an int in a variable-length format. Writes between one and
+ * nine bytes. Smaller values take fewer bytes. Negative numbers are not
+ * supported.
+ *
+ * @param i int to write
+ */
+ @Override
+ protected void writeUnsignedLong(ObjectOutputStream out, long i) throws IOException
+ {
+ while ((i & ~0x7F) != 0)
+ {
+ out.writeByte((byte) ((i & 0x7f) | 0x80));
+ i >>>= 7;
+ }
+ out.writeByte((byte) i);
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java 2007-11-08 02:00:52 UTC (rev 4736)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java 2007-11-08 03:43:39 UTC (rev 4737)
@@ -191,7 +191,7 @@
switch (versionId)
{
case VERSION_200:
- marshaller = marshallers.get(VERSION_210);
+ marshaller = marshallers.get(VERSION_200);
if (marshaller == null)
{
marshaller = new CacheMarshaller200(manager, defaultInactive, useRegionBasedMarshalling);
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java 2007-11-08 02:00:52 UTC (rev 4736)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java 2007-11-08 03:43:39 UTC (rev 4737)
@@ -3,6 +3,11 @@
import org.jboss.cache.Fqn;
import org.testng.annotations.Test;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.Map;
@@ -40,4 +45,62 @@
{
doMapTest(500000);
}
+
+ public void testVInts() throws IOException
+ {
+
+ CacheMarshaller210 cm210 = (CacheMarshaller210) marshaller.defaultMarshaller;
+ CacheMarshaller200 cm200 = (CacheMarshaller200) marshaller.getMarshaller(20);
+ int[] ints = {2, 100, 500, 12000, 20000, 500000, 2000000, Integer.MAX_VALUE};
+
+ for (int i : ints)
+ {
+ System.out.println("CM200: Number of bytes (i="+i+") : " + getAndTestSize(cm200, i));
+ System.out.println("CM210: Number of bytes (i="+i+") : " + getAndTestSize(cm210, i));
+ }
+ }
+
+ public void testVLongs() throws IOException
+ {
+
+ CacheMarshaller210 cm210 = (CacheMarshaller210) marshaller.defaultMarshaller;
+ CacheMarshaller200 cm200 = (CacheMarshaller200) marshaller.getMarshaller(20);
+ long[] ints = {2, 100, 500, 12000, 20000, 500000, 2000000, Integer.MAX_VALUE, (long) Integer.MAX_VALUE + 500000L, Long.MAX_VALUE};
+
+ for (long i : ints)
+ {
+ System.out.println("CM200: Number of bytes (i="+i+") : " + getAndTestSize(cm200, i));
+ System.out.println("CM210: Number of bytes (i="+i+") : " + getAndTestSize(cm210, i));
+ }
+ }
+
+ private int getAndTestSize(CacheMarshaller200 m, int i) throws IOException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ m.writeUnsignedInt(oos, i);
+ oos.flush();
+ oos.close();
+ baos.flush();
+ baos.close();
+ byte[] bytes = baos.toByteArray();
+ int byteL = bytes.length;
+ assert i == m.readUnsignedInt(new ObjectInputStream(new ByteArrayInputStream(bytes)));
+ return byteL;
+ }
+
+ private int getAndTestSize(CacheMarshaller200 m, long i) throws IOException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ m.writeUnsignedLong(oos, i);
+ oos.flush();
+ oos.close();
+ baos.flush();
+ baos.close();
+ byte[] bytes = baos.toByteArray();
+ int byteL = bytes.length;
+ assert i == m.readUnsignedLong(new ObjectInputStream(new ByteArrayInputStream(bytes)));
+ return byteL;
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java 2007-11-08 02:00:52 UTC (rev 4736)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java 2007-11-08 03:43:39 UTC (rev 4737)
@@ -92,7 +92,7 @@
assertEquals(expectedMarshallerClass, marshaller.getMarshaller(1).getClass());
assertEquals(expectedMarshallerClass, marshaller.getMarshaller(-1).getClass());
assertEquals(expectedMarshallerClass, marshaller.getMarshaller(0).getClass());
- assertEquals(expectedMarshallerClass, marshaller.getMarshaller(20).getClass());
+ assertEquals(CacheMarshaller200.class, marshaller.getMarshaller(20).getClass());
assertEquals("One marshaller should be in the map by this stage", 1, marshaller.marshallers.size());
}
17 years, 1 month
JBoss Cache SVN: r4736 - in core/trunk/src: test/java/org/jboss/cache/marshall and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-11-07 21:00:52 -0500 (Wed, 07 Nov 2007)
New Revision: 4736
Added:
core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java
core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java
Modified:
core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java
core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller200Test.java
core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java
core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
Log:
JBCACHE-1211 - preliminary fix.
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java 2007-11-08 01:59:17 UTC (rev 4735)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java 2007-11-08 02:00:52 UTC (rev 4736)
@@ -24,16 +24,7 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
+import java.util.*;
/**
* An enhanced marshaller for RPC calls between CacheImpl instances.
@@ -274,7 +265,7 @@
else if (refMap.containsKey(o))// see if this object has been marshalled before.
{
out.writeByte(MAGICNUMBER_REF);
- out.writeShort(refMap.get(o));
+ writeReference(out, refMap.get(o));
}
else if (o instanceof MethodCall)
{
@@ -293,16 +284,14 @@
}
else if (o instanceof Fqn)
{
- int refId = createReference(o, refMap);
out.writeByte(MAGICNUMBER_FQN);
- out.writeShort(refId);
+ writeReference(out, createReference(o, refMap));
marshallFqn((Fqn) o, out, refMap);
}
else if (o instanceof GlobalTransaction)
{
- int refId = createReference(o, refMap);
out.writeByte(MAGICNUMBER_GTX);
- out.writeShort(refId);
+ writeReference(out, createReference(o, refMap));
marshallGlobalTransaction((GlobalTransaction) o, out, refMap);
}
else if (o instanceof IpAddress)
@@ -372,9 +361,8 @@
}
else if (o instanceof String)
{
- int refId = createReference(o, refMap);
out.writeByte(MAGICNUMBER_STRING);
- out.writeShort(refId);
+ writeReference(out, createReference(o, refMap));
marshallString((String) o, out);
}
else if (o instanceof NodeDataMarker)
@@ -399,13 +387,12 @@
}
else if (o instanceof Serializable)
{
- int refId = createReference(o, refMap);
if (log.isTraceEnabled())
{
log.trace("Warning: using object serialization for " + o.getClass());
}
out.writeByte(MAGICNUMBER_SERIALIZABLE);
- out.writeShort(refId);
+ writeReference(out, createReference(o, refMap));
out.writeObject(o);
}
else
@@ -533,14 +520,14 @@
case MAGICNUMBER_NULL:
return null;
case MAGICNUMBER_REF:
- reference = (int) in.readShort();
+ reference = readReference(in);
if (!refMap.containsKey(reference))
{
throw new IOException("Unable to locate object reference " + reference + " in byte stream!");
}
return refMap.get(reference);
case MAGICNUMBER_SERIALIZABLE:
- reference = (int) in.readShort();
+ reference = readReference(in);
retVal = in.readObject();
refMap.put(reference, retVal);
return retVal;
@@ -548,12 +535,12 @@
retVal = unmarshallMethodCall(in, refMap);
return retVal;
case MAGICNUMBER_FQN:
- reference = (int) in.readShort();
+ reference = readReference(in);
retVal = unmarshallFqn(in, refMap);
refMap.put(reference, retVal);
return retVal;
case MAGICNUMBER_GTX:
- reference = (int) in.readShort();
+ reference = readReference(in);
retVal = unmarshallGlobalTransaction(in, refMap);
refMap.put(reference, retVal);
return retVal;
@@ -586,7 +573,7 @@
case MAGICNUMBER_SHORT:
return in.readShort();
case MAGICNUMBER_STRING:
- reference = (int) in.readShort();
+ reference = readReference(in);
retVal = unmarshallString(in);
refMap.put(reference, retVal);
return retVal;
@@ -767,4 +754,26 @@
listToPopulate.add(unmarshallObject(in, refMap));
}
}
+
+ /**
+ * Reads a reference from a given stream.
+ * @param in the stream to read from
+ * @return an int representing a reference in RefMap.
+ * @throws IOException propagated from the OIS
+ */
+ protected int readReference(ObjectInputStream in) throws IOException
+ {
+ return in.readShort();
+ }
+
+ /**
+ * Writes a reference to a given object output stream.
+ * @param out the stream to write to
+ * @param reference the reference to write
+ * @throws java.io.IOException propagated from the OOS
+ */
+ protected void writeReference(ObjectOutputStream out, int reference) throws IOException
+ {
+ out.writeShort(reference);
+ }
}
Added: core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java (rev 0)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller210.java 2007-11-08 02:00:52 UTC (rev 4736)
@@ -0,0 +1,47 @@
+package org.jboss.cache.marshall;
+
+import org.jboss.cache.RegionManager;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+/**
+ * An evolution of {@link org.jboss.cache.marshall.CacheMarshaller200}, created to fix <a href="http://jira.jboss.org/jira/browse/JBCACHE-1211">JBCACHE-1211</a>.
+ *
+ * @author Manik Surtani
+ * @since 2.1.0
+ */
+public class CacheMarshaller210 extends CacheMarshaller200
+{
+ public CacheMarshaller210(RegionManager manager, boolean defaultInactive, boolean useRegionBasedMarshalling)
+ {
+ super(manager, defaultInactive, useRegionBasedMarshalling);
+ }
+
+ /**
+ * This version of writeReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
+ * @param out stream to write to
+ * @param reference reference to write
+ * @throws IOException propagated from OOS
+ * @see <a href="http://jira.jboss.org/jira/browse/JBCACHE-1211">JBCACHE-1211</a>
+ */
+ @Override
+ protected void writeReference(ObjectOutputStream out, int reference) throws IOException
+ {
+ out.writeInt(reference);
+ }
+
+ /**
+ * This version of readReference is written to solve JBCACHE-1211, where references are encoded as ints rather than shorts.
+ * @param in stream to read from
+ * @return reference
+ * @throws IOException propagated from OUS
+ * @see <a href="http://jira.jboss.org/jira/browse/JBCACHE-1211">JBCACHE-1211</a>
+ */
+ @Override
+ protected int readReference(ObjectInputStream in) throws IOException
+ {
+ return in.readInt();
+ }
+}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java 2007-11-08 01:59:17 UTC (rev 4735)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/VersionAwareMarshaller.java 2007-11-08 02:00:52 UTC (rev 4736)
@@ -34,10 +34,11 @@
private static final Log log = LogFactory.getLog(VersionAwareMarshaller.class);
private static final int VERSION_200 = 20;
+ private static final int VERSION_210 = 21;
private RegionManager manager;
private boolean defaultInactive, useRegionBasedMarshalling;
- AbstractMarshaller defaultMarshaller;
+ Marshaller defaultMarshaller;
Map<Integer, Marshaller> marshallers = new HashMap<Integer, Marshaller>();
private int versionInt;
@@ -52,14 +53,8 @@
versionInt = toMinorVersionInt(version);
- switch (versionInt)
- {
- case VERSION_200:
- default:
- defaultMarshaller = new CacheMarshaller200(manager, defaultInactive, useRegionBasedMarshalling);
- marshallers.put(VERSION_200, defaultMarshaller);
- break;
- }
+ // this will cause the correct marshaller to be created and put in the map of marshallers
+ defaultMarshaller = getMarshaller(versionInt);
if (log.isDebugEnabled())
{
@@ -192,17 +187,28 @@
Marshaller getMarshaller(int versionId)
{
Marshaller marshaller;
+ boolean knownVersion = false;
switch (versionId)
{
case VERSION_200:
- default:
- marshaller = marshallers.get(VERSION_200);
+ marshaller = marshallers.get(VERSION_210);
if (marshaller == null)
{
marshaller = new CacheMarshaller200(manager, defaultInactive, useRegionBasedMarshalling);
- marshallers.put(VERSION_200, marshaller);
+ marshallers.put(VERSION_210, marshaller);
}
break;
+ case VERSION_210:
+ knownVersion = true;
+ default:
+ if (!knownVersion) log.warn("Unknown replication version String. Falling back to the default marshaller, which is Version 2.1.0.");
+ marshaller = marshallers.get(VERSION_210);
+ if (marshaller == null)
+ {
+ marshaller = new CacheMarshaller210(manager, defaultInactive, useRegionBasedMarshalling);
+ marshallers.put(VERSION_210, marshaller);
+ }
+ break;
}
return marshaller;
}
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller200Test.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller200Test.java 2007-11-08 01:59:17 UTC (rev 4735)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller200Test.java 2007-11-08 02:00:52 UTC (rev 4736)
@@ -9,7 +9,6 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
-import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.Test;
import java.io.ByteArrayInputStream;
@@ -33,18 +32,6 @@
expectedMarshallerClass = CacheMarshaller200.class;
}
- public void testHandle140Stream() throws Exception
- {
- VersionAwareMarshaller marshallerOld = new VersionAwareMarshaller(new RegionManager(), false, false, "1.4.0.GA");
-
- // create a '140' stream.
-
- byte[] buf = marshallerOld.objectToByteBuffer("hello");
- Object unmarshalled = marshaller.objectFromByteBuffer(buf);
-
- assertEquals("hello", unmarshalled);
- }
-
public void testRegionalisedStream() throws Exception
{
// need to test what's going on with
Added: core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java (rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshaller210Test.java 2007-11-08 02:00:52 UTC (rev 4736)
@@ -0,0 +1,43 @@
+package org.jboss.cache.marshall;
+
+import org.jboss.cache.Fqn;
+import org.testng.annotations.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Test (groups = {"functional"})
+public class CacheMarshaller210Test extends CacheMarshaller200Test
+{
+ public CacheMarshaller210Test()
+ {
+ currentVersion = "2.1.0.GA";
+ currentVersionShort = 21;
+ expectedMarshallerClass = CacheMarshaller210.class;
+ }
+
+ protected void doMapTest(int size) throws Exception
+ {
+ Map map = createMap(size);
+ Fqn fqn = Fqn.fromString("/my/stuff");
+ String key = "key";
+ MethodCall putMethod = MethodCallFactory.create(MethodDeclarations.putKeyValMethodLocal, fqn, key, map);
+ MethodCall replicateMethod = MethodCallFactory.create(MethodDeclarations.replicateMethod, putMethod);
+
+ byte[] buf = marshaller.objectToByteBuffer(replicateMethod);
+
+ assertMethodCallsEquals(replicateMethod, (MethodCall) marshaller.objectFromByteBuffer(buf));
+ }
+
+ protected Map createMap(int size)
+ {
+ Map map = new HashMap(size);
+ for (int i=0; i<size; i++) map.put("key-" + i, "value-" + i);
+ return map;
+ }
+
+ public void testLargeNumberOfObjectReferences() throws Exception
+ {
+ doMapTest(500000);
+ }
+}
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java 2007-11-08 01:59:17 UTC (rev 4735)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java 2007-11-08 02:00:52 UTC (rev 4736)
@@ -6,18 +6,17 @@
*/
package org.jboss.cache.marshall;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNull;
-import static org.testng.AssertJUnit.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
import org.jboss.cache.Fqn;
import org.jboss.cache.RegionManager;
+import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import java.util.ArrayList;
+import java.util.List;
+
+@Test(groups = {"functional"})
public abstract class CacheMarshallerTestBase
{
protected String currentVersion;
@@ -89,10 +88,11 @@
assertEquals("Only one marshaller should be in the map by this stage", 1, marshaller.marshallers.size());
assertEquals(expectedMarshallerClass, marshaller.getMarshaller(currentVersionShort).getClass());
- assertEquals(CacheMarshaller200.class, marshaller.getMarshaller(15).getClass());
- assertEquals(CacheMarshaller200.class, marshaller.getMarshaller(1).getClass());
- assertEquals(CacheMarshaller200.class, marshaller.getMarshaller(-1).getClass());
- assertEquals(CacheMarshaller200.class, marshaller.getMarshaller(0).getClass());
+ assertEquals(expectedMarshallerClass, marshaller.getMarshaller(15).getClass());
+ assertEquals(expectedMarshallerClass, marshaller.getMarshaller(1).getClass());
+ assertEquals(expectedMarshallerClass, marshaller.getMarshaller(-1).getClass());
+ assertEquals(expectedMarshallerClass, marshaller.getMarshaller(0).getClass());
+ assertEquals(expectedMarshallerClass, marshaller.getMarshaller(20).getClass());
assertEquals("One marshaller should be in the map by this stage", 1, marshaller.marshallers.size());
}
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2007-11-08 01:59:17 UTC (rev 4735)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2007-11-08 02:00:52 UTC (rev 4736)
@@ -6,13 +6,12 @@
*/
package org.jboss.cache.marshall;
+import org.jboss.cache.RegionManager;
+import org.jboss.cache.Version;
import static org.testng.AssertJUnit.assertEquals;
+import org.testng.annotations.Test;
import java.io.ObjectInputStream;
-
-import org.jboss.cache.RegionManager;
-import org.jboss.cache.Version;
-import org.testng.annotations.Test;
/**
* Tests the enhanced treecache marshaller
*
@@ -23,29 +22,32 @@
{
public void testMarshallerSelection()
{
- VersionAwareMarshaller marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "2.0.0.GA");
+ VersionAwareMarshaller marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "2.1.0.GA");
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
+
+ marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "2.0.0.GA");
assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "1.4.0.GA");
- assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "1.5.0.GA");
- assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "1.3.0.GA");
- assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "1.3.0.SP2");
- assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "1.3.1.GA");
- assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "1.2.4.SP2");
- assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "1.2.3");
- assertEquals(CacheMarshaller200.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
}
public void testVersionHeaderDefaultCurrent() throws Exception
17 years, 1 month
JBoss Cache SVN: r4735 - core/trunk/src/main/java/org/jboss/cache/factories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-11-07 20:59:17 -0500 (Wed, 07 Nov 2007)
New Revision: 4735
Modified:
core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java
Log:
JBCACHE-1210 - log warning for unrecognised configuration options.
Modified: core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java 2007-11-06 21:10:52 UTC (rev 4734)
+++ core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java 2007-11-08 01:59:17 UTC (rev 4735)
@@ -250,8 +250,8 @@
}
catch (NoSuchMethodException me)
{
- // this is ok
- //log.debug("Unable to find String setter for " + setter);
+ // this is ok, but certainly log this as a warning
+ if (log.isWarnEnabled()) log.warn("Unrecognised attribute " + propName + ". Please check your configuration. Ignoring!!");
}
catch (Exception e)
{
17 years, 1 month
JBoss Cache SVN: r4734 - pojo/tags/2.1.0.CR1/src/main/docbook/tutorial/en.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-11-06 16:10:52 -0500 (Tue, 06 Nov 2007)
New Revision: 4734
Modified:
pojo/tags/2.1.0.CR1/src/main/docbook/tutorial/en/master.xml
Log:
MFB
Modified: pojo/tags/2.1.0.CR1/src/main/docbook/tutorial/en/master.xml
===================================================================
--- pojo/tags/2.1.0.CR1/src/main/docbook/tutorial/en/master.xml 2007-11-06 21:09:58 UTC (rev 4733)
+++ pojo/tags/2.1.0.CR1/src/main/docbook/tutorial/en/master.xml 2007-11-06 21:10:52 UTC (rev 4734)
@@ -103,12 +103,7 @@
<para>The only script needed for this tutorial is the
<literal>PojoCache/build.xml</literal>
- ant script and the accompanying
- driver scripts (
- <literal>build.sh</literal>
- for Unix and
- <literal>build.bat</literal>
- for Windows).
+ ant script.
</para>
</section>
@@ -167,12 +162,12 @@
<para>
The demo is run by calling the ant script (via the driver) with the
- <literal>run.demo.pojocache</literal>
+ <literal>run.demo</literal>
target. E.g.,
</para>
<para>
- <literal>./build.sh run.demo.pojocache</literal>
+ <literal>ant run.demo</literal>
</para>
<para>
This will cause a GUI window to appear, giving you a tree view of the cache in the top pane and a BeanShell
@@ -395,4 +390,4 @@
</para>
</section>
-</article>
\ No newline at end of file
+</article>
17 years, 1 month
JBoss Cache SVN: r4733 - pojo/branches/2.1/src/main/docbook/tutorial/en.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-11-06 16:09:58 -0500 (Tue, 06 Nov 2007)
New Revision: 4733
Modified:
pojo/branches/2.1/src/main/docbook/tutorial/en/master.xml
Log:
MFH
Modified: pojo/branches/2.1/src/main/docbook/tutorial/en/master.xml
===================================================================
--- pojo/branches/2.1/src/main/docbook/tutorial/en/master.xml 2007-11-06 21:09:13 UTC (rev 4732)
+++ pojo/branches/2.1/src/main/docbook/tutorial/en/master.xml 2007-11-06 21:09:58 UTC (rev 4733)
@@ -103,12 +103,7 @@
<para>The only script needed for this tutorial is the
<literal>PojoCache/build.xml</literal>
- ant script and the accompanying
- driver scripts (
- <literal>build.sh</literal>
- for Unix and
- <literal>build.bat</literal>
- for Windows).
+ ant script.
</para>
</section>
@@ -167,12 +162,12 @@
<para>
The demo is run by calling the ant script (via the driver) with the
- <literal>run.demo.pojocache</literal>
+ <literal>run.demo</literal>
target. E.g.,
</para>
<para>
- <literal>./build.sh run.demo.pojocache</literal>
+ <literal>ant run.demo</literal>
</para>
<para>
This will cause a GUI window to appear, giving you a tree view of the cache in the top pane and a BeanShell
@@ -395,4 +390,4 @@
</para>
</section>
-</article>
\ No newline at end of file
+</article>
17 years, 1 month
JBoss Cache SVN: r4732 - pojo/trunk/src/main/docbook/tutorial/en.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-11-06 16:09:13 -0500 (Tue, 06 Nov 2007)
New Revision: 4732
Modified:
pojo/trunk/src/main/docbook/tutorial/en/master.xml
Log:
Fix docs
Modified: pojo/trunk/src/main/docbook/tutorial/en/master.xml
===================================================================
--- pojo/trunk/src/main/docbook/tutorial/en/master.xml 2007-11-06 16:37:03 UTC (rev 4731)
+++ pojo/trunk/src/main/docbook/tutorial/en/master.xml 2007-11-06 21:09:13 UTC (rev 4732)
@@ -103,12 +103,7 @@
<para>The only script needed for this tutorial is the
<literal>PojoCache/build.xml</literal>
- ant script and the accompanying
- driver scripts (
- <literal>build.sh</literal>
- for Unix and
- <literal>build.bat</literal>
- for Windows).
+ ant script.
</para>
</section>
@@ -167,12 +162,12 @@
<para>
The demo is run by calling the ant script (via the driver) with the
- <literal>run.demo.pojocache</literal>
+ <literal>run.demo</literal>
target. E.g.,
</para>
<para>
- <literal>./build.sh run.demo.pojocache</literal>
+ <literal>ant run.demo</literal>
</para>
<para>
This will cause a GUI window to appear, giving you a tree view of the cache in the top pane and a BeanShell
@@ -395,4 +390,4 @@
</para>
</section>
-</article>
\ No newline at end of file
+</article>
17 years, 1 month