[jboss-svn-commits] JBoss Portal SVN: r5290 - in trunk: build build/etc cms cms/src/main/org/jboss/portal/cms/hibernate/state cms/src/main/org/jboss/portal/cms/impl/jcr cms/src/main/org/jboss/portal/cms/impl/jcr/command cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit cms/src/main/org/jboss/portal/test/cms cms/src/main/org/jboss/portal/test/cms/clustering cms/src/resources/test cms/src/resources/test/cms cms/src/resources/test/cms/clustering cms/src/resources/test/cms/clustering/sar cms/src/resources/test/cms/clustering/sar/META-INF cms/src/resources/test/cms/clustering/sar/conf cms/src/resources/test/cms/clustering/sar/conf/hibernate cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms cms/src/resources/test/cms/clustering/test-cms-clustering-war cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF core core/src/resources/portal-cms-sar/META-INF portlet server test tools/etc/buildfragments

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Sep 28 23:49:10 EDT 2006


Author: sohil.shah at jboss.com
Date: 2006-09-28 23:49:00 -0400 (Thu, 28 Sep 2006)
New Revision: 5290

Added:
   trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/FileUpdateAndVersionCommand.java
   trunk/cms/src/main/org/jboss/portal/test/cms/clustering/
   trunk/cms/src/main/org/jboss/portal/test/cms/clustering/CMSTestSuite.java
   trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileModSequenceBuilder.java
   trunk/cms/src/resources/test/cms/
   trunk/cms/src/resources/test/cms/clustering/
   trunk/cms/src/resources/test/cms/clustering/sar/
   trunk/cms/src/resources/test/cms/clustering/sar/META-INF/
   trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml
   trunk/cms/src/resources/test/cms/clustering/sar/conf/
   trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/
   trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/
   trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
   trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml
   trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/
   trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/
   trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/jboss-portlet.xml
   trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/portlet.xml
   trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/web.xml
Modified:
   trunk/build/build-thirdparty.xml
   trunk/build/etc/clustered.properties
   trunk/build/etc/single.properties
   trunk/cms/build.xml
   trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/HibernatePersistenceManager.java
   trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/JBossCachePersistenceManager.java
   trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/PortalCMSCacheLoader.java
   trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/Tools.java
   trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
   trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/ClusteredCacheListener.java
   trunk/core/build.xml
   trunk/core/src/resources/portal-cms-sar/META-INF/jboss-service.xml
   trunk/portlet/
   trunk/portlet/build.xml
   trunk/server/
   trunk/test/
   trunk/tools/etc/buildfragments/modules.ent
Log:
added cluster testing to cms test suite

Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/build/build-thirdparty.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -82,7 +82,7 @@
       <componentref name="jbossas/core-libs" version="4.0.4.GA"/>
       <componentref name="jboss/aop" version="1.5.0.GA"/>     
       <componentref name="jboss/backport-concurrent" version="2.1.0.GA"/>
-      <componentref name="jboss/cache" version="1.3.0.SP2"/>
+      <componentref name="jboss/cache" version="1.4.0.SP1"/>
       <componentref name="jboss/jbossretro-rt" version="1.0.0.GA"/>
       <componentref name="jboss/jbossws14" version="1.0.0.GA"/>
       <componentref name="jboss/jbossxb" version="1.0.0.CR4"/>
@@ -94,7 +94,7 @@
       <componentref name="jwebunit" version="1.2"/>
       <componentref name="jcr" version="1.0"/> 
       <componentref name="jetty" version="6.0"/> 
-      <componentref name="jgroups" version="2.2.7"/>
+      <componentref name="jgroups" version="2.2.8"/>
       <componentref name="jsunit" version="2.1"/>
       <componentref name="junit" version="3.8.1"/>
       <componentref name="odmg" version="3.0"/>      

Modified: trunk/build/etc/clustered.properties
===================================================================
--- trunk/build/etc/clustered.properties	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/build/etc/clustered.properties	2006-09-29 03:49:00 UTC (rev 5290)
@@ -8,4 +8,3 @@
 portal.cache.config=replicated
 portal.hibernate.cache.usage=transactional
 cms.service.code=org.jboss.portal.cms.impl.jcr.ha.HAJCRCMS
-pm.cache.mode=INVALIDATION_ASYNC

Modified: trunk/build/etc/single.properties
===================================================================
--- trunk/build/etc/single.properties	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/build/etc/single.properties	2006-09-29 03:49:00 UTC (rev 5290)
@@ -7,5 +7,4 @@
 portal.web.postdistributable=
 portal.cache.config=local
 portal.hibernate.cache.usage=read-write
-cms.service.code=org.jboss.portal.cms.impl.jcr.JCRCMS
-pm.cache.mode=LOCAL
\ No newline at end of file
+cms.service.code=org.jboss.portal.cms.impl.jcr.JCRCMS
\ No newline at end of file

Modified: trunk/cms/build.xml
===================================================================
--- trunk/cms/build.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/build.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -65,19 +65,19 @@
       <!-- Configure thirdparty libraries -->
       &libraries;
       <path id="library.classpath">
-      	<path refid="apache.logging.classpath"/>
+      	 <path refid="apache.logging.classpath"/>
+	     <path refid="apache.xerces.classpath"/>
+	     <path refid="apache.log4j.classpath"/>
+	     <path refid="apache.collections.classpath"/>
+	     <path refid="apache.lucene.classpath"/>
          <path refid="jboss.jbossxb.classpath"/>
-         <path refid="jboss.cache.classpath"/>
-         <path refid="apache.xerces.classpath"/>
+         <path refid="jboss.cache.classpath"/>         
          <path refid="oswego.concurrent.classpath"/>
          <path refid="jboss.microcontainer.classpath"/>
          <path refid="hibernate.hibernate.classpath"/>
          <path refid="ehcache.ehcache.classpath"/>
-         <path refid="jbossas/core.libs.classpath"/>
-         <path refid="apache.log4j.classpath"/>
-         <path refid="jakarta.io.classpath"/>
-         <path refid="apache.collections.classpath"/>
-         <path refid="apache.lucene.classpath"/>
+         <path refid="jbossas/core.libs.classpath"/>         
+         <path refid="jakarta.io.classpath"/>         
          <path refid="junit.junit.classpath"/>
          <path refid="jackrabbit.jackrabbit.classpath"/>
          <path refid="slf4j.slf4j.classpath"/>
@@ -86,6 +86,7 @@
          <path refid="jcr.jcr.classpath"/>
 	     <!-- cms optimization integration -->
 	     <path refid="jgroups.jgroups.classpath"/>
+		 <path refid="sun.servlet.classpath"/>
       </path>
       
       
@@ -100,9 +101,12 @@
       <call target="configure-modules"/>
       <path id="dependentmodule.classpath">
          <path refid="jboss.portal-server.classpath"/>
-         <path refid="jboss.portal-common.classpath"/>
+         <path refid="jboss.portal-common.classpath"/>		 
          <path refid="jboss.portal-jems.classpath"/>
-         <path refid="jboss.portal-test.classpath"/>
+         <path refid="jboss.portal-test.classpath"/>	
+	     <!-- clustered testcases related -->
+	     <path refid="jboss.portal-portlet.classpath"/>
+		 <path refid="jboss.portlet-api.classpath"/>
       </path>
 
 
@@ -164,24 +168,15 @@
          <fileset dir="${apache.collections.root}/lib" includes="commons-collections.jar"/>
          <fileset dir="${apache.lucene.root}/lib" includes="lucene.jar"/>
 	
-	  	<!-- cms optimization integration - this contains a clustered cache enabled version
-	  	of jackrabbit customization of jackrabbit-core-1.0.1 codebase 
-	    For details regarding this customization see: cms/jackrabbit-customization
-	    also needed are jboss-cache.jar and jgroups.jar to support this customization
-	    1.4.0SP1
-	    
-	    TODO: This is fine for this iteration. Eventually we need to integrate these libraries
-	    for bundling in the thirdparty mechanism. This will follow in the next iteration
-	    -->
-	    <!--fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core-1.0.jar"/-->
-	    <fileset dir="../cms/jackrabbit-customization/lib" includes="jackrabbit-core-1.0.1.jar"/>
-	  	<fileset dir="../cms/jackrabbit-customization/lib" includes="jboss-cache.jar"/>
-	  	<fileset dir="../cms/jackrabbit-customization/lib" includes="jgroups.jar"/>		 
+	  	<!-- cms optimization integration -->
+	    <fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core-1.0.jar"/>	    
+	  	<fileset dir="${jboss.cache.lib}" includes="jboss-cache.jar"/>
+	  	<fileset dir="${jgroups.jgroups.lib}" includes="jgroups.jar"/>		 
 	     
 	
          <fileset dir="${slf4j.slf4j.lib}" includes="slf4j-log4j12.jar"/>   
       </jar>
-
+		
       <copy todir="${build.resources}/test/jcr/">
          <fileset dir="${source.bin}" includes="ziptest.zip"/>
          <fileset dir="${source.bin}" includes="headerpage.html"/>
@@ -189,10 +184,76 @@
       </copy>
    </target>
 	
-	<!-- generates artifacts used for tests, requires output to be previously run
-	     -->
-	<target name="package-tests" depends="init">
+	<!-- 
+				generates artifacts used for tests, requires output to be previously run
+	-->
+	<target name="package-tests" depends="init">		 
+	
+		 <jar jarfile="${build.lib}/test-cms-cluster.sar" manifest="${build.etc}/portal-cms-lib-sar.mf">
+		         <fileset dir="${build.resources}/portal-cms-sar"/>
+		         <fileset dir="${build.lib}" includes="portal-cms-lib.jar"/>
+		         <fileset dir="${jcr.jcr.root}/lib" includes="jcr-1.0.jar"/>
+		         <fileset dir="${apache.collections.root}/lib" includes="commons-collections.jar"/>
+		         <fileset dir="${apache.lucene.root}/lib" includes="lucene.jar"/>
+			
+				<!-- cms optimization integration -->
+		    	<fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core-1.0.jar"/>	    
+		  		<fileset dir="${jboss.cache.lib}" includes="jboss-cache.jar"/>
+		  		<fileset dir="${jgroups.jgroups.lib}" includes="jgroups.jar"/>		 
+			     
+			
+		        <fileset dir="${slf4j.slf4j.lib}" includes="slf4j-log4j12.jar"/>   
+		
+		        <!-- add the jboss-service.xml and hibernate configuration -->
+	   			<fileset dir="${build.resources}/test/cms/clustering/sar"/>   
+	   			<fileset dir="${jboss.portal-core.lib}" includes="portal-core-lib.jar"/>			
+	   	   		<fileset dir="${jboss.portal-common.lib}" includes="portal-common-lib.jar"/>
+	   			<fileset dir="${jboss.portal-jems.lib}" includes="portal-jems-lib.jar"/>   						
+	   			<fileset dir="${jboss.portal-server.lib}" includes="portal-server-lib.jar"/>
+	   			<fileset dir="${jboss.portal-portlet.lib}" includes="portal-portlet-testframework-lib.jar"/>
+		  </jar>
+		 <jar jarfile="${build.lib}/test-cms-cluster.war">
+	         <fileset dir="${build.resources}/test/cms/clustering/test-cms-clustering-war"/>
+			 <fileset dir="${build.classes}" includes="org/jboss/portal/test/cms/clustering/**"/>			 
+	      </jar>
 	</target>
+	
+	<target name="deploy-tests"
+	           description="Deploy."
+	           depends="output">
+		  <!-- 
+		  		upgrage the jbosscache/groups of the HA instances for the puropse of testing
+		  		
+		  		TODO: This is fine for this iteration. Eventually we need to integrate these libraries
+		    	for bundling in the thirdparty mechanism. This will follow in the next iteration
+		   -->
+      	  <copy file="${jboss.cache.lib}/jboss-cache.jar" todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
+      	  <copy file="${jgroups.jgroups.lib}/jgroups.jar" todir="${jboss.home}/server/ports-01/lib" overwrite="true"/>
+		  <copy file="${jboss.cache.lib}/jboss-cache.jar" todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+	      <copy file="${jgroups.jgroups.lib}/jgroups.jar" todir="${jboss.home}/server/ports-02/lib" overwrite="true"/>
+	
+	      <!-- install test sars needed for the testsuite framework -->
+		  <copy file="${jboss.portal-portlet.lib}/test.sar" todir="${jboss.home}/server/ports-01/deploy"/>
+	      <copy file="${jboss.portal-portlet.lib}/test.sar" todir="${jboss.home}/server/ports-02/deploy"/>
+		  <copy file="${jboss.portal-test.lib}/portal-test.sar" todir="${jboss.home}/server/ports-01/deploy"/>
+		  <copy file="${jboss.portal-test.lib}/portal-test.sar" todir="${jboss.home}/server/ports-02/deploy"/>
+	
+	      <copy file="${build.lib}/test-cms-cluster.sar" todir="${jboss.home}/server/ports-01/deploy"/>
+		  <copy file="${build.lib}/test-cms-cluster.sar" todir="${jboss.home}/server/ports-02/deploy"/>
+	</target>
+	
+	<target name="undeploy-tests"
+		           description="UnDeploy."
+		           depends="output">
+	
+		      <!-- install test sars needed for the testsuite framework -->
+			  <delete file="${jboss.home}/server/ports-01/deploy/test.sar"/>
+		      <delete file="${jboss.home}/server/ports-02/deploy/test.sar"/>
+			  <delete file="${jboss.home}/server/ports-01/deploy/portal-test.sar"/>
+			  <delete file="${jboss.home}/server/ports-02/deploy/portal-test.sar"/>		
+		      <delete file="${jboss.home}/server/ports-01/deploy/test-cms-cluster.sar"/>
+			  <delete file="${jboss.home}/server/ports-02/deploy/test-cms-cluster.sar"/>
+	</target>
 
    <!-- ================================================================== -->
    <!-- Cleaning                                                           -->
@@ -225,20 +286,78 @@
    <!-- ================================================================== -->
    <!-- Test.                                                              -->
    <!-- ================================================================== -->
-
+   <target name="clustered-tests" depends="init">
+	      <execute-tests>
+      	     <x-sysproperty>
+      	            <sysproperty key="test.root" value="${build.lib}"/>
+      	            <sysproperty key="test.uri" value="/test/redirect/"/>
+      	     </x-sysproperty>
+	         <x-test>				
+				<test todir="${test.reports}" name="org.jboss.portal.test.cms.clustering.CMSTestSuite"/> 		        
+	         </x-test>
+	         <x-classpath>
+	            <path refid="apache.logging.classpath"/>
+	            <path refid="jboss.jbossxb.classpath"/>
+	            <path refid="jboss.cache.classpath"/>
+	            <path refid="apache.xerces.classpath"/>
+	            <path refid="oswego.concurrent.classpath"/>
+	            <path refid="jboss.microcontainer.classpath"/>
+	            <path refid="hibernate.hibernate.classpath"/>
+	            <path refid="ehcache.ehcache.classpath"/>
+	            <path refid="jbossas/core.libs.classpath"/>
+	            <path refid="apache.log4j.classpath"/>
+	            <path refid="jakarta.io.classpath"/>
+	            <path refid="apache.collections.classpath"/>
+	            <path refid="apache.lucene.classpath"/>
+	            <path refid="junit.junit.classpath"/>            
+	            <path refid="slf4j.slf4j.classpath"/>
+	            <path refid="sun.jaf.classpath"/>
+	            <path refid="xdoclet.xdoclet.classpath"/>
+	            <path refid="jcr.jcr.classpath"/>
+	            <path refid="dom4j.dom4j.classpath"/>
+	            <path refid="antlr.antlr.classpath"/>
+	            <path refid="asm.asm.classpath"/>
+	            <path refid="cglib.cglib.classpath"/>
+	            <path refid="hsqldb.hsqldb.classpath"/>
+	            <path refid="jboss.portal-common.classpath"/>
+	            <path refid="jboss.portal-test.classpath"/>
+	            <path refid="jboss.portal-server.classpath"/>
+	            <path refid="jboss.portal-jems.classpath"/>
+	            <pathelement location="${build.lib}/portal-cms-lib.jar"/>
+	            <pathelement location="${build.resources}/portal-cms-sar"/>
+	            <pathelement location="${build.resources}/test"/>
+	            <pathelement location="${build.resources}/hibernate"/>
+	            <pathelement location="${jboss.portal-test.root}/etc"/>
+		        <!-- jbosscachepersistence manager integration -->
+				<path refid="jackrabbit.jackrabbit.classpath"/>
+		        <path refid="jboss.cache.classpath"/>
+				<path refid="jgroups.jgroups.classpath"/>
+	            <!-- for clustering related -->
+				<pathelement location="${source.java}"/>
+	            <pathelement location="${build.classes}"/>
+	            <pathelement location="${build.resources}"/>
+	            <path refid="library.classpath"/>
+	            <path refid="dependentmodule.classpath"/>
+				<path refid="jboss.remoting.classpath"/>
+				<path refid="apache.httpclient.classpath"/>
+				<path refid="jboss.serialization.classpath"/>
+				<path refid="apache.codec.classpath"/>
+	         </x-classpath>
+	      </execute-tests>
+   </target>
    <target name="tests" depends="init">
       <execute-tests>
          <x-test>
 			<!-- general cms setup related tests -->
-            <test todir="${test.reports}" name="org.jboss.portal.test.cms.JackrabbitTestCase"/>
+            <!--test todir="${test.reports}" name="org.jboss.portal.test.cms.JackrabbitTestCase"/>
             <test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRepositoryBootStrap"/>
-			<test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRegEx"/>
+			<test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRegEx"/-->
 	
 	        <!-- repository utility tests -->
-            <test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRepositoryUtil"/>
+            <!--test todir="${test.reports}" name="org.jboss.portal.test.cms.TestRepositoryUtil"/-->
 	
 	        <!-- cms file command tests -->
-      		<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileDelete"/>			
+      		<!--test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileDelete"/>			
       		<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileCreate"/>
       		<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileUpdate"/>
       		<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileArchiveUpload"/>			
@@ -246,14 +365,14 @@
 			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileGetVersion"/>
 			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileGetList"/>
 			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileCopy"/>			
-			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileCreateFailed"/>
+			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFileCreateFailed"/-->
 	
 	        <!-- cms folder command tests -->
-			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderCopy"/>            
+			<!--test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderCopy"/>            
 			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderCreate"/>            
             <test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderDelete"/>            			
 			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderGet"/>            			
-			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderUpdate"/>            			
+			<test todir="${test.reports}" name="org.jboss.portal.test.cms.commands.TestFolderUpdate"/--> 		        
          </x-test>
          <x-classpath>
             <path refid="apache.logging.classpath"/>
@@ -290,8 +409,8 @@
             <pathelement location="${jboss.portal-test.root}/etc"/>
 	        <!-- jbosscachepersistence manager integration -->
 			<path refid="jackrabbit.jackrabbit.classpath"/>
-	        <pathelement location="jackrabbit-customization/lib/jboss-cache.jar"/>
-			<pathelement location="jackrabbit-customization/lib/jgroups.jar"/>
+			<path refid="jboss.cache.classpath"/>
+			<path refid="jgroups.jgroups.classpath"/>
          </x-classpath>
       </execute-tests>
    </target>

Modified: trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/HibernatePersistenceManager.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/HibernatePersistenceManager.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/HibernatePersistenceManager.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -887,8 +887,14 @@
       try
       {
          Query query = session.createQuery(nodeReferenceSelect).setCacheable(true).setString(0,
-               refs.getTargetId().toString());
-         Object result = query.uniqueResult();
+               refs.getTargetId().toString());                  
+         
+         List list = query.list();
+         if(list == null)
+         {
+             return;
+         }
+         Object result = list.iterator().next();
          if (result != null)
          {
             session.delete(result);

Modified: trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/JBossCachePersistenceManager.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/JBossCachePersistenceManager.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/JBossCachePersistenceManager.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -83,59 +83,39 @@
 
     protected static final String SCHEMA_OBJECT_PREFIX_VARIABLE = "${schemaObjectPrefix}";
 
-    protected boolean initialized;
+    protected boolean initialized = false;
 
-    protected String jndiName;
+    protected String jndiName = null;
 
-    protected String schemaObjectPrefix;
+    protected String schemaObjectPrefix = null;
 
-    protected boolean externalBLOBs;
+    protected boolean externalBLOBs = false;
 
     // initial size of buffer used to serialize objects
     protected static final int INITIAL_BUFFER_SIZE = 1024;
+    
 
-    // shared statements for NodeState management
-    protected String nodeStateSelect;
-
-    protected String nodeStateSelectData;
-
-    protected String nodeStateSelectExist;
-
-    // shared statements for PropertyState management
-    protected String propertyStateSelect;
-
-    protected String propertyStateSelectData;
-
-    protected String propertyStateSelectExist;
-
-    // shared statements for NodeReference management
-    protected String nodeReferenceSelect;
-
-    protected String nodeReferenceSelectData;
-
-    protected String nodeReferenceSelectExist;
-
     // shared statements for BLOB management
     // (if <code>externalBLOBs==false</code>)
-    protected String blobSelect;
+    protected String blobSelect = null;
 
-    protected String blobSelectData;
+    protected String blobSelectData = null;
 
-    protected String blobSelectExist;
+    protected String blobSelectExist = null;
 
-    protected String nodeBinValSelect;
+    protected String nodeBinValSelect = null;
 
     /**
      * file system where BLOB data is stored
      * (if <code>externalBLOBs==true</code>)
      */
-    protected FileSystem blobFS;
+    protected FileSystem blobFS = null;
 
     /**
      * BLOBStore that manages BLOB data in the file system
      * (if <code>externalBLOBs==true</code>)
      */
-    protected BLOBStore blobStore;
+    protected BLOBStore blobStore = null;
 
     /**
      * 
@@ -153,7 +133,43 @@
        initialized = false;
     }
     
+    //------------------------------------------------------------------------------------------------------------------------------------------------
+    public String getJNDIName()
+    {
+       return jndiName;
+    }
+
+    public void setJNDIName(String JNDIName)
+    {
+       this.jndiName = JNDIName;
+    }
+
+    public String getSchemaObjectPrefix()
+    {
+       return schemaObjectPrefix;
+    }
+
+    public void setSchemaObjectPrefix(String schemaObjectPrefix)
+    {
+       this.schemaObjectPrefix = schemaObjectPrefix;//.toUpperCase();
+    }
+
+    public boolean isExternalBLOBs()
+    {
+       return externalBLOBs;
+    }
+
+    public void setExternalBLOBs(boolean externalBLOBs)
+    {
+       this.externalBLOBs = externalBLOBs;
+    }
+
+    public void setExternalBLOBs(String externalBLOBs)
+    {
+       this.externalBLOBs = Boolean.valueOf(externalBLOBs).booleanValue();
+    }
     
+    
     /* 
      * 
      */
@@ -166,19 +182,6 @@
 
         nodeBinValSelect = "from " + schemaObjectPrefix + "BinVal where BINVAL_ID = ?";
 
-        nodeStateSelect = "from " + schemaObjectPrefix + "Node where NODE_ID = ?";
-        nodeStateSelectData = "select data from " + schemaObjectPrefix + "Node where NODE_ID = ?";
-        nodeStateSelectExist = "select 1 from " + schemaObjectPrefix + "Node where NODE_ID = ?";
-
-        propertyStateSelect = "from " + schemaObjectPrefix + "Prop where PROP_ID = ?";
-        propertyStateSelectData = "select data from " + schemaObjectPrefix + "Prop where PROP_ID = ?";
-        propertyStateSelectExist = "select 1 from " + schemaObjectPrefix + "Prop where PROP_ID = ?";
-
-        nodeReferenceSelect = "from " + schemaObjectPrefix + "Refs where NODE_ID = ?";
-        nodeReferenceSelectData = "select data from " + schemaObjectPrefix + "Refs where NODE_ID = ?";
-        nodeReferenceSelectExist = "select 1 from " + schemaObjectPrefix + "Refs where NODE_ID = ?";
-
-
         if (externalBLOBs)
         {
            /**
@@ -207,14 +210,13 @@
         
         try
         { 
-           Tools.init(this.jndiName);
-           
+           Tools.init(this.jndiName);           
 	       if(JBossCachePersistenceManager.pmCache == null)
 	       {
 	           try
-	           {
+	           {	               
 	               MBeanServer server=MBeanServerLocator.locateJBoss();
-	               JBossCachePersistenceManager.pmCache = (TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class,"cms.pm.cache:service=TreeCache",server);
+	               JBossCachePersistenceManager.pmCache = (TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class,"cms.pm.cache:service=TreeCache",server);	               
 	           }
 	           catch(Exception e)
 	           {
@@ -1167,42 +1169,7 @@
           throw new ItemStateException(msg, e);
        }
    }          
-    //---------------------------------------------------< PersistenceManager >
-    public String getJNDIName()
-    {
-       return jndiName;
-    }
-
-    public void setJNDIName(String JNDIName)
-    {
-       this.jndiName = JNDIName;
-    }
-
-    public String getSchemaObjectPrefix()
-    {
-       return schemaObjectPrefix;
-    }
-
-    public void setSchemaObjectPrefix(String schemaObjectPrefix)
-    {
-       this.schemaObjectPrefix = schemaObjectPrefix;//.toUpperCase();
-    }
-
-    public boolean isExternalBLOBs()
-    {
-       return externalBLOBs;
-    }
-
-    public void setExternalBLOBs(boolean externalBLOBs)
-    {
-       this.externalBLOBs = externalBLOBs;
-    }
-
-    public void setExternalBLOBs(String externalBLOBs)
-    {
-       this.externalBLOBs = Boolean.valueOf(externalBLOBs).booleanValue();
-    }
-    //---------------------------------------------------< PersistenceManager >
+    //----------------------------------------------------------------------------------------------------------------------------------------
     /**
     *
     */

Modified: trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/PortalCMSCacheLoader.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/PortalCMSCacheLoader.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/PortalCMSCacheLoader.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -535,9 +535,9 @@
      */
     public void start() throws Exception 
     { 
-        log.info("------------------------------------------------------");
-        log.info("PersistenceManager Cache successfully started.....(ClusterName="+this.cache.getClusterName()+")");
-        log.info("------------------------------------------------------");
+        log.debug("------------------------------------------------------");
+        log.debug("PersistenceManager Cache successfully started.....(ClusterName="+this.cache.getClusterName()+")");
+        log.debug("------------------------------------------------------");
     }
 
     /**

Modified: trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/Tools.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/Tools.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/cms/hibernate/state/Tools.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -60,7 +60,7 @@
 	    {	        
 			try
 			{
-			    log.info("Loading the PersistenceManager Hibernate System (Started)...........................");
+			    log.debug("Loading the PersistenceManager Hibernate System (Started)...........................");
 			    
 			    boolean loadSuccess = true;
 			    try
@@ -85,7 +85,7 @@
 			    }
 				
 				
-				log.info("Loading the PersistenceManager Hibernate System (Done)...........................");
+				log.debug("Loading the PersistenceManager Hibernate System (Done)...........................");
 			}
 			catch(Exception e)
 			{

Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -64,15 +64,18 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
+import org.jboss.cache.Version;
+
 /**
  * @author <a href="mailto:roy at jboss.org">Roy Russo</a>
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
+ * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
 public class JCRCMS extends AbstractJBossService implements CMS
 {
+   private static Logger log = Logger.getLogger(JCRCMS.class);
 
-
    private JCRCommandFactory commandFactory;
    private boolean doChecking;
    private Locale defaultLocale;
@@ -87,6 +90,7 @@
    private InterceptorStackFactory stackFactory;
    
    private Element config;
+      
 
    private InvocationHandler handler = new InvocationHandler()
    {
@@ -172,10 +176,21 @@
     */
    public void startService() throws Exception
    {
+       //check the version of jbosscache being run
+       String cacheVersion = Version.getVersionString(Version.getVersionShort());
+       log.info("JBossCache Version="+cacheVersion);
+       
+       //set the proper logging level for JBossCache and JGroups
+       Logger cacheLogger = Logger.getLogger("org.jboss.cache");
+       cacheLogger.setLevel(Level.ERROR);
+       Logger groupsLogger = Logger.getLogger("org.jgroups");
+       groupsLogger.setLevel(Level.ERROR);
+       
+       
       // See how long it takes us to start up
       StopWatch watch = new StopWatch(true);
       log.info("Starting JCR CMS");
-//      addInterceptors();
+      //addInterceptors();
       startJCR();
       watch.stop();
       log.info("Started JCR CMS in: " + watch);
@@ -427,11 +442,10 @@
          }
       };
 
-      boolean shouldCommit = false;
       Object obj = new Object();
       try
       {
-         xares.start(xid, XAResource.TMNOFLAGS);
+         xares.start(xid,XAResource.TMNOFLAGS);
 
          // .... add new nodes & properties and save them
          JCRCommand jcrCmd = (JCRCommand) cmd;
@@ -450,13 +464,27 @@
             jcrCmd.dispatch();
          }
          obj = jcrCmd.getResult();
-
+                  
+                           
+         //committ the transaction
          xares.end(xid, XAResource.TMSUCCESS);
          xares.prepare(xid);
-         shouldCommit = true;
+         session.save();
+         xares.commit(xid,false);
       }
       catch(Exception e)
       {
+          e.printStackTrace();
+          try
+          {
+              xares.rollback(xid);
+          }
+          catch(Exception ex)
+          {
+              //we tried to roll it back...not sure what more we can do here
+              throw new CMSException(ex);
+          }
+          
          if (e instanceof CMSException)
          {
             throw (CMSException)e;
@@ -468,29 +496,14 @@
          else
          {
             throw new CMSException(e);
-         }
+         }         
       }
       finally
       {
          if (session != null)
-         {
-            try
-            {
-               session.save();
-               if(shouldCommit)
-               {
-                  xares.commit(xid, false);
-               }
-               else
-               {
-                  xares.rollback(xid);
-               }
-               session.logout();
-            }
-            catch(Exception e)
-            {
-               e.printStackTrace();
-            }
+         {                          
+             //must do this otherwise, the whole cms will hang
+             session.logout();                          
          }
       }
       return obj;

Added: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/FileUpdateAndVersionCommand.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/FileUpdateAndVersionCommand.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/FileUpdateAndVersionCommand.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,100 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.portal.cms.impl.jcr.command;
+
+import java.util.Calendar;
+
+import javax.jcr.Node;
+
+import org.apache.jackrabbit.value.BinaryValue;
+import org.apache.jackrabbit.value.DateValue;
+import org.jboss.portal.cms.CMSMimeMappings;
+import org.jboss.portal.cms.impl.jcr.JCRCommand;
+import org.jboss.portal.cms.impl.jcr.util.VersionUtil;
+import org.jboss.portal.cms.model.Content;
+import org.jboss.portal.cms.model.File;
+
+/**
+ * @author <a href="mailto:roy at jboss.org">Roy Russo</a>
+ */
+public class FileUpdateAndVersionCommand extends JCRCommand
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 882238623005109537L;
+   File mFile;
+   boolean bMakeLive;
+
+   /**
+    * Updates a given file content in the repo, creating a new version.
+    *
+    * @param file      File obj to update
+    */
+   public FileUpdateAndVersionCommand(File file,boolean makeLive)
+   {
+      this.mFile = file;
+      this.bMakeLive = makeLive;
+   }
+
+   public Object execute()
+   {
+      try
+      {
+         Node contentNode = (Node) context.getSession().getItem(mFile.getContent().getBasePath());
+         contentNode.checkout();
+
+         contentNode.setProperty("portalcms:description", mFile.getContent().getDescription());
+         contentNode.setProperty("portalcms:title", mFile.getContent().getTitle());
+         contentNode.setProperty("portalcms:language", mFile.getContent().getLocale().getLanguage());
+         contentNode.setProperty("jcr:encoding", "UTF-8");
+         contentNode.setProperty("jcr:data", new BinaryValue(mFile.getContent().getBytes()));
+         contentNode.setProperty("jcr:lastModified", new DateValue(Calendar.getInstance()));
+
+         if (mFile.getContent().getMimeType() != null)
+         {
+            contentNode.setProperty("jcr:mimeType", mFile.getContent().getMimeType());
+         }
+         else
+         {
+            String fileExt = mFile.getBasePath().substring(mFile.getBasePath().lastIndexOf(".") + 1, mFile.getBasePath().length());
+            CMSMimeMappings mapper = new CMSMimeMappings();
+            if(mapper.getMimeType(fileExt) != null)
+            {
+               contentNode.setProperty("jcr:mimeType", mapper.getMimeType(fileExt));
+            }
+            else
+            {
+               contentNode.setProperty("jcr:mimeType", "application/octet-stream");
+            }
+         }                  
+         contentNode.save();
+         
+         //make a new version live version
+         Node versionNode = (Node)context.getSession().getItem(mFile.getContent().getBasePath());
+         VersionUtil.createVersion(versionNode,this.bMakeLive); 
+      }
+      catch(Exception e)
+      {
+          throw new RuntimeException(e);
+      }
+      return null;
+   }
+}

Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/ClusteredCacheListener.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/ClusteredCacheListener.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/jackrabbit/ClusteredCacheListener.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -123,7 +123,12 @@
 			                    
 			                    log.debug("Evicting..."+item.toString()+" (Transient:"+state.isTransient()+")");
 			                
-			                    state.discard();
+			                    //synchronize this operation such that no other threads can retrieve this object from the specified cache
+			                    //while this operation is in progress
+			                    if(state.getStatus() == ItemState.STATUS_EXISTING)
+			                    {
+			                        state.discard();
+			                    }
 			                }
 		                }
 		            }

Added: trunk/cms/src/main/org/jboss/portal/test/cms/clustering/CMSTestSuite.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/clustering/CMSTestSuite.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/clustering/CMSTestSuite.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.portal.test.cms.clustering;
+
+import junit.framework.Test;
+
+import org.jboss.portal.test.framework.container.client.TestSuite;
+import org.jboss.portal.test.framework.container.client.TestCase;
+import org.jboss.portal.test.framework.server.NodeId;
+
+/**
+ * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
+ */
+public class CMSTestSuite
+{
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("test-cms-cluster.war", new NodeId[]{NodeId.PORTS_01,NodeId.PORTS_02});
+      
+      //adding file create,update,delete operations in a cluster
+      suite.addTest(new TestCase(NodeId.PORTS_01, "testFileUpdate"));
+      suite.addTest(new TestCase(NodeId.PORTS_01, "testFileDelete"));
+      
+      
+      //adding folder create,update,delete operations in a cluster
+      
+      
+      return suite;
+   }
+}

Added: trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileModSequenceBuilder.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileModSequenceBuilder.java	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/clustering/FileModSequenceBuilder.java	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,506 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.portal.test.cms.clustering;
+
+import java.io.IOException;
+import java.util.Locale;
+
+import org.jboss.mx.util.MBeanProxyExt;
+import org.jboss.mx.util.MBeanServerLocator;
+import javax.management.MBeanServer;
+
+import org.jboss.portal.cms.CMS;
+import org.jboss.portal.cms.Command;
+import org.jboss.portal.cms.impl.ContentImpl;
+import org.jboss.portal.cms.impl.FileImpl;
+import org.jboss.portal.cms.model.Content;
+import org.jboss.portal.cms.model.File;
+
+
+import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.Sequence;
+import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.framework.portlet.universal.UTP1;
+
+
+import org.jboss.portal.test.framework.container.result.Result;
+import org.jboss.portal.test.framework.container.result.EndTestResult;
+import org.jboss.portal.test.framework.container.result.FailureResult;
+import org.jboss.portal.test.framework.container.result.InvokeGetResult;
+import org.jboss.portal.test.framework.container.TestCaseContext;
+import org.jboss.portal.test.framework.server.NodeId;
+
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.PortletURL;
+
+
+
+/**
+ * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
+ */
+public class FileModSequenceBuilder extends SequenceRegistryBuilder
+{
+    /**
+     * 
+     */
+    private String sFilePath = "/index.html";
+    
+    /**
+     * 
+     *
+     */
+    public void createTestFileUpdate(SequenceRegistry registry)
+    {
+      Sequence seq = new Sequence();
+      registry.addSequence("testFileUpdate", seq);
+                  
+      seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response) 
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Performing SetUp on..."+NodeId.PORTS_01+"(createTestFileUpdate)");
+             System.out.println("-------------------------------------------------------");
+                                                               
+             CMS service = null;
+             try
+             {
+                 MBeanServer server=MBeanServerLocator.locateJBoss();
+                 service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                 assertNotNull(service);
+                 
+                 Command getCommand = service.getCommandFactory().createFileGetCommand(sFilePath,Locale.ENGLISH);
+                 Object o = service.execute(getCommand);
+                 if(o != null)
+                 {
+                     //this file exists delete it from the system before executing this testcase
+                     Command delete = service.getCommandFactory().createDeleteCommand(sFilePath);
+                     service.execute(delete);
+                 }
+                 
+                 createFile(service);
+                 
+                                  
+                 o = service.execute(getCommand);
+                 //assert this test
+                 assertNotNull(o);
+                 System.out.println("-------------------------------------------------------");
+                 System.out.println("Content Description Before Update="+((File)o).getContent().getDescription());
+                 System.out.println("Live version Before Update="+((File)o).getContent().getVersionNumber());
+                 System.out.println("-------------------------------------------------------");                 
+             }
+             catch(Exception e)
+             {
+                 e.printStackTrace();
+                 return new FailureResult(e.toString());
+             }
+            
+             
+             PortletURL portletURL = response.createRenderURL();
+             String url = TestCaseContext.getCurrentContext().rewriteURLForNode(portletURL.toString(),NodeId.PORTS_02);            
+             return new InvokeGetResult(url);
+         }
+      });
+      seq.addAction(1, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response)
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Performing SetUp on node..."+NodeId.PORTS_02+"(createTestFileUpdate)");
+             System.out.println("-------------------------------------------------------");             
+                                     
+            CMS service = null;
+            try
+            {
+                MBeanServer server=MBeanServerLocator.locateJBoss();
+                service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                assertNotNull(service);
+            
+                Command getCommand = service.getCommandFactory().createFileGetCommand(sFilePath,Locale.ENGLISH);
+                Object o = service.execute(getCommand);                
+                
+                //assert this test
+                assertNotNull(o);
+                if(o != null)
+                {
+                    System.out.println("-------------------------------------------------------");
+                    System.out.println("Content Description Before Update="+((File)o).getContent().getDescription());
+                    System.out.println("Content Description Before Update="+((File)o).getContent().getVersionNumber());
+                    System.out.println("-------------------------------------------------------");
+                }
+                else
+                {
+                    System.out.println("-------------------------------------------------------");
+                    System.out.println("File Not Found on this node "+sFilePath);
+                    System.out.println("-------------------------------------------------------");
+                }
+            }
+            catch(Exception e)
+            {
+                e.printStackTrace();
+                return new FailureResult(e.toString());
+            }
+            
+            PortletURL portletURL = response.createRenderURL();
+            String url = TestCaseContext.getCurrentContext().rewriteURLForNode(portletURL.toString(),NodeId.PORTS_01);            
+            return new InvokeGetResult(url);
+         }
+      });
+      seq.addAction(2, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response) 
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Performing FileUpdate on..."+NodeId.PORTS_01+"(createTestFileUpdate)");
+             System.out.println("-------------------------------------------------------");
+             
+                                                  
+             CMS service = null;
+             try
+             {
+                 MBeanServer server=MBeanServerLocator.locateJBoss();
+                 service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                 assertNotNull(service);
+                 
+                 Command existsCommand = service.getCommandFactory().createItemExistsCommand(sFilePath);
+                 Boolean exists = (Boolean)service.execute(existsCommand);
+                 if(exists.booleanValue())
+                 {
+                     //update the selected file
+                     Command getCMD = service.getCommandFactory().createFileGetCommand(sFilePath,Locale.ENGLISH);
+                     File newfile = (File) service.execute(getCMD);
+                     Content content = newfile.getContent();
+                     content.setDescription("New English Description");
+                     newfile.setContent(content.getLocale(), content);                     
+                     //Command cmdUpdate = service.getCommandFactory().createFileUpdateCommand(newfile);
+                     Command cmdUpdate = service.getCommandFactory().createUpdateFileCommand(newfile,content,true);
+                     service.execute(cmdUpdate);
+                                          
+                     
+                     newfile = (File)service.execute(getCMD);                     
+                     
+                     //assert and make sure the changes specified took effect
+                     assertEquals(newfile.getContent().getDescription(),"New English Description");
+                                          
+                     System.out.println("-------------------------------------------");
+                     System.out.println("Content Description After Update ="+newfile.getContent().getDescription());
+                     System.out.println("Live Version After Update ="+newfile.getContent().getVersionNumber());                   
+                     System.out.println("-------------------------------------------");                                                               
+                 }             
+                 else
+                 {
+                     System.out.println("The content was not successfully created");
+                     assertTrue("The content was not successfully created",exists.booleanValue());
+                 }
+             }
+             catch(Exception e)
+             {
+                 e.printStackTrace();
+                 return new FailureResult(e.toString());
+             }
+             
+                                                   
+             PortletURL portletURL = response.createRenderURL();
+             String url = TestCaseContext.getCurrentContext().rewriteURLForNode(portletURL.toString(),NodeId.PORTS_02);            
+             return new InvokeGetResult(url);
+         }
+      });
+      seq.addAction(3, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response)
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Checking FileUpdate on node..."+NodeId.PORTS_02+"(createTestFileUpdate)");
+             System.out.println("-------------------------------------------------------");             
+                                     
+            CMS service = null;
+            try
+            {
+                MBeanServer server=MBeanServerLocator.locateJBoss();
+                service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                assertNotNull(service);
+            
+                Command getCMD = service.getCommandFactory().createFileGetCommand(sFilePath,Locale.ENGLISH);
+                File file = (File) service.execute(getCMD);
+                                                                
+                if(file != null)
+                {                                        
+                    System.out.println("-------------------------------------------");
+                    System.out.println("Content Description After Update ="+file.getContent().getDescription());
+                    System.out.println("Live Version After Update ="+file.getContent().getVersionNumber());
+                    System.out.println("-------------------------------------------");
+                }
+                else
+                {
+                    System.out.println("-------------------------------------------------------");
+                    System.out.println("File Not Found on this node "+sFilePath);
+                    System.out.println("-------------------------------------------------------"); 
+                }
+                
+                assertEquals(file.getContent().getDescription(),"New English Description");
+            }
+            catch(Exception e)
+            {
+                e.printStackTrace();
+                return new FailureResult(e.toString());
+            }
+            
+            return new EndTestResult();
+         }
+      });
+    }
+    
+    /**
+     * 
+     *
+     */
+    public void createTestFileDelete(SequenceRegistry registry)
+    {
+      Sequence seq = new Sequence();
+      registry.addSequence("testFileDelete", seq);
+                  
+      seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response) 
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Performing SetUp on..."+NodeId.PORTS_01+"(createTestFileDelete)");
+             System.out.println("-------------------------------------------------------");
+                                                               
+             CMS service = null;
+             try
+             {
+                 MBeanServer server=MBeanServerLocator.locateJBoss();
+                 service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                 assertNotNull(service);
+                 
+                 Command getCommand = service.getCommandFactory().createFileGetCommand(sFilePath,Locale.ENGLISH);
+                 Object o = service.execute(getCommand);
+                 if(o == null)
+                 {
+                     createFile(service);
+                 }
+                 
+                 //assert this test                 
+                 o = service.execute(getCommand);
+                 assertNotNull(o);                                  
+             }
+             catch(Exception e)
+             {
+                 e.printStackTrace();
+                 return new FailureResult(e.toString());
+             }
+            
+             
+             PortletURL portletURL = response.createRenderURL();
+             String url = TestCaseContext.getCurrentContext().rewriteURLForNode(portletURL.toString(),NodeId.PORTS_02);            
+             return new InvokeGetResult(url);
+         }
+      });
+      seq.addAction(1, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response)
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Performing SetUp on node..."+NodeId.PORTS_02+"(createTestFileDelete)");
+             System.out.println("-------------------------------------------------------");             
+                                     
+            CMS service = null;
+            try
+            {
+                MBeanServer server=MBeanServerLocator.locateJBoss();
+                service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                assertNotNull(service);
+            
+                Command getCommand = service.getCommandFactory().createFileGetCommand(sFilePath,Locale.ENGLISH);
+                Object o = service.execute(getCommand);                
+                
+                //assert this test
+                assertNotNull(o);                                
+            }
+            catch(Exception e)
+            {
+                e.printStackTrace();
+                return new FailureResult(e.toString());
+            }
+            
+            PortletURL portletURL = response.createRenderURL();
+            String url = TestCaseContext.getCurrentContext().rewriteURLForNode(portletURL.toString(),NodeId.PORTS_01);            
+            return new InvokeGetResult(url);
+         }
+      });
+      seq.addAction(2, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response) 
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Performing FileDelete on..."+NodeId.PORTS_01+"(createTestFileDelete)");
+             System.out.println("-------------------------------------------------------");
+             
+                                                  
+             CMS service = null;
+             try
+             {
+                 MBeanServer server=MBeanServerLocator.locateJBoss();
+                 service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                 assertNotNull(service);
+                 
+                 Command existsCommand = service.getCommandFactory().createItemExistsCommand(sFilePath);
+                 Boolean exists = (Boolean)service.execute(existsCommand);
+                 if(exists.booleanValue())
+                 {
+                     //delete the file
+                     Command deleteCMD = service.getCommandFactory().createDeleteCommand(sFilePath);
+                     service.execute(deleteCMD);                     
+                     
+                     //assert and make sure the changes specified took effect
+                     Command existsCMD = service.getCommandFactory().createItemExistsCommand(sFilePath);
+                     Boolean existsCheck = (Boolean)service.execute(existsCMD);
+                     assertFalse(existsCheck.booleanValue());
+                 }             
+                 else
+                 {
+                     System.out.println("The content was not successfully created");
+                     assertTrue("The content was not successfully created",exists.booleanValue());
+                 }
+             }
+             catch(Exception e)
+             {
+                 e.printStackTrace();
+                 return new FailureResult(e.toString());
+             }
+             
+                                                   
+             PortletURL portletURL = response.createRenderURL();
+             String url = TestCaseContext.getCurrentContext().rewriteURLForNode(portletURL.toString(),NodeId.PORTS_02);            
+             return new InvokeGetResult(url);
+         }
+      });
+      seq.addAction(3, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+      {
+         protected Result run(Portlet portlet, RenderRequest request, RenderResponse response)
+         throws PortletException, PortletSecurityException, IOException
+         {
+             System.out.println("-------------------------------------------------------");
+             System.out.println("Checking FileDelete on node..."+NodeId.PORTS_02+"(createTestFileDelete)");
+             System.out.println("-------------------------------------------------------");             
+                                     
+            CMS service = null;
+            try
+            {
+                MBeanServer server=MBeanServerLocator.locateJBoss();
+                service = (CMS)MBeanProxyExt.create(CMS.class,"portal:service=CMS",server);             
+                assertNotNull(service);
+            
+                //delete the file
+                Command deleteCMD = service.getCommandFactory().createDeleteCommand(sFilePath);
+                service.execute(deleteCMD);                     
+                
+                //assert and make sure the changes specified took effect
+                Command existsCMD = service.getCommandFactory().createItemExistsCommand(sFilePath);
+                Boolean existsCheck = (Boolean)service.execute(existsCMD);
+                assertFalse("File delete on Node-1 not successfully propagated to Node-2",existsCheck.booleanValue());
+            }
+            catch(Exception e)
+            {
+                e.printStackTrace();
+                return new FailureResult(e.toString());
+            }
+            
+            return new EndTestResult();
+         }
+      });
+    }
+    
+    /**
+     * 
+     *
+     */
+    private void createFile(CMS service)
+    {
+        try
+        {
+	        System.out.println("Creating content for...."+sFilePath);
+	        
+	        //create this content first 
+	        // create file english
+	        File file = new FileImpl();
+	        file.setBasePath(sFilePath);
+	
+	        Content content = new ContentImpl();
+	        content.setEncoding("UTF-8");
+	        content.setTitle("English Title");
+	        content.setDescription("English Description");
+	        content.setBasePath(sFilePath + "/" + Locale.ENGLISH.getLanguage());
+	        content.setBytes("1234567890".getBytes());
+	        content.setMimeType("text/html");
+	        file.setContent(Locale.ENGLISH, content);
+	
+	        // save english file
+	        Command saveFileCMD = service.getCommandFactory().createFileSaveCommand(file);
+	        service.execute(saveFileCMD);
+	
+	        //save english content
+	        Command saveContentCMD = service.getCommandFactory().createContentSaveCommand(file);
+	        service.execute(saveContentCMD);
+	
+	        // version the english content node
+	        Command verCMD = service.getCommandFactory().createContentCreateNewVersionCommand(content, true);
+	        service.execute(verCMD);
+	
+	        // create content spanish
+	        Content contentSP = new ContentImpl();
+	        contentSP.setEncoding("UTF-8");
+	        contentSP.setTitle("Spanish Title");
+	        contentSP.setDescription("Spanish Description");
+	        contentSP.setBasePath(sFilePath + "/es");
+	        contentSP.setBytes("0987654321".getBytes());
+	        contentSP.setMimeType("text/html");
+	        file.setContent(new Locale("es"), contentSP);
+	
+	        //save spanish content
+	        Command saveSPContentCMD = service.getCommandFactory().createContentSaveCommand(file);
+	        service.execute(saveSPContentCMD);
+	
+	        // version the spanish content node
+	        Command verSPCMD = service.getCommandFactory().createContentCreateNewVersionCommand(contentSP, true);
+	        service.execute(verSPCMD);
+        }
+        catch(Exception e)
+        {
+            throw new RuntimeException(e);
+        }
+    }       
+}

Added: trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/resources/test/cms/clustering/sar/META-INF/jboss-service.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,509 @@
+<server> 	   
+   <mbean
+      code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+      name="portal:service=Hibernate,type=CMS"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends>jboss.jca:service=DataSourceBinding,name=TestPortalDS</depends>
+      <attribute name="DoChecking">true</attribute>
+      <attribute name="ConfigLocation">conf/hibernate/cms/hibernate.cfg.xml</attribute>
+      <attribute name="JNDIName">java:/portal/cms/CMSSessionFactory</attribute>
+   </mbean>
+   
+   <mbean
+      code="org.jboss.portal.cms.impl.jcr.ha.HAJCRCMS"
+      name="portal:service=CMS"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      
+      <depends>jboss.jca:service=DataSourceBinding,name=TestPortalDS</depends>      
+      <depends>portal:service=Hibernate,type=CMS</depends>      
+      <!--depends>portal:service=JAASLoginModule</depends-->
+      
+      <!--depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends-->
+      
+      <attribute name="DoChecking">true</attribute>
+      <attribute name="DefaultContentLocation">default-content/default/</attribute>
+      <attribute name="DefaultLocale">en</attribute>
+      <attribute name="RepositoryName">PortalRepository</attribute>
+      <attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute>
+      <attribute name="Config">
+         <Repository>
+            <!--
+               | virtual file system where the repository stores global state (e.g. registered namespaces, custom node types, etc.)
+               | Configure to use FS or RDBMS.
+               -->
+
+            <!-- HibernateStore: uses RDBMS + Hibernate for storage -->
+            <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
+               <param name="schemaObjectPrefix" value="RepositoryEntry"/>
+               <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
+            </FileSystem>
+
+            <!-- LocalFileSystem: uses FileSystem for storage. -->
+            <!--
+            <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+               <param name="path" value="${rep.home}/repository"/>
+            </FileSystem>
+            -->
+            <Security appName="Jackrabbit">
+               <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"/>
+               <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
+                  <!-- anonymous user name ('anonymous' is the default value) -->
+                  <param name="anonid" value="anonymous"/>
+               </LoginModule>
+            </Security>
+            <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+            <Workspace name="${wsp.name}">
+               <!-- Virtual file system of the workspace:  Configure to use FS or RDBMS. -->
+
+               <!-- HibernateStore: uses RDBMS + Hibernate for storage -->
+               <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
+                  <param name="schemaObjectPrefix" value="CMSEntry"/>
+                  <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+               </FileSystem>
+               <!-- LocalFileSystem: uses FileSystem for storage. -->
+               <!--<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+               <param name="path" value="${wsp.home}"/>
+               </FileSystem>-->
+
+               <!--
+                   persistence manager of the workspace.
+                   Use XMLPersistenceManager for LocalFileSystem Store and HibernatePersistentManager .
+               -->
+
+               <!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage -->
+               <PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
+                  <param name="schemaObjectPrefix" value="WSP"/>
+                  <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+                  <param name="externalBLOBs" value="false"/>
+               </PersistenceManager>
+               
+               <!-- XMLPersistenceManager: uses FileSystem for storage -->
+               <!--<PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>-->
+
+               <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+                  <param name="path" value="${wsp.home}/index"/>
+                  <param name="useCompoundFile" value="true"/>
+                  <param name="minMergeDocs" value="100"/>
+                  <param name="volatileIdleTime" value="3"/>
+                  <param name="maxMergeDocs" value="100000"/>
+                  <param name="mergeFactor" value="10"/>
+                  <param name="bufferSize" value="10"/>
+                  <param name="cacheSize" value="1000"/>
+                  <param name="forceConsistencyCheck" value="false"/>
+                  <param name="autoRepair" value="true"/>
+               </SearchIndex>
+            </Workspace>
+            <Versioning rootPath="${rep.home}/versions">
+               <!--
+                   Configures the filesystem to use for versioning for the respective persistence manager
+                   Configure to use FS or RDBMS.
+               -->
+
+               <!-- HibernateStore: uses RDBMS + Hibernate for storage -->
+               <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore">
+                  <param name="schemaObjectPrefix" value="VersionEntry"/>
+                  <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+               </FileSystem>
+               
+               <!-- LocalFileSystem: uses FileSystem for storage. -->
+               <!--
+               <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+                <param name="path" value="${rep.home}/versions"/>
+               </FileSystem>
+               -->
+
+               <!--
+                   Configures the persistence manager to be used for persisting version state.
+                   Use XMLPersistenceManager for LocalFileSystem Store and HibernatePersistentManager for HibernateStore.
+               -->
+
+               <!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage -->
+               <PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
+                  <param name="schemaObjectPrefix" value="Version"/>
+                  <param name="JNDIName" value="java:portal/cms/CMSSessionFactory"/>
+                  <param name="externalBLOBs" value="false"/>
+               </PersistenceManager>
+               
+               <!-- XMLPersistenceManager: uses FileSystem for storage -->
+               <!--<PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>-->
+            </Versioning>
+         </Repository>
+      </attribute>
+   </mbean>
+
+   <!--
+      | Uncomment in clustered mode : HASingleton registration      
+   -->
+   <mbean
+      code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+      name="portal:service=ProxyFactory,type=CMS">
+      <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
+      <attribute name="TargetName">portal:service=CMS</attribute>
+      <attribute name="ExportedInterfaces">org.jboss.portal.jems.ha.HASingletonInvokerMBean$Proxy</attribute>
+      <attribute name="InvokeTargetMethod">true</attribute>
+      <attribute name="ClientInterceptors">
+        <interceptors>
+          <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
+          <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+        </interceptors>
+      </attribute>
+   </mbean>
+   <mbean
+      code="org.jboss.portal.jems.ha.HASingletonInvoker"
+      name="portal:service=HASingletonInvoker,type=CMS">
+      <depends>jboss:service=DefaultPartition</depends>
+      <attribute name="RetryWaitingTimeMS">2000</attribute>
+      <attribute name="MaxRetries">5</attribute>
+      <attribute name="JNDIName">MyServiceInvokeTarget</attribute>
+      <attribute name="JNDIProperties">
+         java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+         java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+         java.naming.provider.url=${jboss.bind.address:localhost}:1100
+         jnp.disableDiscovery=false
+         jnp.partitionName=${jboss.partition.name:DefaultPartition}
+         jnp.discoveryGroup=${jboss.partition.udpGroup:230.0.0.4}
+         jnp.discoveryPort=1102
+         jnp.discoveryTTL=16
+         jnp.discoveryTimeout=5000
+         jnp.maxRetries=1
+      </attribute>
+      <depends optional-attribute-name="Callback" proxy-type="attribute">portal:service=CMS</depends>
+      <depends optional-attribute-name="ProxyFactory">portal:service=ProxyFactory,type=CMS</depends>
+   </mbean>
+   
+   <!-- TreeCache configuration used to cache CMS data -->
+   <mbean code="org.jboss.cache.TreeCache"
+           name="cms.pm.cache:service=TreeCache">
+   
+           <depends>jboss:service=Naming</depends>
+           <depends>jboss:service=TransactionManager</depends>
+           <depends>portal:service=Hibernate,type=CMS</depends>
+           <depends>portal:service=CMS</depends>
+   
+           <!--
+           Configure the TransactionManager
+           -->
+           <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
+           
+           <!--
+		Node locking scheme:
+		OPTIMISTIC
+		PESSIMISTIC (default)
+		using the OPTIMISTIC scheme, the ISOLATION_LEVEL value is ignored
+	   -->
+	   <!--attribute name="NodeLockingScheme">OPTIMISTIC</attribute-->
+   
+           <!--
+               Isolation level : SERIALIZABLE
+                                 REPEATABLE_READ (default)
+                                 READ_COMMITTED
+                                 READ_UNCOMMITTED
+                                 NONE
+           -->
+           <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+           
+           	   
+   
+           <!--
+                Valid modes are LOCAL
+                                REPL_ASYNC
+                                REPL_SYNC
+                                INVALIDATION_ASYNC
+                                INVALIDATION_SYNC
+           -->
+           <!-- in a non-HA environment with the Jackrabbit cluster is activated -->
+           <!--attribute name="CacheMode">INVALIDATION_ASYNC</attribute-->           
+           <!-- in a HA environment since there is only a singleton node for CMS, this can be local -->
+           <attribute name="CacheMode">LOCAL</attribute>           
+   
+           <!--
+           Just used for async repl: use a replication queue
+           -->
+           <attribute name="UseReplQueue">false</attribute>
+   
+           <!--
+               Replication interval for replication queue (in ms)
+           -->
+           <attribute name="ReplQueueInterval">0</attribute>
+   
+           <!--
+               Max number of elements which trigger replication
+           -->
+           <attribute name="ReplQueueMaxElements">0</attribute>
+   
+           <!-- Name of cluster. Needs to be the same for all clusters, in order
+                to find each other
+           -->
+           <attribute name="ClusterName">JCRPMCache</attribute>
+   
+           <!-- JGroups protocol stack properties. Can also be a URL,
+                e.g. file:/home/bela/default.xml
+              <attribute name="ClusterProperties"></attribute>
+           -->
+   
+           <attribute name="ClusterConfig">
+               <config>
+                   <!-- UDP: if you have a multihomed machine,
+                   set the bind_addr attribute to the appropriate NIC IP address -->
+                   <!-- UDP: On Windows machines, because of the media sense feature
+                    being broken with multicast (even after disabling media sense)
+                    set the loopback attribute to true -->
+                   <UDP mcast_addr="228.1.2.3" mcast_port="48866"
+                       ip_ttl="64" ip_mcast="true" 
+                       receive_on_all_interfaces="true"
+                       mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
+                       ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
+                       loopback="false"/>
+                   <PING timeout="2000" num_initial_members="3"
+                       up_thread="false" down_thread="false"/>
+                   <MERGE2 min_interval="10000" max_interval="20000"/>
+                   <!--        <FD shun="true" up_thread="true" down_thread="true" />-->
+                   <FD_SOCK/>
+                   <VERIFY_SUSPECT timeout="1500"
+                       up_thread="false" down_thread="false"/>
+                   <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
+                       max_xmit_size="8192" up_thread="false" down_thread="false"/>
+                   <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
+                       down_thread="false"/>
+                   <pbcast.STABLE desired_avg_gossip="20000"
+                       up_thread="false" down_thread="false"/>
+                   <FRAG frag_size="8192"
+                       down_thread="false" up_thread="false"/>
+                   <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
+                       shun="true" print_local_addr="true"/>
+                   <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
+               </config>
+           </attribute>
+   
+           <!--
+            Whether or not to fetch state on joining a cluster
+            NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
+            
+            Not supported in version 1.2.4SP2 which is what ships by default in 4.0.4GA 
+           -->
+           <!--attribute name="FetchInMemoryState">false</attribute-->
+   
+           <!--
+               The max amount of time (in milliseconds) we wait until the
+               initial state (ie. the contents of the cache) are retrieved from
+               existing members in a clustered environment
+           -->
+           <attribute name="InitialStateRetrievalTimeout">20000</attribute>
+   
+           <!--
+               Number of milliseconds to wait until all responses for a
+               synchronous call have been received.
+           -->
+           <attribute name="SyncReplTimeout">20000</attribute>
+   
+           <!-- Max number of milliseconds to wait for a lock acquisition -->
+           <attribute name="LockAcquisitionTimeout">15000</attribute>
+   
+   
+           <!-- Name of the eviction policy class. -->
+           <attribute name="EvictionPolicyClass"></attribute>
+          
+          <!--
+             Indicate whether to use region based marshalling or not. Set this to true if you are running under a scoped
+             class loader, e.g., inside an application server. Default is "false".
+             
+             Not supported in version 1.2.4SP2 which is what ships by default in 4.0.4GA 
+          -->
+           <!--attribute name="UseRegionBasedMarshalling">false</attribute-->
+           
+           <!--
+           		Configuring the PortalCMSCacheLoader
+           		
+           		CacheLoader configuratoon for 1.4.0
+           -->           
+           <attribute name="CacheLoaderConfiguration">
+               <config>                
+                   <passivation>false</passivation>
+                   <preload></preload>
+                   <shared>false</shared>
+                   <cacheloader>
+                       <class>org.jboss.portal.cms.hibernate.state.PortalCMSCacheLoader</class>
+                       <properties></properties>
+                       <async>false</async>
+                       <fetchPersistentState>false</fetchPersistentState>
+                       <ignoreModifications>false</ignoreModifications>
+                   </cacheloader>
+               </config>
+           </attribute>
+           <!--
+           		Configuring the PortalCMSCacheLoader
+           		
+           		CacheLoader configuratoon for 1.2.4SP2
+           --> 
+           <!--attribute name="CacheLoaderClass">org.jboss.portal.cms.hibernate.state.PortalCMSCacheLoader</attribute>       
+           <attribute name="CacheLoaderConfig" replace="false"></attribute>
+           <attribute name="CacheLoaderPassivation">false</attribute>
+           <attribute name="CacheLoaderPreload"></attribute>
+           <attribute name="CacheLoaderShared">false</attribute>           
+           <attribute name="CacheLoaderFetchTransientState">false</attribute>
+           <attribute name="CacheLoaderFetchPersistentState">false</attribute>
+           <attribute name="CacheLoaderAsynchronous">false</attribute-->          
+    </mbean>
+          
+   <!-- not sure if these should be removed since Command Framework is used now -->
+   <!--mbean
+      code="org.jboss.portal.core.cms.CMSObjectCommandFactory"
+      name="portal:commandFactory=CMSObject"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <attribute name="TargetWindowRef">default.default.DefaultCMSPortletWindow</attribute>
+      <depends optional-attribute-name="CMSService" proxy-type="attribute">portal:service=CMS</depends>
+   </mbean>
+   <mbean
+      code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
+      name="portal:commandFactory=Delegate,prefix=content"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <attribute name="Prefix">content</attribute>
+      <depends
+         optional-attribute-name="DelegatingFactory"
+         proxy-type="attribute">portal:commandFactory=Delegating</depends>
+      <depends
+         optional-attribute-name="DelegateFactory"
+         proxy-type="attribute">portal:commandFactory=CMSObject</depends>
+   </mbean>
+   <mbean
+      code="org.jboss.portal.core.cms.CMSObjectURLFactory"
+      name="portal:urlFactory=CMSObject"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <attribute name="Prefix">content</attribute>
+      <depends optional-attribute-name="Factory" proxy-type="attribute">portal:urlFactory=Delegating</depends>
+   </mbean-->
+   
+   <!-- intereceptors -->
+   <!--mbean
+      code="org.jboss.portal.cms.impl.interceptors.LogInterceptor"
+      name="portal:service=Interceptor,type=Cms,name=Log"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+   </mbean>            
+   <mbean
+      code="org.jboss.portal.cms.impl.cache.CMSTreeCacheServiceImpl"
+      name="portal:service=CMSTreeCacheService"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends optional-attribute-name="Cache" proxy-type="attribute">
+         <mbean
+            code="org.jboss.cache.TreeCache"
+            name="portal:service=CMSTreeCache">
+            <depends>jboss:service=Naming</depends>
+            <depends>jboss:service=TransactionManager</depends>
+            <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
+            <attribute name="CacheMode">REPL_ASYNC</attribute>
+            <attribute name="IsolationLevel">NONE</attribute>
+         </mbean>
+      </depends> 
+      <attribute name="JNDIName">java:/portal/cms/CMSTreeCache</attribute>
+   </mbean>         
+   <mbean
+      code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
+      name="portal:service=Interceptor,type=Cms,name=Cache"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends>portal:service=CMSTreeCacheService</depends>
+   </mbean>
+   <mbean
+      code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+      name="portal:service=InterceptorStackFactory,type=Cms"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends-list optional-attribute-name="InterceptorNames">
+         <depends-list-element>portal:service=Interceptor,type=Cms,name=Cache</depends-list-element>
+         <depends-list-element>portal:service=Interceptor,type=Cms,name=Log</depends-list-element>
+      </depends-list>
+   </mbean-->
+   
+   <!--
+   	| Uncomment in clustered mode : TreeCache configuration for the clustered JackRabbit in-memory cache...
+   	| This helps with node synching, but there are other aspects of JackRabbit like versioning subsystem
+   	| and locking system that get out-of-sync in the cluster. This leads to unpredicatable results and hence
+   	| the idea to cluster JackRabbit needs to be dropped at this time
+   -->   	
+   <!--mbean code="org.jboss.cache.TreeCache"
+               name="jackrabbit.inmemory.cache:service=TreeCache">
+       
+           <depends>jboss:service=Naming</depends>
+	       <depends>jboss:service=TransactionManager</depends>
+	       
+	       <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
+	               	         
+	       
+	               
+	               <attribute name="IsolationLevel">NONE</attribute>
+	       
+	               
+	               <attribute name="CacheMode">INVALIDATION_ASYNC</attribute>
+	       
+	               
+	               <attribute name="UseReplQueue">false</attribute>
+	       
+	               
+	               <attribute name="ReplQueueInterval">0</attribute>
+	       
+	               
+	               <attribute name="ReplQueueMaxElements">0</attribute>
+	       
+	               
+	               <attribute name="ClusterName">JackRabbitInternalCache</attribute>
+	       
+	               
+	       
+	               <attribute name="ClusterConfig">
+	                   <config>	                       
+	                       <UDP mcast_addr="228.1.2.3" mcast_port="48866"
+	                           ip_ttl="64" ip_mcast="true" 
+	                           receive_on_all_interfaces="true"
+	                           mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
+	                           ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
+	                           loopback="false"/>                
+	                       <PING timeout="2000" num_initial_members="3"
+	                           up_thread="false" down_thread="false"/>
+	                       <MERGE2 min_interval="10000" max_interval="20000"/>	                       
+	                       <FD_SOCK/>
+	                       <VERIFY_SUSPECT timeout="1500"
+	                           up_thread="false" down_thread="false"/>
+	                       <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
+	                           max_xmit_size="8192" up_thread="false" down_thread="false"/>
+	                       <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
+	                           down_thread="false"/>
+	                       <pbcast.STABLE desired_avg_gossip="20000"
+	                           up_thread="false" down_thread="false"/>
+	                       <FRAG frag_size="8192"
+	                           down_thread="false" up_thread="false"/>
+	                       <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
+	                           shun="true" print_local_addr="true"/>
+	                       <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
+	                   </config>
+	               </attribute>
+	       
+	               <attribute name="FetchInMemoryState">false</attribute>
+	       
+	               <attribute name="InitialStateRetrievalTimeout">20000</attribute>
+	       
+	               <attribute name="SyncReplTimeout">20000</attribute>
+	       	       
+	               <attribute name="LockAcquisitionTimeout">15000</attribute>
+	       
+	       	               
+	               <attribute name="EvictionPolicyClass"></attribute>
+	              	              
+        		  <attribute name="UseRegionBasedMarshalling">false</attribute>                        
+    </mbean-->      
+</server>

Added: trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,255 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+   "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+   <class name="org.jboss.portal.cms.hibernate.state.VersionBinVal" table="jbp_cms_version_binval" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="id"
+            column="BINVAL_ID"
+            type="string"
+            length="255"/>
+      <property
+            name="data"
+            column="BINVAL_DATA"
+            type="blob"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.state.VersionNode" table="jbp_cms_version_node" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="nodeId"
+            column="NODE_ID"
+            type="string"
+            length="36"/>
+      <property
+            name="data"
+            column="NODE_DATA"
+            type="binary"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.state.VersionProp" table="jbp_cms_version_prop" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="propId"
+            column="PROP_ID"
+            type="string"
+            length="255"/>
+      <property
+            name="data"
+            column="PROP_DATA"
+            type="binary"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.state.VersionRefs" table="jbp_cms_version_refs" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="refId"
+            column="NODE_ID"
+            type="string"
+            length="36"/>
+      <property
+            name="data"
+            column="REFS_DATA"
+            type="binary"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.state.WSPBinVal" table="jbp_cms_wsp_binval" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="id"
+            column="BINVAL_ID"
+            type="string"
+            length="255"/>
+      <property
+            name="data"
+            column="BINVAL_DATA"
+            type="blob"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.state.WSPNode" table="jbp_cms_wsp_node" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="nodeId"
+            column="NODE_ID"
+            type="string"
+            length="36"/>
+      <property
+            name="data"
+            column="NODE_DATA"
+            type="binary"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.state.WSPProp" table="jbp_cms_wsp_prop" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="propId"
+            column="PROP_ID"
+            type="string"
+            length="255"/>
+      <property
+            name="data"
+            column="PROP_DATA"
+            type="binary"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.state.WSPRefs" table="jbp_cms_wsp_refs" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="refId"
+            column="NODE_ID"
+            type="string"
+            length="36"/>
+      <property
+            name="data"
+            column="REFS_DATA"
+            type="binary"
+            length="100000000"
+            not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.CMSEntry" table="jbp_cms_cmsentry" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="name"
+            column="FSENTRY_NAME"
+            type="string"
+            length="255"
+            not-null="false"/>
+      <property name="path"
+                column="FSENTRY_PATH"
+                type="string"
+                not-null="true"
+                length="245"/>
+      <property name="data"
+                column="FSENTRY_DATA"
+                type="blob"
+                length="100000000"
+                not-null="false"/>
+      <property name="lastmod"
+                column="FSENTRY_LASTMOD"
+                type="long"
+                not-null="true"/>
+      <property name="length"
+                column="FSENTRY_LENGTH"
+                type="long"
+                not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.RepositoryEntry" table="jbp_cms_repositoryentry" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="name"
+            column="FSENTRY_NAME"
+            type="string"
+            length="255"
+            not-null="false"/>
+      <property name="path"
+                column="FSENTRY_PATH"
+                type="string"
+                not-null="true"
+                length="245"/>
+      <property name="data"
+                column="FSENTRY_DATA"
+                type="blob"
+                length="100000000"
+                not-null="false"/>
+      <property name="lastmod"
+                column="FSENTRY_LASTMOD"
+                type="long"
+                not-null="true"/>
+      <property name="length"
+                column="FSENTRY_LENGTH"
+                type="long"
+                not-null="true"/>
+   </class>
+   <class name="org.jboss.portal.cms.hibernate.VersionEntry" table="jbp_cms_versionentry" lazy="true">
+      <id
+            name="key"
+            column="PK"
+            type="java.lang.Integer">
+         <generator class="native"/>
+      </id>
+      <property
+            name="name"
+            column="FSENTRY_NAME"
+            type="string"
+            length="255"
+            not-null="false"/>
+      <property name="path"
+                column="FSENTRY_PATH"
+                type="string"
+                not-null="true"
+                length="245"/>
+      <property name="data"
+                column="FSENTRY_DATA"
+                type="blob"
+                length="100000000"
+                not-null="false"/>
+      <property name="lastmod"
+                column="FSENTRY_LASTMOD"
+                type="long"
+                not-null="true"/>
+      <property name="length"
+                column="FSENTRY_LENGTH"
+                type="long"
+                not-null="true"/>
+   </class>
+</hibernate-mapping>
+

Added: trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/resources/test/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,24 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+    "-//Hibernate/Hibernate Configuration DTD//EN"
+    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+   <session-factory>
+      <property name="connection.datasource">java:TestPortalDS</property>
+      <property name="show_sql">false</property>
+      <property name="cache.use_second_level_cache">false</property>
+      <property name="cache.use_query_cache">false</property>
+      
+      <!-- managed environment transaction configuration -->      
+      <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+      <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+
+      <!-- Force the dialect instead of using autodetection -->
+      <!--
+      <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+      -->
+
+      <!-- Mapping files -->
+      <mapping resource="conf/hibernate/cms/domain.hbm.xml"/>
+   </session-factory>
+</hibernate-configuration>
\ No newline at end of file

Added: trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/jboss-portlet.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/jboss-portlet.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             version="1.0">
+
+   <portlet>
+      <portlet-name>UniversalTestPortletA</portlet-name>
+      <session-config>
+         <distributed>true</distributed>
+      </session-config>
+   </portlet>
+
+</portlet-app>

Added: trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/portlet.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/portlet.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/portlet.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             version="1.0">
+
+   <portlet>
+      <portlet-name>UniversalTestPortletA</portlet-name>
+      <portlet-class>org.jboss.portal.test.framework.portlet.universal.UTP1</portlet-class>
+      <supports>
+        <mime-type>text/html</mime-type>
+      </supports>
+      <portlet-info>
+         <title></title>
+      </portlet-info>
+   </portlet>
+
+</portlet-app>

Added: trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/web.xml
===================================================================
--- trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/web.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/cms/src/resources/test/cms/clustering/test-cms-clustering-war/WEB-INF/web.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
+         xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
+   <listener>
+      <listener-class>org.jboss.portal.test.cms.clustering.FileModSequenceBuilder</listener-class>
+   </listener>
+</web-app>

Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/core/build.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -293,19 +293,10 @@
          <fileset dir="${apache.collections.lib}" includes="commons-collections.jar"/>
          <fileset dir="${apache.lucene.lib}" includes="lucene.jar"/>
 	      	
-	  	<!-- cms optimization integration - this contains a clustered cache enabled version
-	  	of jackrabbit customization of jackrabbit-core-1.0.1 codebase 
-	    For details regarding this customization see: cms/jackrabbit-customization
-	    also needed are jboss-cache.jar and jgroups.jar to support this customization
-	    1.4.0SP1
-	    
-	    TODO: This is fine for this iteration. Eventually we need to integrate these libraries
-	    for bundling in the thirdparty mechanism. This will follow in the next iteration
-	    -->
-	    <!--fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core-1.0.jar"/-->
-	    <fileset dir="../cms/jackrabbit-customization/lib" includes="jackrabbit-core-1.0.1.jar"/>
-	  	<fileset dir="../cms/jackrabbit-customization/lib" includes="jboss-cache.jar"/>
-	  	<fileset dir="../cms/jackrabbit-customization/lib" includes="jgroups.jar"/>		 		 
+	  	<!-- cms optimization integration - this contains a clustered cache enabled version -->
+	  	<fileset dir="${jackrabbit.jackrabbit.lib}" includes="jackrabbit-core-1.0.jar"/>	    
+	  	<fileset dir="${jboss.cache.lib}" includes="jboss-cache.jar"/>
+	  	<fileset dir="${jgroups.jgroups.lib}" includes="jgroups.jar"/>		 
       	
          <fileset dir="${slf4j.slf4j.lib}" includes="slf4j-log4j12.jar"/>
       </copy>

Modified: trunk/core/src/resources/portal-cms-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core/src/resources/portal-cms-sar/META-INF/jboss-service.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/core/src/resources/portal-cms-sar/META-INF/jboss-service.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -1,57 +1,17 @@
-<server>
-
-
-   <!--mbean
-      code="org.jboss.portal.cms.impl.interceptors.LogInterceptor"
-      name="portal:service=Interceptor,type=Cms,name=Log"
+<server> 
+	<mbean
+      code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+      name="portal:service=Hibernate,type=CMS"
       xmbean-dd=""
-      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
       <xmbean/>
-   </mbean-->
+      <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+      <attribute name="DoChecking">true</attribute>
+      <attribute name="ConfigLocation">conf/hibernate/cms/hibernate.cfg.xml</attribute>
+      <attribute name="JNDIName">java:/portal/cms/CMSSessionFactory</attribute>
+   </mbean>  
    
-   <!--
-      //this is not needed anymore. this cache is redundant since jackrabbit is now clusterable      
    <mbean
-      code="org.jboss.portal.cms.impl.cache.CMSTreeCacheServiceImpl"
-      name="portal:service=CMSTreeCacheService"
-      xmbean-dd=""
-      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
-      <xmbean/>
-      <depends optional-attribute-name="Cache" proxy-type="attribute">
-         <mbean
-            code="org.jboss.cache.TreeCache"
-            name="portal:service=CMSTreeCache">
-            <depends>jboss:service=Naming</depends>
-            <depends>jboss:service=TransactionManager</depends>
-            <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
-            <attribute name="CacheMode">REPL_ASYNC</attribute>
-            <attribute name="IsolationLevel">NONE</attribute>
-         </mbean>
-      </depends> 
-      <attribute name="JNDIName">java:/portal/cms/CMSTreeCache</attribute>
-   </mbean>
-         
-   <mbean
-      code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
-      name="portal:service=Interceptor,type=Cms,name=Cache"
-      xmbean-dd=""
-      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
-      <xmbean/>
-      <depends>portal:service=CMSTreeCacheService</depends>
-   </mbean>
-   <mbean
-      code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
-      name="portal:service=InterceptorStackFactory,type=Cms"
-      xmbean-dd=""
-      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
-      <xmbean/>
-      <depends-list optional-attribute-name="InterceptorNames">
-         <depends-list-element>portal:service=Interceptor,type=Cms,name=Cache</depends-list-element>
-      </depends-list>
-   </mbean>
-   -->
-   
-   <mbean
       code="@cms.service.code@"
       name="portal:service=CMS"
       xmbean-dd=""
@@ -62,7 +22,7 @@
       <depends>portal:service=JAASLoginModule</depends>
       <depends>portal:service=Hibernate,type=CMS</depends>
       <!--
-         //this is not needed anymore. this cache is redundant since jackrabbit is now clusterable      
+         //this is not needed anymore. this cache is redundant because of JBossCache PM      
          <depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends>
       -->
       <attribute name="DoChecking">true</attribute>
@@ -177,9 +137,8 @@
    </mbean>
 
    <!--
-      | Uncomment in clustered mode : replicated cache for hibernate
-      
-      //this is not needed anymore. this cache is redundant since jackrabbit is now clusterable      
+   	| Uncomment in clustered mode : Provides an HA-singleton based clustering architecture. 
+   @portal.single.xml.close@
    <mbean
       code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
       name="portal:service=ProxyFactory,type=CMS">
@@ -217,22 +176,10 @@
       <depends optional-attribute-name="Callback" proxy-type="attribute">portal:service=CMS</depends>
       <depends optional-attribute-name="ProxyFactory">portal:service=ProxyFactory,type=CMS</depends>
    </mbean>
+   @portal.single.xml.open@
    -->
 
    <mbean
-      code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
-      name="portal:service=Hibernate,type=CMS"
-      xmbean-dd=""
-      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
-      <xmbean/>
-      <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
-      <attribute name="DoChecking">true</attribute>
-      <attribute name="ConfigLocation">conf/hibernate/cms/hibernate.cfg.xml</attribute>
-      <attribute name="JNDIName">java:/portal/cms/CMSSessionFactory</attribute>
-   </mbean>
-
-
-   <mbean
       code="org.jboss.portal.core.cms.CMSObjectCommandFactory"
       name="portal:commandFactory=CMSObject"
       xmbean-dd=""
@@ -273,6 +220,7 @@
            <depends>jboss:service=Naming</depends>
            <depends>jboss:service=TransactionManager</depends>
            <depends>portal:service=Hibernate,type=CMS</depends>
+           <depends>portal:service=CMS</depends>
    
            <!--
            Configure the TransactionManager
@@ -305,7 +253,10 @@
                                 INVALIDATION_ASYNC
                                 INVALIDATION_SYNC
            -->
-           <attribute name="CacheMode">@pm.cache.mode@</attribute>
+           <!-- in a non-HA environment with the Jackrabbit cluster is activated -->
+           <!--attribute name="CacheMode">INVALIDATION_ASYNC</attribute-->           
+           <!-- in a HA environment since there is only a singleton node for CMS, this can be local -->
+           <attribute name="CacheMode">LOCAL</attribute>           
    
            <!--
            Just used for async repl: use a replication queue
@@ -369,8 +320,10 @@
            <!--
             Whether or not to fetch state on joining a cluster
             NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
+            
+            Not supported in version 1.2.4SP2 which is what ships by default in 4.0.4GA 
            -->
-           <attribute name="FetchInMemoryState">false</attribute>
+           <!--attribute name="FetchInMemoryState">false</attribute-->
    
            <!--
                The max amount of time (in milliseconds) we wait until the
@@ -395,11 +348,15 @@
           <!--
              Indicate whether to use region based marshalling or not. Set this to true if you are running under a scoped
              class loader, e.g., inside an application server. Default is "false".
+             
+             Not supported in version 1.2.4SP2 which is what ships by default in 4.0.4GA 
           -->
-           <attribute name="UseRegionBasedMarshalling">false</attribute>
+           <!--attribute name="UseRegionBasedMarshalling">false</attribute-->
            
            <!--
-           	Configuring the JDBCCacheLoader
+           		Configuring the PortalCMSCacheLoader
+           		
+           		CacheLoader configuratoon for 1.4.0
            -->           
            <attribute name="CacheLoaderConfiguration">
                <config>                
@@ -410,18 +367,33 @@
                        <class>org.jboss.portal.cms.hibernate.state.PortalCMSCacheLoader</class>
                        <properties></properties>
                        <async>false</async>
-                       <fetchPersistentState>true</fetchPersistentState>
+                       <fetchPersistentState>false</fetchPersistentState>
                        <ignoreModifications>false</ignoreModifications>
                    </cacheloader>
                </config>
            </attribute>
+           <!--
+           		Configuring the PortalCMSCacheLoader
+           		
+           		CacheLoader configuratoon for 1.2.4SP2
+           --> 
+           <!--attribute name="CacheLoaderClass">org.jboss.portal.cms.hibernate.state.PortalCMSCacheLoader</attribute>       
+           <attribute name="CacheLoaderConfig" replace="false"></attribute>
+           <attribute name="CacheLoaderPassivation">false</attribute>
+           <attribute name="CacheLoaderPreload"></attribute>
+           <attribute name="CacheLoaderShared">false</attribute>           
+           <attribute name="CacheLoaderFetchTransientState">false</attribute>
+           <attribute name="CacheLoaderFetchPersistentState">false</attribute>
+           <attribute name="CacheLoaderAsynchronous">false</attribute-->          
     </mbean>
    
    <!--
-   	| Uncomment in clustered mode : TreeCache configuration for the clustered JackRabbit in-memory cache
-      	@portal.single.xml.close@
-      	
-   <mbean code="org.jboss.cache.TreeCache"
+   	| Uncomment in clustered mode : TreeCache configuration for the clustered JackRabbit in-memory cache...
+   	| This helps with node synching, but there are other aspects of JackRabbit like versioning subsystem
+   	| and locking system that get out-of-sync in the cluster. This leads to unpredicatable results and hence
+   	| the idea to cluster JackRabbit needs to be dropped at this time
+   -->   	
+   <!--mbean code="org.jboss.cache.TreeCache"
                name="jackrabbit.inmemory.cache:service=TreeCache">
        
            <depends>jboss:service=Naming</depends>
@@ -490,7 +462,56 @@
 	               <attribute name="EvictionPolicyClass"></attribute>
 	              	              
         		  <attribute name="UseRegionBasedMarshalling">false</attribute>                        
-    </mbean>
-    @portal.single.xml.open@
-    -->
+    </mbean-->
+    
+    
+    <!--mbean
+      code="org.jboss.portal.cms.impl.interceptors.LogInterceptor"
+      name="portal:service=Interceptor,type=Cms,name=Log"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+      <xmbean/>
+   </mbean-->
+   
+   <!--
+      //this is not needed anymore. this cache is redundant since there is a JBossCache PM      
+   <mbean
+      code="org.jboss.portal.cms.impl.cache.CMSTreeCacheServiceImpl"
+      name="portal:service=CMSTreeCacheService"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends optional-attribute-name="Cache" proxy-type="attribute">
+         <mbean
+            code="org.jboss.cache.TreeCache"
+            name="portal:service=CMSTreeCache">
+            <depends>jboss:service=Naming</depends>
+            <depends>jboss:service=TransactionManager</depends>
+            <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
+            <attribute name="CacheMode">REPL_ASYNC</attribute>
+            <attribute name="IsolationLevel">NONE</attribute>
+         </mbean>
+      </depends> 
+      <attribute name="JNDIName">java:/portal/cms/CMSTreeCache</attribute>
+   </mbean>
+         
+   <mbean
+      code="org.jboss.portal.cms.impl.interceptors.CacheInterceptor"
+      name="portal:service=Interceptor,type=Cms,name=Cache"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends>portal:service=CMSTreeCacheService</depends>
+   </mbean>
+   <mbean
+      code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+      name="portal:service=InterceptorStackFactory,type=Cms"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends-list optional-attribute-name="InterceptorNames">
+         <depends-list-element>portal:service=Interceptor,type=Cms,name=Cache</depends-list-element>
+      </depends-list>
+   </mbean>
+   -->
 </server>


Property changes on: trunk/portlet
___________________________________________________________________
Name: svn:ignore
   - bin
output

   + bin
output
*.log


Modified: trunk/portlet/build.xml
===================================================================
--- trunk/portlet/build.xml	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/portlet/build.xml	2006-09-29 03:49:00 UTC (rev 5290)
@@ -173,8 +173,13 @@
 
       <!-- Portlet test lib jar -->
       <jar jarfile="${build.lib}/portal-portlet-test-lib.jar">
-         <fileset dir="${build.classes}" includes="org/jboss/portal/portlet/test/**"/>
+         <fileset dir="${build.classes}" includes="org/jboss/portal/portlet/test/**"/>	     
       </jar>
+	
+	  <!-- Portlet test framework lib jar...this is used by the cms clustering testcases -->
+	  <jar jarfile="${build.lib}/portal-portlet-testframework-lib.jar">	  	
+		<fileset dir="${build.classes}" includes="org/jboss/portal/test/framework/portlet/**"/>
+	  </jar>
 
       <!-- Portlet tck lib jar -->
       <jar jarfile="${build.lib}/portal-portlet-tck-lib.jar">
@@ -550,7 +555,7 @@
             <sysproperty key="test.uri" value="/test/redirect/"/>
          </x-sysproperty>
          <x-test>
-            <!--<test todir="${test.reports}" name="org.jboss.portal.test.portlet.ha.session.SessionTestSuite"/>-->
+            <!--test todir="${test.reports}" name="org.jboss.portal.test.portlet.ha.session.SessionTestSuite"/-->
             <!--<test todir="${test.reports}" name="org.jboss.portal.test.portlet.info.InfoTestSuite"/>-->
             <!--<test todir="${test.reports}" name="org.jboss.portal.test.portlet.session.SessionSynchronizationTestCase"/>-->
             <!--<test todir="${test.reports}" name="org.jboss.portal.test.portlet.PortletRequestDecoderTestCase"/>-->
@@ -567,6 +572,7 @@
             <!--<test todir="${test.reports}" name="org.jboss.portal.test.portlet.jsr168.ext.dispatcher.DispatcherTestSuite"/>-->
             <!--<test todir="${test.reports}" name="org.jboss.portal.test.portlet.jsr168.ext.portletrequests.PortletRequestTestSuite"/>-->
 
+            <!--test todir="${test.reports}" name="org.jboss.portal.test.portlet.ParametersTestCase"/-->
             <test todir="${test.reports}" name="org.jboss.portal.test.portlet.state.StateConverterV0TestCase"/>
 
          </x-test>


Property changes on: trunk/server
___________________________________________________________________
Name: svn:ignore
   - bin
output

   + bin
output
*.log



Property changes on: trunk/test
___________________________________________________________________
Name: svn:ignore
   - output
bin

   + output
bin
*.log


Modified: trunk/tools/etc/buildfragments/modules.ent
===================================================================
--- trunk/tools/etc/buildfragments/modules.ent	2006-09-29 00:27:48 UTC (rev 5289)
+++ trunk/tools/etc/buildfragments/modules.ent	2006-09-29 03:49:00 UTC (rev 5290)
@@ -59,6 +59,7 @@
   <path id="jboss.portal-portlet.classpath">
     <pathelement path="${jboss.portal-portlet.lib}/portal-portlet-lib.jar"/>
     <pathelement path="${jboss.portal-portlet.lib}/portal-portlet-test-lib.jar"/>
+    <pathelement path="${jboss.portal-portlet.lib}/portal-portlet-testframework-lib.jar"/>
   </path>
 
   <!-- federation -->




More information about the jboss-svn-commits mailing list