JBoss Cache SVN: r4649 - in core/trunk/src: main/java/org/jboss/cache/optimistic and 3 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-19 12:31:51 -0400 (Fri, 19 Oct 2007)
New Revision: 4649
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.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/pfer/PFEROptimisticInvalidationAsyncTest.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticInvalidationSyncTest.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplAsyncTest.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationAsyncTest.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplAsyncTest.java
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplSyncTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/ParentVersionTest.java
Log:
Updated Test annotation on a lot of tests, as well as fixed some subtle bugs introduced with JBCACHE-1121
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -154,6 +154,22 @@
if (debug) log.debug("Attempting to get child " + childName);
NodeSPI currentNode = workspaceNode.getNode().getChildDirect(childName);
+ if (currentNode == null)
+ {
+ // first test that it exists in the workspace and has been created in thix tx!
+ WorkspaceNode peekInWorkspace = workspace.getNode(new Fqn(workspaceNode.getFqn(), childName));
+ if (peekInWorkspace != null && peekInWorkspace.isCreated())
+ {
+ // exists in workspace and has just been created.
+ currentNode = peekInWorkspace.getNode();
+ if (peekInWorkspace.isDeleted())
+ {
+ peekInWorkspace.markAsDeleted(false);
+ // add in parent again
+ workspaceNode.addChild(peekInWorkspace);
+ }
+ }
+ }
if (currentNode == null)
{
Modified: core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -146,7 +146,14 @@
{
initialiseChildMap();
}
- return new HashSet<Object>(optimisticChildNodeMap.keySet());
+
+ Set<Object> names = new HashSet<Object>(optimisticChildNodeMap.keySet());
+
+ // process deltas
+ for (Fqn child : childrenAdded) names.add(child.getLastElement());
+ for (Fqn child : childrenRemoved) names.remove(child.getLastElement());
+
+ return names;
}
@SuppressWarnings("unchecked")
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeAPIOptimisticTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeAPIOptimisticTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeAPIOptimisticTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -1,8 +1,11 @@
package org.jboss.cache.api;
+import org.testng.annotations.Test;
+
/**
* An optimistic version of {@link org.jboss.cache.api.NodeAPITest}
*/
+@Test(groups={"functional"})
public class NodeAPIOptimisticTest extends NodeAPITest
{
public NodeAPIOptimisticTest()
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -1,27 +1,24 @@
package org.jboss.cache.api;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
-import static org.testng.AssertJUnit.assertNull;
-import static org.testng.AssertJUnit.assertTrue;
-import static org.testng.AssertJUnit.fail;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.transaction.TransactionManager;
-
import org.jboss.cache.CacheImpl;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.optimistic.TransactionWorkspace;
+import org.jboss.cache.transaction.OptimisticTransactionEntry;
+import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import javax.transaction.TransactionManager;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
/**
* Tests {@link org.jboss.cache.Node}-centric operations
*
@@ -58,6 +55,17 @@
{
if (cache != null)
{
+ if (cache.getTransactionManager() != null)
+ {
+ try
+ {
+ cache.getTransactionManager().rollback();
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
cache.stop();
}
if (rootNode != null)
@@ -193,19 +201,49 @@
public void testGetChildrenUnderTx() throws Exception
{
+ Fqn<String> A_B = new Fqn<String>(A, B);
+ Fqn<String> A_C = new Fqn<String>(A, C);
tm.begin();
- cache.put(new Fqn<String>(A, B), "1", "1");
- cache.put(new Fqn<String>(A, C), "2", "2");
+ cache.put(A_B, "1", "1");
+ cache.put(A_C, "2", "2");
if (!optimistic)
{
assertEquals(3, cache.getNumberOfNodes());
assertEquals(4, cache.getNumberOfLocksHeld());
}
+ else
+ {
+ TransactionWorkspace<Object, Object> w = getTransactionWorkspace();
+ assert w.getNodes().size() == 4 : "Should be 4 nodes in the workspace.";
+ // test deltas
+ List<Set<Fqn>> deltas = w.getNodes().get(Fqn.ROOT).getMergedChildren();
+ assert deltas.get(0).size() == 1 : "/ should have 1 child added";
+ assert deltas.get(1).size() == 0 : "/ should have 0 children removed";
+
+ deltas = w.getNodes().get(A).getMergedChildren();
+ assert deltas.get(0).size() == 2 : "/ should have 2 children added";
+ assert deltas.get(1).size() == 0 : "/ should have 0 children removed";
+
+ deltas = w.getNodes().get(A_B).getMergedChildren();
+ assert deltas.get(0).size() == 0 : "/a/b should have 0 children added";
+ assert deltas.get(1).size() == 0 : "/a/b should have 0 children removed";
+
+ deltas = w.getNodes().get(A_C).getMergedChildren();
+ assert deltas.get(0).size() == 0 : "/a/c should have 0 children added";
+ assert deltas.get(1).size() == 0 : "/a/c should have 0 children removed";
+ }
+
assertEquals("Number of child", 2, cache.getRoot().getChild(A).getChildren().size());
tm.commit();
}
+ @SuppressWarnings("unchecked")
+ private TransactionWorkspace<Object, Object> getTransactionWorkspace() throws Exception
+ {
+ return ((OptimisticTransactionEntry) cache.getTransactionTable().get(cache.getTransactionTable().get(tm.getTransaction()))).getTransactionWorkSpace();
+ }
+
public void testGetChildAPI()
{
// creates a Node<Object, Object> with fqn /a/b/c
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticInvalidationAsyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticInvalidationAsyncTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticInvalidationAsyncTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -7,6 +7,7 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
/**
* Test putForExternalRead with optimistic locking and INVALIDATION_ASYNC.
@@ -14,6 +15,7 @@
* @author Brian Stansberry
* @version $Revision$
*/
+@Test (groups = {"functional"})
public class PFEROptimisticInvalidationAsyncTest extends PutForExternalReadTestBase
{
public PFEROptimisticInvalidationAsyncTest()
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticInvalidationSyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticInvalidationSyncTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticInvalidationSyncTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -7,6 +7,7 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
/**
* Test putForExternalRead with optimistic locking and INVALIDATION_SYNC.
@@ -14,6 +15,7 @@
* @author Brian Stansberry
* @version $Revision$
*/
+@Test(groups = {"functional"})
public class PFEROptimisticInvalidationSyncTest extends PutForExternalReadTestBase
{
public PFEROptimisticInvalidationSyncTest()
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplAsyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplAsyncTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplAsyncTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -1,7 +1,9 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
+@Test(groups = {"functional"})
public class PFEROptimisticReplAsyncTest extends PutForExternalReadTestBase
{
public PFEROptimisticReplAsyncTest()
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -1,7 +1,9 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
+@Test(groups = {"functional"})
public class PFEROptimisticReplSyncTest extends PutForExternalReadTestBase
{
public PFEROptimisticReplSyncTest()
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationAsyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationAsyncTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationAsyncTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -7,6 +7,7 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
/**
* Test putForExternalRead with pessimistic locking and INVALIDATION_SYNC.
@@ -14,6 +15,7 @@
* @author Brian Stansberry
* @version $Revision$
*/
+@Test(groups = {"functional"})
public class PFERPessimisticInvalidationAsyncTest extends PutForExternalReadTestBase
{
public PFERPessimisticInvalidationAsyncTest()
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplAsyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplAsyncTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplAsyncTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -1,7 +1,9 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
+@Test(groups = {"functional"})
public class PFERPessimisticReplAsyncTest extends PutForExternalReadTestBase
{
public PFERPessimisticReplAsyncTest()
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplSyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplSyncTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticReplSyncTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -1,7 +1,9 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
+import org.testng.annotations.Test;
+@Test(groups = {"functional"})
public class PFERPessimisticReplSyncTest extends PutForExternalReadTestBase
{
public PFERPessimisticReplSyncTest()
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -276,9 +276,9 @@
WorkspaceNode oneAfter = workspace.getNode(Fqn.fromString("/one"));
WorkspaceNode twoAfter = workspace.getNode(Fqn.fromString("/one/two"));
- assertNotSame(one, oneAfter);
+ assertSame(one, oneAfter);
assertEquals(false, oneAfter.isDeleted());
- assertNotSame(two, twoAfter);
+ assertSame(two, twoAfter);
assertEquals(false, twoAfter.isDeleted());
assertEquals(null, dummy.getCalled());
@@ -292,7 +292,7 @@
assertEquals(3, entry.getModifications().size());
assertEquals(null, dummy.getCalled());
- assertEquals(4, listener.getNodesAdded());
+ assertEquals(2, listener.getNodesAdded());
}
@@ -336,7 +336,7 @@
WorkspaceNode oneAfter = workspace.getNode(Fqn.fromString("/one"));
WorkspaceNode twoAfter = workspace.getNode(Fqn.fromString("/one/two"));
- assertNotSame(one, oneAfter);
+ assertSame(one, oneAfter);
assertEquals(false, oneAfter.isDeleted());
assertEquals(two, twoAfter);
assertEquals(true, twoAfter.isDeleted());
@@ -353,7 +353,7 @@
assertEquals(3, entry.getModifications().size());
assertTrue(!cache.exists("/one/two"));
assertEquals(null, dummy.getCalled());
- assertEquals(3, listener.getNodesAdded());
+ assertEquals(2, listener.getNodesAdded());
}
public void testTransactionRemoveSubNodeMethod() throws Exception
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/ParentVersionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/ParentVersionTest.java 2007-10-19 02:25:56 UTC (rev 4648)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/ParentVersionTest.java 2007-10-19 16:31:51 UTC (rev 4649)
@@ -1,24 +1,23 @@
package org.jboss.cache.optimistic;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
-import static org.testng.AssertJUnit.assertTrue;
-
-import javax.transaction.TransactionManager;
-
import org.jboss.cache.Cache;
import org.jboss.cache.CacheImpl;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.VersionedNode;
+import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import javax.transaction.TransactionManager;
+
/**
* @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
* @since 2.0.0
*/
+@Test (groups={"functional"})
public class ParentVersionTest extends AbstractOptimisticTestCase
{
private Cache<Object, Object> cache;
17 years, 3 months
JBoss Cache SVN: r4648 - pojo/tags/2.1.0.BETA1/src/main/release.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-10-18 22:25:56 -0400 (Thu, 18 Oct 2007)
New Revision: 4648
Added:
pojo/tags/2.1.0.BETA1/src/main/release/build.xml
Log:
Merge missing distro build
Copied: pojo/tags/2.1.0.BETA1/src/main/release/build.xml (from rev 4647, pojo/trunk/src/main/release/build.xml)
===================================================================
--- pojo/tags/2.1.0.BETA1/src/main/release/build.xml (rev 0)
+++ pojo/tags/2.1.0.BETA1/src/main/release/build.xml 2007-10-19 02:25:56 UTC (rev 4648)
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+
+<project name="POJO Cache Distribution" default="help">
+
+ <property name="build.sysclasspath" value="ignore"/>
+ <!-- 10 mins -->
+ <property name="single.test.timeout" value="600000"/>
+ <!-- 2h -->
+ <property name="all.test.timeout" value="7200000"/>
+
+ <property name="source" value="${basedir}/test"/>
+ <property name="output" value="${basedir}/output"/>
+ <property name="build" value="${output}/classes"/>
+ <property name="lib" value="${basedir}/lib"/>
+ <property name="etc" value="${basedir}/etc"/>
+ <property name="reports" value="${output}/reports"/>
+
+ <!-- JVM args for when running tests -->
+ <property name="jvm.ipv4" value="-Djava.net.preferIPv4Stack=true"/>
+ <property name="jvm.localhost" value="-Dbind.address=127.0.0.1"/>
+
+ <!-- Test if JDK5 is available -->
+ <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+
+ <taskdef name="testng" classpath="lib/test/testng.jar" classname="org.testng.TestNGAntTask"/>
+
+ <!-- set local properties for this build -->
+ <path id="lib.classpath">
+ <fileset dir="${lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="cache.classpath">
+ <fileset dir="${basedir}">
+ <include name="jbosscache-core.jar"/>
+ </fileset>
+ </path>
+
+ <path id="build.classpath">
+ <pathelement path="${build}"/>
+ </path>
+
+ <path id="test.classpath">
+ <path refid="build.classpath"/>
+ <path refid="cache.classpath"/>
+ <path refid="lib.classpath"/>
+ <pathelement path="${etc}"/>
+ <!-- this needs to be in the test classpath as well since it contains test configuration XML files -->
+ <pathelement path="${source}"/>
+ </path>
+
+ <target name="help" description="help page">
+ <echo><![CDATA[
+build.sh <command> where command is:
+ compile -- compile the test code
+ clean -- clean up the whole directory
+ run.tests -- run batch examples
+ one.test -- run one single test case. Need -Dtest=org/jboss/cache/??Test
+ run.demo -- run demo GUI
+
+ ]]></echo>
+ </target>
+
+ <target name="chkJdk" unless="HAVE_JDK_1.5">
+ <echo>
+ **** FATAL
+ **** REQUIRES JDK 1.5.0 or greater.
+ **** Compilation won't proceed!
+ </echo>
+ </target>
+
+ <!-- set up directory -->
+ <target name="init" depends="chkJdk" description="Prepare to build.">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <!-- Create the build directory structure used by compile
+and copy the deployment descriptors into it-->
+ <mkdir dir="${build}"/>
+ <mkdir dir="${reports}"/>
+ </target>
+
+ <target name="clean" description="Clean up compiled classes">
+ <delete dir="${output}"/>
+ </target>
+
+ <target name="compile" depends="init" description="Build unit test classes" if="HAVE_JDK_1.5">
+ <javac srcdir="${source}"
+ destdir="${build}"
+ includes="org/jboss/**"
+ target="1.5"
+ source="1.5"
+ debug="true"
+ deprecation="false">
+ <classpath>
+ <path refid="lib.classpath"/>
+ <path refid="cache.classpath"/>
+ </classpath>
+ </javac>
+
+ <copy todir="${output}/etc">
+ <fileset dir="${etc}">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+ <!-- eg. ant run.examples -Dtest=org/jboss/test/cache/api/CacheAPITest -->
+ <target name="one.test" depends="compile" description="run one TestNG test case.">
+ <testng
+ outputDir="${reports}"
+ haltOnFailure="true"
+ timeOut="${single.test.timeout}"
+ verbose="2">
+ <classpath refid="test.classpath"/>
+ <classfileset dir="${build}" includes="${test}.class"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </testng>
+ </target>
+
+ <target name="run.tests" depends="compile" description="run TestNG test cases.">
+ <testng
+ outputDir="${reports}"
+ haltOnFailure="true"
+ timeOut="${all.test.timeout}"
+ verbose="2">
+ <classpath>
+ <path refid="test.classpath"/>
+ </classpath>
+ <classfileset dir="${build}" includes="**/*Test.class"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </testng>
+ </target>
+
+ <target name="run.demo" depends="compile" description="Run JBoss Cache demo.">
+ <java classname="org.jboss.cache.pojo.demo.PojoCacheView" fork="yes">
+ <jvmarg value="-Xmx128M"/>
+ <classpath refid="test.classpath"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </java>
+ </target>
+
+</project>
17 years, 3 months
JBoss Cache SVN: r4647 - pojo/trunk/src/main/release.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-10-18 22:23:39 -0400 (Thu, 18 Oct 2007)
New Revision: 4647
Added:
pojo/trunk/src/main/release/build.xml
Log:
Add build.xml for distro
Added: pojo/trunk/src/main/release/build.xml
===================================================================
--- pojo/trunk/src/main/release/build.xml (rev 0)
+++ pojo/trunk/src/main/release/build.xml 2007-10-19 02:23:39 UTC (rev 4647)
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+
+<project name="POJO Cache Distribution" default="help">
+
+ <property name="build.sysclasspath" value="ignore"/>
+ <!-- 10 mins -->
+ <property name="single.test.timeout" value="600000"/>
+ <!-- 2h -->
+ <property name="all.test.timeout" value="7200000"/>
+
+ <property name="source" value="${basedir}/test"/>
+ <property name="output" value="${basedir}/output"/>
+ <property name="build" value="${output}/classes"/>
+ <property name="lib" value="${basedir}/lib"/>
+ <property name="etc" value="${basedir}/etc"/>
+ <property name="reports" value="${output}/reports"/>
+
+ <!-- JVM args for when running tests -->
+ <property name="jvm.ipv4" value="-Djava.net.preferIPv4Stack=true"/>
+ <property name="jvm.localhost" value="-Dbind.address=127.0.0.1"/>
+
+ <!-- Test if JDK5 is available -->
+ <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+
+ <taskdef name="testng" classpath="lib/test/testng.jar" classname="org.testng.TestNGAntTask"/>
+
+ <!-- set local properties for this build -->
+ <path id="lib.classpath">
+ <fileset dir="${lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="cache.classpath">
+ <fileset dir="${basedir}">
+ <include name="jbosscache-core.jar"/>
+ </fileset>
+ </path>
+
+ <path id="build.classpath">
+ <pathelement path="${build}"/>
+ </path>
+
+ <path id="test.classpath">
+ <path refid="build.classpath"/>
+ <path refid="cache.classpath"/>
+ <path refid="lib.classpath"/>
+ <pathelement path="${etc}"/>
+ <!-- this needs to be in the test classpath as well since it contains test configuration XML files -->
+ <pathelement path="${source}"/>
+ </path>
+
+ <target name="help" description="help page">
+ <echo><![CDATA[
+build.sh <command> where command is:
+ compile -- compile the test code
+ clean -- clean up the whole directory
+ run.tests -- run batch examples
+ one.test -- run one single test case. Need -Dtest=org/jboss/cache/??Test
+ run.demo -- run demo GUI
+
+ ]]></echo>
+ </target>
+
+ <target name="chkJdk" unless="HAVE_JDK_1.5">
+ <echo>
+ **** FATAL
+ **** REQUIRES JDK 1.5.0 or greater.
+ **** Compilation won't proceed!
+ </echo>
+ </target>
+
+ <!-- set up directory -->
+ <target name="init" depends="chkJdk" description="Prepare to build.">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <!-- Create the build directory structure used by compile
+and copy the deployment descriptors into it-->
+ <mkdir dir="${build}"/>
+ <mkdir dir="${reports}"/>
+ </target>
+
+ <target name="clean" description="Clean up compiled classes">
+ <delete dir="${output}"/>
+ </target>
+
+ <target name="compile" depends="init" description="Build unit test classes" if="HAVE_JDK_1.5">
+ <javac srcdir="${source}"
+ destdir="${build}"
+ includes="org/jboss/**"
+ target="1.5"
+ source="1.5"
+ debug="true"
+ deprecation="false">
+ <classpath>
+ <path refid="lib.classpath"/>
+ <path refid="cache.classpath"/>
+ </classpath>
+ </javac>
+
+ <copy todir="${output}/etc">
+ <fileset dir="${etc}">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+ <!-- eg. ant run.examples -Dtest=org/jboss/test/cache/api/CacheAPITest -->
+ <target name="one.test" depends="compile" description="run one TestNG test case.">
+ <testng
+ outputDir="${reports}"
+ haltOnFailure="true"
+ timeOut="${single.test.timeout}"
+ verbose="2">
+ <classpath refid="test.classpath"/>
+ <classfileset dir="${build}" includes="${test}.class"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </testng>
+ </target>
+
+ <target name="run.tests" depends="compile" description="run TestNG test cases.">
+ <testng
+ outputDir="${reports}"
+ haltOnFailure="true"
+ timeOut="${all.test.timeout}"
+ verbose="2">
+ <classpath>
+ <path refid="test.classpath"/>
+ </classpath>
+ <classfileset dir="${build}" includes="**/*Test.class"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </testng>
+ </target>
+
+ <target name="run.demo" depends="compile" description="Run JBoss Cache demo.">
+ <java classname="org.jboss.cache.pojo.demo.PojoCacheView" fork="yes">
+ <jvmarg value="-Xmx128M"/>
+ <classpath refid="test.classpath"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </java>
+ </target>
+
+</project>
Property changes on: pojo/trunk/src/main/release/build.xml
___________________________________________________________________
Name: svn:executable
+ *
17 years, 3 months
JBoss Cache SVN: r4646 - in core/trunk/src: main/java/org/jboss/cache/interceptors and 2 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2007-10-18 21:22:34 -0400 (Thu, 18 Oct 2007)
New Revision: 4646
Added:
core/trunk/src/test/java/org/jboss/cache/api/StructuralNodesTest.java
Modified:
core/trunk/src/main/java/org/jboss/cache/AbstractNode.java
core/trunk/src/main/java/org/jboss/cache/Node.java
core/trunk/src/main/java/org/jboss/cache/NodeSPI.java
core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
Log:
JBCACHE-1153 - structural nodes
Modified: core/trunk/src/main/java/org/jboss/cache/AbstractNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/AbstractNode.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/AbstractNode.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -16,6 +16,7 @@
protected Map<Object, Node<K, V>> children;
protected Fqn fqn;
protected boolean resident;
+ protected boolean structural;
public boolean isDeleted()
{
@@ -54,6 +55,10 @@
}
+ public boolean isStructural()
+ {
+ return structural;
+ }
public boolean equals(Object another)
{
Modified: core/trunk/src/main/java/org/jboss/cache/Node.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/Node.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/Node.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -292,6 +292,17 @@
*/
void setResident(boolean resident);
+ /**
+ * Structural nodes are the nodes created to support other nodes that hold data. E.g. the operation
+ * cache.put("/a/b/c","key","value") the nodes "/a" and "/a/b" are created only for supporting the existence of
+ * "/a/b/c" which holds data -"/a" and "/a/b" are structural nodes.
+ * A node is no longer considered structural when it's attribut map is changed, i.e. attributes are added.
+ * Structural nodes are not considered for viction, i.e. they are marked as resident. When a node moves to
+ * non-structural state it will automatically be marked as non-resident. Structural nodes might be marked as
+ * non-resident and considered for eviction. This property is internally computed (as described bellow) and is not replicated.
+ */
+ boolean isStructural();
+
/**
* Tests whether this node is configured to be exclusively locked when inserting or removing children.
* <p />
Modified: core/trunk/src/main/java/org/jboss/cache/NodeSPI.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/NodeSPI.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/NodeSPI.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -437,4 +437,11 @@
* @return true if the node has one or more child nodes; false otherwise.
*/
boolean hasChildrenDirect();
+
+ /**
+ * It is internally decided (i.e. wthin the cache, one cannot specify it from the outside)
+ * whether a node is structural or not - so this method fits better here than in Node interface.
+ * @see org.jboss.cache.Node#isStructural()
+ */
+ void setStructural(boolean structural);
}
Modified: core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -754,4 +754,10 @@
{
this.lockForChildInsertRemove = lockForChildInsertRemove;
}
+
+ public void setStructural(boolean structural)
+ {
+ this.setResident(structural);
+ this.structural = structural;
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -181,6 +181,7 @@
if (isTargetFqn && !workspace.isVersioningImplicit()) versionToPassIn = version;
NodeSPI newUnderlyingChildNode = workspaceNode.createChild(childName, workspaceNode.getNode(), cache, versionToPassIn);
+ newUnderlyingChildNode.setStructural(true);
// now assign "workspaceNode" to the new child created.
workspaceNode = nodeFactory.createWorkspaceNode(newUnderlyingChildNode, workspace);
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -211,6 +211,7 @@
Map mergedData = workspaceNode.getMergedData();
underlyingNode.clearDataDirect();
underlyingNode.putAllDirect(mergedData);
+ underlyingNode.setStructural(workspaceNode.isStructural());
updateVersion = true;
}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -78,6 +78,7 @@
case MethodDeclarations.putKeyValMethodLocal_id:
log.trace("Creating nodes if necessary");
createNodes((Fqn) args[1], ctx.getGlobalTransaction());
+ markNodeNonStructural(ctx);
break;
}
@@ -194,6 +195,14 @@
log.trace("bypassed locking as method " + m.getName() + "() doesn't require locking");
}
}
+ //this should be executed before calling eviction code/super.invoke()
+ //else, all nodes would be seen as resident by the eviction interceptor
+ if (m.getMethodId() == MethodDeclarations.putDataMethodLocal_id ||
+ m.getMethodId() == MethodDeclarations.putDataEraseMethodLocal_id ||
+ m.getMethodId() == MethodDeclarations.putKeyValMethodLocal_id)
+ {
+ this.markNodeNonStructural(ctx);
+ }
if (m.getMethodId() == MethodDeclarations.lockMethodLocal_id)
{
return null;
@@ -227,6 +236,19 @@
return o;
}
+ private void markNodeNonStructural(InvocationContext ctx)
+ {
+ MethodCall m = ctx.getMethodCall();
+ Object[] args = m.getArgs();
+ Fqn fqn = (Fqn) args[1];
+ NodeSPI nodeSpi = cache.getRoot().getChildDirect(fqn);
+ if (nodeSpi == null)
+ {
+ throw new IllegalStateException("Could not add attribute to a NULL node!");
+ }
+ nodeSpi.setStructural(false);
+ }
+
private long getLockAcquisitionTimeout(InvocationContext ctx)
{
long timeout = lock_acquisition_timeout;
@@ -307,6 +329,7 @@
if (child_node == null && createIfNotExists)
{
child_node = n.addChildDirect(new Fqn(child_name));
+ child_node.setStructural(true);
created = true;
}
@@ -467,7 +490,11 @@
Fqn childFqn = new Fqn(child_name);
NodeSPI child_node = n.getChildDirect(childFqn);
- if (child_node == null) child_node = n.addChildDirect(childFqn);
+ if (child_node == null)
+ {
+ child_node = n.addChildDirect(childFqn);
+ child_node.setStructural(true);
+ }
// test if this node needs to be 'undeleted'
// reverse the "remove" if the node has been previously removed in the same tx, if this operation is a put()
if (gtx != null && needToReverseRemove(child_node, tx_table.get(gtx), NodeLock.LockType.WRITE, false, true))
Modified: core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-10-18 20:53:27 UTC (rev 4645)
+++ core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -103,6 +103,7 @@
public void putAll(Map<K, V> data)
{
realPut(data, false);
+ this.structural = false;
modified = true;
}
@@ -110,11 +111,13 @@
{
clearData();
putAll(data);
+ this.structural = false;
}
public V put(K key, V value)
{
modified = true;
+ this.structural = false;
return optimisticDataMap.put(key, value);
}
Added: core/trunk/src/test/java/org/jboss/cache/api/StructuralNodesTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/StructuralNodesTest.java (rev 0)
+++ core/trunk/src/test/java/org/jboss/cache/api/StructuralNodesTest.java 2007-10-19 01:22:34 UTC (rev 4646)
@@ -0,0 +1,143 @@
+package org.jboss.cache.api;
+
+import org.jboss.cache.CacheImpl;
+import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.config.Configuration;
+import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import org.testng.annotations.Test;
+import org.testng.annotations.AfterMethod;
+
+import javax.transaction.TransactionManager;
+import javax.transaction.SystemException;
+import javax.transaction.NotSupportedException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Testser class for strctural nodes functionality.
+ *
+ * @author <a href="mailto:mircea.markus@jboss.com">Mircea Markus</a>
+ * @since 2.1.0
+ */
+@Test(groups = {"functional"})
+public class StructuralNodesTest
+{
+ private CacheImpl<Object, Object> cache;
+
+
+ @AfterMethod(alwaysRun = true)
+ public void closeCache()
+ {
+ cache.remove("/");
+ cache.stop();
+ }
+
+ /**
+ * Tests that when creaitng a node its parents are marked by default as structural, and are by default resident.
+ * When modifying the attribute map, the node is not structural anymore and also is not resident.
+ */
+ public void testHappyFlowPessimistic()
+ {
+ Configuration cacheConfig = UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.LOCAL, false);
+ cache = (CacheImpl<Object, Object>) DefaultCacheFactory.getInstance().createCache(cacheConfig, true);
+ cache.put("/a/b/c/d/e","k","v");
+
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a")).isResident());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a/b")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a/b")).isResident());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a/b/c")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("a/b/c")).isResident());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("a/b/c/d")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("a/b/c/d")).isResident());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("a/b/c/d/e")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("a/b/c/d/e")).isResident());
+
+ //now add some attributes to some nodes - this should make them both non-structural and non-resident
+ Map data = new HashMap();
+ cache.put("/a", data);
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a")).isResident());
+ }
+
+
+ /**
+ * There is a bunch of method calls that will make the structural nodes not structural.
+ * This tests that for all those method calls the 'structural' flag is set to false.
+ */
+ public void testMakeNonStructural()
+ {
+ Configuration cacheConfig = UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.LOCAL, false);
+ cache = (CacheImpl<Object, Object>) DefaultCacheFactory.getInstance().createCache(cacheConfig, true);
+
+
+
+ cache.put("/put/putIfAbsent/putAll/test","k","v");
+
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/put")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent/putAll")).isStructural());
+
+ cache.getRoot().getChild(Fqn.fromString("/put")).put("k","v");
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/put")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/put")).isResident());
+
+ cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent")).putIfAbsent("k","v");
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent")).isResident());
+
+ cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent/putAll")).putAll(new HashMap<Object,Object>());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent/putAll")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/put/putIfAbsent/putAll")).isResident());
+
+ }
+
+ /**
+ * When we use optimisic locking, check that nodes made non-structural during transaction are non-structural after commiting.
+ */
+ public void testOptmisticLockingWithCommit() throws Exception
+ {
+ Configuration config = UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.LOCAL, false);
+ config.setNodeLockingOptimistic(true);
+ cache = (CacheImpl<Object, Object>) DefaultCacheFactory.getInstance().createCache(config, true);
+ cache.put("/a/b/c","k","v");
+
+ TransactionManager txManager = cache.getTransactionManager();
+ txManager.begin();
+ cache.getRoot().getChild(Fqn.fromString("/a/b")).put("key","value");
+ txManager.commit();
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a")).isResident());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a/b")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a/b")).isResident());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a/b/c")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a/b/c")).isResident());
+ }
+
+ /**
+ * When we use optimisic locking, check that nodes made non-structural during transaction are structural after rollback.
+ */
+ public void testOptmisticLockingWithRollback() throws Exception
+ {
+ Configuration config = UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.LOCAL, false);
+ config.setNodeLockingOptimistic(true);
+ cache = (CacheImpl<Object, Object>) DefaultCacheFactory.getInstance().createCache(config, true);
+ cache.put("/a/b/c","k","v");
+
+ TransactionManager txManager = cache.getTransactionManager();
+ txManager.begin();
+ cache.getRoot().getChild(Fqn.fromString("/a/b")).put("key","value");
+ txManager.rollback();
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a")).isResident());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a/b")).isStructural());
+ assertTrue(cache.getRoot().getChild(Fqn.fromString("/a/b")).isResident());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a/b/c")).isStructural());
+ assertFalse(cache.getRoot().getChild(Fqn.fromString("/a/b/c")).isResident());
+ }
+
+}
17 years, 3 months
JBoss Cache SVN: r4645 - in pojo/tags: 2.1.0.BETA1 and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-10-18 16:53:27 -0400 (Thu, 18 Oct 2007)
New Revision: 4645
Added:
pojo/tags/2.1.0.BETA1/
pojo/tags/2.1.0.BETA1/pom.xml
Removed:
pojo/tags/2.1.0.BETA1/pom.xml
Log:
Tag BETA1
Copied: pojo/tags/2.1.0.BETA1 (from rev 4640, pojo/trunk)
Deleted: pojo/tags/2.1.0.BETA1/pom.xml
===================================================================
--- pojo/trunk/pom.xml 2007-10-18 11:13:21 UTC (rev 4640)
+++ pojo/tags/2.1.0.BETA1/pom.xml 2007-10-18 20:53:27 UTC (rev 4645)
@@ -1,287 +0,0 @@
-<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <properties>
- <jbosscache-pojo-version>2.1.0-SNAPSHOT</jbosscache-pojo-version>
- <jboss.aop.version>2.0.0.beta1</jboss.aop.version>
- </properties>
- <parent>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-common-parent</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-pojo</artifactId>
- <version>${jbosscache-pojo-version}</version>
- <name>JBoss Cache - POJO Edition</name>
- <description>JBoss Cache - POJO Edition</description>
- <packaging>jar</packaging>
- <dependencies>
- <dependency>
- <groupId>org.jboss.aop</groupId>
- <artifactId>jboss-aop</artifactId>
- <version>${jboss.aop.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <!-- Hack AOP has broken deps -->
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-container</artifactId>
- <version>2.0.0.Beta4</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-1</version>
- <executions>
- <execution>
- <id>assemble</id>
- <phase>install</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>assembly/bin.xml</descriptor>
- <descriptor>assembly/doc.xml</descriptor>
- <descriptor>assembly/all.xml</descriptor>
- </descriptors>
- <finalName>${artifactId}-${jbosscache-pojo-version}</finalName>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <systemProperties>
- <property>
- <name>bind.address</name>
- <value>127.0.0.1</value>
- </property>
- <property>
- <name>java.net.preferIPv4Stack</name>
- <value>true</value>
- </property>
- <property>
- <name>jgroups.stack</name>
- <value>udp</value>
- </property>
- </systemProperties>
- <groups>functional</groups>
- <forkMode>always</forkMode>
- <argLine>-Djboss.aop.path=${basedir}/src/main/resources/META-INF/pojocache-aop.xml -javaagent:${settings.localRepository}/org/jboss/aop/jboss-aop/${jboss.aop.version}/jboss-aop-${jboss.aop.version}.jar</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 -->
- <useSystemClassLoader>true</useSystemClassLoader>
- <redirectTestOutputToFile>false</redirectTestOutputToFile>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jbossaop-plugin</artifactId>
- <version>2.0.0.beta1</version>
- <!-- HACK: AOP project and plugin has broken deps -->
- <dependencies>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-container</artifactId>
- <version>2.0.0.Beta4</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>aopc</id>
- <phase>compile</phase>
- <goals>
- <goal>compile</goal>
- </goals>
- <configuration>
- <verbose>false</verbose>
- <aoppaths>
- <aoppath>${basedir}/src/main/resources/META-INF/pojocache-aop.xml</aoppath>
- </aoppaths>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- the docbook generation plugin for the user guide -->
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.0.0</version>
- <extensions>true</extensions>
- <dependencies>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-doc-xslt-support</artifactId>
- <version>1.0</version>
- </dependency>
- </dependencies>
- <executions>
-
- <!-- The User Guide-->
- <execution>
- <id>userguide_en</id>
- <phase>package</phase>
- <goals>
- <goal>resources</goal>
- <goal>generate</goal>
- </goals>
- <configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
- <sourceDirectory>${basedir}/src/main/docbook/userguide/en</sourceDirectory>
- <imageResource>
- <directory>${basedir}/src/main/docbook/images</directory>
- </imageResource>
- <cssResource>
- <directory>${basedir}/src/main/docbook/css</directory>
- </cssResource>
- <targetDirectory>${basedir}/target/docbook/userguide_en</targetDirectory>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/standard/fopdf.xsl</stylesheetResource>
- <finalName>userguide_en.pdf</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/standard/html_chunk.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/standard/html.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>false</xincludeSupported>
- </options>
- </configuration>
- </execution>
-
- <!-- The Tutorial -->
- <execution>
- <id>tutorial_en</id>
- <phase>package</phase>
- <goals>
- <goal>resources</goal>
- <goal>generate</goal>
- </goals>
- <configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
- <sourceDirectory>${basedir}/src/main/docbook/tutorial/en</sourceDirectory>
- <imageResource>
- <directory>${basedir}/src/main/docbook/images</directory>
- </imageResource>
- <cssResource>
- <directory>${basedir}/src/main/docbook/css</directory>
- </cssResource>
- <targetDirectory>${basedir}/target/docbook/tutorial_en</targetDirectory>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/standard/fopdf.xsl</stylesheetResource>
- <finalName>tutorial_en.pdf</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/standard/html_chunk.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/standard/html.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>false</xincludeSupported>
- </options>
- </configuration>
- </execution>
-
- <!-- the FAQs -->
- <execution>
- <id>faq_en</id>
- <phase>package</phase>
- <goals>
- <goal>resources</goal>
- <goal>generate</goal>
- </goals>
- <configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
- <sourceDirectory>${basedir}/src/main/docbook/faq/en</sourceDirectory>
- <imageResource>
- <directory>${basedir}/src/main/docbook/images</directory>
- </imageResource>
- <cssResource>
- <directory>${basedir}/src/main/docbook/css</directory>
- </cssResource>
- <targetDirectory>${basedir}/target/docbook/faq_en</targetDirectory>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/standard/fopdf.xsl</stylesheetResource>
- <finalName>faq_en.pdf</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/standard/html_chunk.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/standard/html.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>false</xincludeSupported>
- </options>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <!-- basic JBoss repository so that the common parent POM in jbosscache-support can be found -->
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- </repositories>
-</project>
Copied: pojo/tags/2.1.0.BETA1/pom.xml (from rev 4641, pojo/trunk/pom.xml)
===================================================================
--- pojo/tags/2.1.0.BETA1/pom.xml (rev 0)
+++ pojo/tags/2.1.0.BETA1/pom.xml 2007-10-18 20:53:27 UTC (rev 4645)
@@ -0,0 +1,287 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <properties>
+ <jbosscache-pojo-version>2.1.0.BETA1</jbosscache-pojo-version>
+ <jboss.aop.version>2.0.0.beta1</jboss.aop.version>
+ </properties>
+ <parent>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-common-parent</artifactId>
+ <version>1.1</version>
+ </parent>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-pojo</artifactId>
+ <version>${jbosscache-pojo-version}</version>
+ <name>JBoss Cache - POJO Edition</name>
+ <description>JBoss Cache - POJO Edition</description>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.aop</groupId>
+ <artifactId>jboss-aop</artifactId>
+ <version>${jboss.aop.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>2.1.0.BETA1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>2.1.0.BETA1</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <!-- Hack AOP has broken deps -->
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-container</artifactId>
+ <version>2.0.0.Beta4</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-1</version>
+ <executions>
+ <execution>
+ <id>assemble</id>
+ <phase>install</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/bin.xml</descriptor>
+ <descriptor>assembly/doc.xml</descriptor>
+ <descriptor>assembly/all.xml</descriptor>
+ </descriptors>
+ <finalName>${artifactId}-${jbosscache-pojo-version}</finalName>
+ <outputDirectory>target/distribution</outputDirectory>
+ <workDirectory>target/assembly/work</workDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>bind.address</name>
+ <value>127.0.0.1</value>
+ </property>
+ <property>
+ <name>java.net.preferIPv4Stack</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>jgroups.stack</name>
+ <value>udp</value>
+ </property>
+ </systemProperties>
+ <groups>functional</groups>
+ <forkMode>always</forkMode>
+ <argLine>-Djboss.aop.path=${basedir}/src/main/resources/META-INF/pojocache-aop.xml -javaagent:${settings.localRepository}/org/jboss/aop/jboss-aop/${jboss.aop.version}/jboss-aop-${jboss.aop.version}.jar</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 -->
+ <useSystemClassLoader>true</useSystemClassLoader>
+ <redirectTestOutputToFile>false</redirectTestOutputToFile>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jbossaop-plugin</artifactId>
+ <version>2.0.0.beta1</version>
+ <!-- HACK: AOP project and plugin has broken deps -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-container</artifactId>
+ <version>2.0.0.Beta4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>aopc</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <verbose>false</verbose>
+ <aoppaths>
+ <aoppath>${basedir}/src/main/resources/META-INF/pojocache-aop.xml</aoppath>
+ </aoppaths>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- the docbook generation plugin for the user guide -->
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.0.0</version>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-doc-xslt-support</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ <executions>
+
+ <!-- The User Guide-->
+ <execution>
+ <id>userguide_en</id>
+ <phase>package</phase>
+ <goals>
+ <goal>resources</goal>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDirectory>${basedir}/src/main/docbook/userguide/en</sourceDirectory>
+ <imageResource>
+ <directory>${basedir}/src/main/docbook/images</directory>
+ </imageResource>
+ <cssResource>
+ <directory>${basedir}/src/main/docbook/css</directory>
+ </cssResource>
+ <targetDirectory>${basedir}/target/docbook/userguide_en</targetDirectory>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/standard/fopdf.xsl</stylesheetResource>
+ <finalName>userguide_en.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/standard/html_chunk.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/standard/html.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>false</xincludeSupported>
+ </options>
+ </configuration>
+ </execution>
+
+ <!-- The Tutorial -->
+ <execution>
+ <id>tutorial_en</id>
+ <phase>package</phase>
+ <goals>
+ <goal>resources</goal>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDirectory>${basedir}/src/main/docbook/tutorial/en</sourceDirectory>
+ <imageResource>
+ <directory>${basedir}/src/main/docbook/images</directory>
+ </imageResource>
+ <cssResource>
+ <directory>${basedir}/src/main/docbook/css</directory>
+ </cssResource>
+ <targetDirectory>${basedir}/target/docbook/tutorial_en</targetDirectory>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/standard/fopdf.xsl</stylesheetResource>
+ <finalName>tutorial_en.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/standard/html_chunk.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/standard/html.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>false</xincludeSupported>
+ </options>
+ </configuration>
+ </execution>
+
+ <!-- the FAQs -->
+ <execution>
+ <id>faq_en</id>
+ <phase>package</phase>
+ <goals>
+ <goal>resources</goal>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDirectory>${basedir}/src/main/docbook/faq/en</sourceDirectory>
+ <imageResource>
+ <directory>${basedir}/src/main/docbook/images</directory>
+ </imageResource>
+ <cssResource>
+ <directory>${basedir}/src/main/docbook/css</directory>
+ </cssResource>
+ <targetDirectory>${basedir}/target/docbook/faq_en</targetDirectory>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/standard/fopdf.xsl</stylesheetResource>
+ <finalName>faq_en.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/standard/html_chunk.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/standard/html.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>false</xincludeSupported>
+ </options>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- basic JBoss repository so that the common parent POM in jbosscache-support can be found -->
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+</project>
17 years, 3 months
JBoss Cache SVN: r4644 - core/trunk/src/test/java/org/jboss/cache/api/pfer.
by jbosscache-commits@lists.jboss.org
Author: bstansberry(a)jboss.com
Date: 2007-10-18 15:05:53 -0400 (Thu, 18 Oct 2007)
New Revision: 4644
Modified:
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java
Log:
Get rid of blah
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java 2007-10-18 19:00:08 UTC (rev 4643)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFEROptimisticReplSyncTest.java 2007-10-18 19:05:53 UTC (rev 4644)
@@ -1,7 +1,6 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
-import org.testng.annotations.Test;
public class PFEROptimisticReplSyncTest extends PutForExternalReadTestBase
{
@@ -10,7 +9,4 @@
optimistic = true;
cacheMode = Configuration.CacheMode.REPL_SYNC;
}
-
- @Test
- public void blah() {}
}
17 years, 3 months
JBoss Cache SVN: r4643 - core/trunk/src/test/java/org/jboss/cache/api/pfer.
by jbosscache-commits@lists.jboss.org
Author: bstansberry(a)jboss.com
Date: 2007-10-18 15:00:08 -0400 (Thu, 18 Oct 2007)
New Revision: 4643
Modified:
core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationSyncTest.java
Log:
Get rid of blah
Modified: core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationSyncTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationSyncTest.java 2007-10-18 15:49:15 UTC (rev 4642)
+++ core/trunk/src/test/java/org/jboss/cache/api/pfer/PFERPessimisticInvalidationSyncTest.java 2007-10-18 19:00:08 UTC (rev 4643)
@@ -7,7 +7,6 @@
package org.jboss.cache.api.pfer;
import org.jboss.cache.config.Configuration;
-import org.testng.annotations.Test;
/**
* Test putForExternalRead with pessimistic locking and INVALIDATION_ASYNC.
@@ -23,6 +22,4 @@
cacheMode = Configuration.CacheMode.INVALIDATION_SYNC;
}
- @Test
- public void blah() {}
}
17 years, 3 months