[jboss-cvs] JBossAS SVN: r108642 - in branches/JBPAPP_5_1_datagrid/testsuite: imports/config and 13 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Oct 18 16:59:45 EDT 2010


Author: rachmatowicz at jboss.com
Date: 2010-10-18 16:59:44 -0400 (Mon, 18 Oct 2010)
New Revision: 108642

Added:
   branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/
   branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/
   branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/HotRodClientTestCase.java
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/infinispan-configuration.xml
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/udp.xml
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/infinispan-configuration.xml
   branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/udp.xml
Modified:
   branches/JBPAPP_5_1_datagrid/testsuite/imports/config/tests-clustering.xml
   branches/JBPAPP_5_1_datagrid/testsuite/imports/server-config.xml
   branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/jmx/shutdown/ExitOnShutdown.java
Log:
Add targets, server configs, test configs to allow testing datagrid profile.

Modified: branches/JBPAPP_5_1_datagrid/testsuite/imports/config/tests-clustering.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/imports/config/tests-clustering.xml	2010-10-18 20:53:46 UTC (rev 108641)
+++ branches/JBPAPP_5_1_datagrid/testsuite/imports/config/tests-clustering.xml	2010-10-18 20:59:44 UTC (rev 108642)
@@ -977,5 +977,120 @@
     <server:stop name="mod_cluster-ec2-1"/>
 
   </target> 
+	
+  <!--
+      ************************************* 
+      datagrid stuff (located here for now)
+      ************************************* 
+  -->
+  <patternset id="cluster.datagrid.includes">
+	<include name="org/jboss/test/cluster/datagrid/**/*TestCase.class"/>
+  </patternset>
+	
+	
+  <!-- Depending on the value of Infinispan config ??? -->
+  <target name="tests-clustering-datagrid" description="Execute datagrid tests requiring two nodes.">
 
+	<antcall target="tests-clustering-datagrid-core-tests" inheritRefs="true">
+	  <param name="cluster.datagrid.includes" value="cluster.datagrid.includes"/>
+	</antcall>
+  </target>
+	
+
+  <target name="tests-clustering-datagrid-core-tests" description="Starts servers, executes tests, stops servers">
+
+   <!-- create the server configs -->
+   <antcall target="tests-clustering-datagrid-configure" inheritRefs="true"/>	
+  	
+   <server:start name="datagrid-0"/>
+   <server:start name="datagrid-1"/>
+
+  <!-- run the tests -->
+   <antcall target="tests-clustering-datagrid-execute">
+     <param name="cluster.datagrid.includes.refid" value="${cluster.datagrid.includes}"/>
+     <param name="jboss-junit-configuration" value="datagrid"/>
+   </antcall>
+
+   <server:stop name="datagrid-1"/>
+   <server:stop name="datagrid-0"/>
+   	
+  </target>	
+	
+	
+  <target name="tests-clustering-datagrid-configure" description="Configures datagrid server nodes">
+  	<property name="baseconf" value="datagrid"/>
+	 <create-cluster-node-from-baseconf conf="datagrid-0" baseconf="${baseconf}"/>
+	 <create-cluster-node-from-baseconf conf="datagrid-1" baseconf="${baseconf}"/>
+  	 <!-- add in any other configuration steps here -->
+  </target>	
+	
+  <!-- Executes a set of tests in a datagrid environment -->  
+  <target name="tests-clustering-datagrid-execute" description="JUnit task to execute a batch of tests against the datagrid">
+	   	
+	<property name="cluster.datagrid.excludes.refid" value="empty.patternset"/>
+	   	
+	<mkdir dir="${build.reports}"/>
+	<mkdir dir="${build.testlog}"/>
+	<junit dir="${module.output}"
+	   printsummary="${junit.printsummary}"
+	   haltonerror="${junit.haltonerror}"
+	   haltonfailure="${junit.haltonfailure}"
+	   fork="${junit.fork}"
+	   timeout="${junit.timeout}"
+	   jvm="${junit.jvm}"
+	   failureProperty="tests.failure">
+
+	   <sysproperty key="java.net.preferIPv4Stack" value="true"/>
+	         
+	   <sysproperty key="jboss.internal-server.serverroot" value="${jboss.dist}/server"/>
+	   <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+	   <sysproperty key="jbosstest.cluster.node0" value="${node0}"/>
+	   <sysproperty key="jbosstest.cluster.node0.http.url" value="${node0.http.url}"/>
+	   <sysproperty key="jbosstest.cluster.node0.jndi.url" value="${node0.jndi.url}"/>
+	   <sysproperty key="jbosstest.cluster.node0.hajndi.url" value="${node0.hajndi.url}"/>
+	   <sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
+	   <sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
+	   <sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
+	   <sysproperty key="jbosstest.cluster.node1.hajndi.url" value="${node1.hajndi.url}"/>
+	   <sysproperty key="build.testlog" value="${build.testlog}"/>
+	   <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
+	   <!-- Pass along any jbosstest.* system properties -->
+	   <syspropertyset>
+	     <propertyref prefix="jbosstest."/>
+	   </syspropertyset>
+
+	   <!--Lets pass some parameters from local.properties file as system properties-->
+	   <syspropertyset>
+	      <propertyref prefix="org.apache."/>
+	   </syspropertyset>
+	   <syspropertyset>
+	      <propertyref prefix="apache"/>
+	   </syspropertyset>
+	   <syspropertyset>
+	      <propertyref prefix="node"/>
+	   </syspropertyset>
+
+	   <classpath>
+	      <pathelement location="${build.classes}"/>
+	      <pathelement location="${build.resources}"/>
+	      <path refid="tests.classpath"/>
+	   </classpath>
+
+	   <!-- definition of the property for keeping results between configuration -->
+	   <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
+	   <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="${junit.formatter.usefile}" extension="-${jboss-junit-configuration}.xml" />
+
+		<batchtest todir="${build.reports}"
+          haltonerror="${junit.batchtest.haltonerror}"
+	      haltonfailure="${junit.batchtest.haltonfailure}"
+	      fork="${junit.batchtest.fork}">
+
+	      <fileset dir="${build.classes}">
+	         <patternset refid="${cluster.datagrid.includes.refid}"/>
+	         <patternset refid="${cluster.datagrid.excludes.refid}"/>
+	      </fileset>
+	   </batchtest>
+	</junit>
+  </target>
+	
 </project>

Modified: branches/JBPAPP_5_1_datagrid/testsuite/imports/server-config.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/imports/server-config.xml	2010-10-18 20:53:46 UTC (rev 108641)
+++ branches/JBPAPP_5_1_datagrid/testsuite/imports/server-config.xml	2010-10-18 20:59:44 UTC (rev 108642)
@@ -1396,6 +1396,31 @@
        <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
        <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
     </server>
+    <!-- <server name="datagrid-0" host="${node0}" hasWebServer="false"> -->
+    <server name="datagrid-0" host="${node0}">
+       <jvmarg value="-Xms128m" />
+       <jvmarg value="-Xmx512m" />
+       <jvmarg value="-XX:MaxPermSize=512m" />
+       <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
+       <jvmarg value="-XX:-UseGCOverheadLimit" />
+       <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
+       <sysproperty key="java.net.preferIPv4Stack" value="true" />
+       <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
+       <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
+    </server>
+    <!-- <server name="datagrid-1" host="${node1}"  hasWebServer="false"> -->
+    <server name="datagrid-1" host="${node1}">
+       <jvmarg value="-Xms128m" />
+       <jvmarg value="-Xmx512m" />
+       <jvmarg value="-XX:MaxPermSize=512m" />
+       <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
+       <jvmarg value="-XX:-UseGCOverheadLimit" />
+       <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
+       <sysproperty key="java.net.preferIPv4Stack" value="true" />
+       <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
+       <sysproperty key="xb.builder.useUnorderedSequence" value="true" />
+    </server>
+   	
    </server:config>
 
     <!-- A macro for printing sleep before going into sleep

Added: branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/HotRodClientTestCase.java
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/HotRodClientTestCase.java	                        (rev 0)
+++ branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/HotRodClientTestCase.java	2010-10-18 20:59:44 UTC (rev 108642)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.cluster.datagrid.test;
+
+import java.util.Properties;
+import org.jboss.test.JBossClusteredTestCase;
+import junit.framework.Test;
+
+/**
+ * Tests for the HotRod client..
+ *
+ * @author <a href="mailto:richard.achmatowicz at jboss.com">Richard Achmatowicz</a>
+ * @version $Revision: $
+ */
+public class HotRodClientTestCase
+   extends JBossClusteredTestCase
+{
+   
+   public HotRodClientTestCase(String name)
+   {
+      super(name);
+   }
+
+   /*
+    * Do we need a deployment for HotRod test cases?
+    *  
+   public static Test suite()
+      throws Exception
+   {
+      return JBossClusteredTestCase.getDeploySetup(HAInvokerUnitTestCase.class, "ha-invoker.sar");
+   }
+   */
+
+   public void testHotRodClient()
+      throws Exception
+   {
+	   getLog().debug("testHotRodClient"); 
+   }
+
+}
\ No newline at end of file

Modified: branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/jmx/shutdown/ExitOnShutdown.java
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/jmx/shutdown/ExitOnShutdown.java	2010-10-18 20:53:46 UTC (rev 108641)
+++ branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/jmx/shutdown/ExitOnShutdown.java	2010-10-18 20:59:44 UTC (rev 108642)
@@ -39,12 +39,15 @@
 {
    protected void startService() throws Exception
    {
+	   System.out.println("deploying shutdown.sar") ;
       InitialContext ctx = new InitialContext();
       ctx.bind("ExitOnShutdown", Boolean.TRUE);
    }
 
    protected void stopService() throws Exception
    {
+	   System.out.println("undeploying shutdown.sar") ;
+
       Thread thread = new Thread(new Runnable()
       {
          public void run()

Added: branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/infinispan-configuration.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/infinispan-configuration.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/infinispan-configuration.xml	2010-10-18 20:59:44 UTC (rev 108642)
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<infinispan
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="urn:infinispan:config:4.0 http://www.infinispan.org/schemas/infinispan-config-4.0.xsd"
+      xmlns="urn:infinispan:config:4.0">
+
+   <!-- *************************** -->
+   <!-- System-wide global settings -->
+   <!-- *************************** -->
+
+   <global>
+
+      <!-- Note that if these are left blank, defaults are used.  See the user guide for what these defaults are -->
+      <asyncListenerExecutor factory="org.infinispan.executors.DefaultExecutorFactory">
+         <properties>
+         	<property name="maxThreads" value="5"/>
+         	<property name="threadNamePrefix" value="AsyncListenerThread"/>
+         </properties>
+      </asyncListenerExecutor>
+
+      <asyncTransportExecutor factory="org.infinispan.executors.DefaultExecutorFactory">
+         <properties>
+         	<property name="maxThreads" value="25"/>
+         	<property name="threadNamePrefix" value="AsyncSerializationThread"/>
+         </properties>
+      </asyncTransportExecutor>
+
+      <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+         <properties>
+         	<property name="threadNamePrefix" value="EvictionThread"/>
+         </properties>
+      </evictionScheduledExecutor>
+
+      <replicationQueueScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+         <properties>
+         	<property name="threadNamePrefix" value="ReplicationQueueThread"/>
+         </properties>
+      </replicationQueueScheduledExecutor>
+
+      <globalJmxStatistics enabled="true" jmxDomain="infinispan"/>
+
+      <!--
+         If the transport is omitted, there is no way to create distributed or clustered caches.
+         There is no added cost to defining a transport but not creating a cache that uses one, since the transport
+         is created and initialized lazily.
+      -->
+      <transport clusterName="infinispan-cluster" distributedSyncTimeout="50000" nodeName="Jalapeno" 
+      			transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport">
+      	<properties>
+      		<property name="configurationFile" value="jgroups-udp.xml"/>
+      	</properties>
+      </transport>
+
+
+      <!-- Again, sensible defaults are used here if this is omitted.  -->
+      <serialization marshallerClass="org.infinispan.marshall.VersionAwareMarshaller" version="1.0"/>
+
+      <!--
+         Used to register JVM shutdown hooks.
+         hookBehavior: DEFAULT, REGISTER, DONT_REGISTER
+      -->
+      <shutdown hookBehavior="DEFAULT"/>
+   </global>
+
+   <!-- *************************** -->
+   <!-- Default "template" settings -->
+   <!-- *************************** -->
+   <!-- this is used as a "template" configuration for all caches in the system. -->
+   <default>
+      <!--
+         isolation levels supported: READ_COMMITTED and REPEATABLE_READ
+      -->
+      <locking
+            isolationLevel="REPEATABLE_READ"
+            lockAcquisitionTimeout="20000"
+            writeSkewCheck="false"
+            concurrencyLevel="500"
+            useLockStriping="true"
+            />
+
+      <!--
+      Used to register a transaction manager and participate in ongoing transactions.
+      -->
+      <transaction
+            transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
+            syncRollbackPhase="false"
+            syncCommitPhase="false"
+            useEagerLocking="false"/>
+
+      <!--
+      Used to register JMX statistics in any available MBean server
+      -->
+      <jmxStatistics enabled="false"/>
+
+      <lazyDeserialization enabled="false"/>
+
+      <!--
+         Used to enable invocation batching and allow the use of Cache.startBatch()/endBatch() methods.
+      -->
+      <invocationBatching enabled="false"/>
+
+      <!--
+         This element specifies that the cache is clustered.
+         modes supported: distribution (d), replication (r) or invalidation (i).
+      -->
+      <clustering mode="replication">
+
+         <!--
+            Defines whether to retrieve state on startup
+         -->
+         <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+
+         <!--
+            Network calls are synchronous.
+         -->
+         <sync replTimeout="20000"/>
+         <!--
+            Uncomment this for async replication.
+         -->
+         <!--<async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500"/>-->
+      </clustering>
+
+   </default>
+
+   <!-- ************************************** -->
+   <!-- Individually configured "named" caches -->
+   <!-- ************************************** -->
+
+   <namedCache name="asyncCache">
+      <clustering mode="replication">
+         <async asyncMarshalling="true"/>
+      </clustering>
+   </namedCache>
+
+   <!-- Note that any of the elements appearing in a namedCache section can also appear in the default section as a template. -->
+   <namedCache name="evictionCache">
+
+      <!--
+         Eviction configuration.  WakeupInterval defines how often the eviction thread runs, in milliseconds.  0 means
+         the eviction thread will never run.  A separate executor is used for eviction in each cache.
+      -->
+      <eviction wakeUpInterval="500" maxEntries="5000" strategy="FIFO"  threadPolicy="PIGGYBACK"/>
+      <expiration lifespan="60000" maxIdle="1000"/>
+   </namedCache>
+
+
+   <namedCache name="persistentCache">
+      <!--
+            Cache loaders.
+
+            If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted.  Similarly, when the state
+            is accessed again, it is removed from the cache loaderold and loaded into memory.
+
+            Otherwise, state is always maintained in the cache loaderold as well as in memory.
+
+            Set 'shared' to true if all instances in the cluster use the same cache loaderold instance, e.g., are talking to the
+            same database.
+
+            If "preload" is true, all keys are loaded from the cache loaderold into memory upon starting the cache.
+         -->
+      <loaders passivation="false" shared="false" preload="true">
+
+         <!--
+            We can have multiple cache loaders, which get chained
+         -->
+         <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
+                 ignoreModifications="true" purgeOnStartup="true">
+
+            <!-- See the documentation for more configuration examples and flags. -->
+            <properties>
+               <property name="location" value="${java.io.tmpdir}"/>
+            </properties>
+            <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
+            <async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
+         </loader>
+      </loaders>
+
+      <deadlockDetection enabled="true" spinDuration="1000"/>
+
+   </namedCache>
+
+   <namedCache name="distributedCache">
+      <clustering mode="distribution">
+         <sync/>
+         <!--
+            num owners: number of owners for each key.  The larger this number is, the safer your data will be, but the
+                        slower the cluster will be.
+
+            rehashRpcTimeout: timeout used for RPC calls relating to rehashing.  This defaults to 600000 (10 minutes).
+         -->
+         <hash numOwners="3" rehashWait="120000" rehashRpcTimeout="600000"/>
+         <l1 enabled="true" lifespan="600000"/>
+      </clustering>
+   </namedCache>
+
+   <namedCache name="withReplicatinQueue">
+      <clustering>
+         <async useReplQueue="true" replQueueInterval="100" replQueueMaxElements="200"/>
+      </clustering>
+   </namedCache>
+
+   <namedCache name="lockPerEntry">
+      <locking useLockStriping="false" />
+   </namedCache>
+
+   <namedCache name="cacheWithCustomInterceptors">
+      <!--
+      Define custom interceptors.  All custom interceptors need to extend org.jboss.cache.interceptors.base.CommandInterceptor
+      -->
+      <!--
+      <customInterceptors>
+         <interceptor position="first" class="com.mycompany.CustomInterceptor1">
+            <property name="com.mycompany.attributeOne" value="value1" />
+            <property name="com.mycompany.attributeTwo" value="value2" />
+         </interceptor>
+         <interceptor position="last" class="com.mycompany.CustomInterceptor2"/>
+         <interceptor index="3" class="com.mycompany.CustomInterceptor1"/>
+         <interceptor before="org.infinispanpan.interceptors.CallInterceptor" class="com.mycompany.CustomInterceptor2"/>
+         <interceptor after="org.infinispanpan.interceptors.CallInterceptor" class="com.mycompany.CustomInterceptor1"/>
+      </customInterceptors>
+      -->
+   </namedCache>
+</infinispan>

Added: branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/udp.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/udp.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-0/deploy/datagrid.sar/META-INF/udp.xml	2010-10-18 20:59:44 UTC (rev 108642)
@@ -0,0 +1,57 @@
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups file:schema/JGroups-2.8.xsd">
+   <UDP
+         mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
+         mcast_port="${jgroups.udp.mcast_port:46655}"
+         tos="8"
+         ucast_recv_buf_size="20000000"
+         ucast_send_buf_size="640000"
+         mcast_recv_buf_size="25000000"
+         mcast_send_buf_size="640000"
+         loopback="true"
+         discard_incompatible_packets="true"
+         max_bundle_size="64000"
+         max_bundle_timeout="30"
+         ip_ttl="${jgroups.udp.ip_ttl:2}"
+         enable_bundling="true"
+         enable_diagnostics="false"
+
+         thread_naming_pattern="pl"
+
+         thread_pool.enabled="true"
+         thread_pool.min_threads="2"
+         thread_pool.max_threads="30"
+         thread_pool.keep_alive_time="5000"
+         thread_pool.queue_enabled="false"
+         thread_pool.queue_max_size="100"
+         thread_pool.rejection_policy="Discard"
+
+         oob_thread_pool.enabled="true"
+         oob_thread_pool.min_threads="2"
+         oob_thread_pool.max_threads="30"
+         oob_thread_pool.keep_alive_time="5000"
+         oob_thread_pool.queue_enabled="false"
+         oob_thread_pool.queue_max_size="100"
+         oob_thread_pool.rejection_policy="Discard"
+         />
+
+   <PING timeout="3000" num_initial_members="3"/>
+   <MERGE2 max_interval="30000" min_interval="10000"/>
+   <FD_SOCK/>
+   <FD_ALL/>
+   <BARRIER />
+   <pbcast.NAKACK use_stats_for_retransmission="false"
+                   exponential_backoff="0"
+                   use_mcast_xmit="true" gc_lag="0"
+                   retransmit_timeout="300,600,1200"
+                   discard_delivered_msgs="true"/>
+   <UNICAST timeout="300,600,1200"/>
+   <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="1000000"/>
+   <pbcast.GMS print_local_addr="false" join_timeout="3000" view_bundling="true"/>
+   <FC max_credits="500000" min_threshold="0.20"/>
+   <FRAG2 frag_size="60000"  />
+   <pbcast.STREAMING_STATE_TRANSFER/>
+   <!-- <pbcast.STATE_TRANSFER/> -->
+   <pbcast.FLUSH timeout="0"/>
+</config>

Added: branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/infinispan-configuration.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/infinispan-configuration.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/infinispan-configuration.xml	2010-10-18 20:59:44 UTC (rev 108642)
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<infinispan
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="urn:infinispan:config:4.0 http://www.infinispan.org/schemas/infinispan-config-4.0.xsd"
+      xmlns="urn:infinispan:config:4.0">
+
+   <!-- *************************** -->
+   <!-- System-wide global settings -->
+   <!-- *************************** -->
+
+   <global>
+
+      <!-- Note that if these are left blank, defaults are used.  See the user guide for what these defaults are -->
+      <asyncListenerExecutor factory="org.infinispan.executors.DefaultExecutorFactory">
+         <properties>
+         	<property name="maxThreads" value="5"/>
+         	<property name="threadNamePrefix" value="AsyncListenerThread"/>
+         </properties>
+      </asyncListenerExecutor>
+
+      <asyncTransportExecutor factory="org.infinispan.executors.DefaultExecutorFactory">
+         <properties>
+         	<property name="maxThreads" value="25"/>
+         	<property name="threadNamePrefix" value="AsyncSerializationThread"/>
+         </properties>
+      </asyncTransportExecutor>
+
+      <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+         <properties>
+         	<property name="threadNamePrefix" value="EvictionThread"/>
+         </properties>
+      </evictionScheduledExecutor>
+
+      <replicationQueueScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+         <properties>
+         	<property name="threadNamePrefix" value="ReplicationQueueThread"/>
+         </properties>
+      </replicationQueueScheduledExecutor>
+
+      <globalJmxStatistics enabled="true" jmxDomain="infinispan"/>
+
+      <!--
+         If the transport is omitted, there is no way to create distributed or clustered caches.
+         There is no added cost to defining a transport but not creating a cache that uses one, since the transport
+         is created and initialized lazily.
+      -->
+      <transport clusterName="infinispan-cluster" distributedSyncTimeout="50000" nodeName="Jalapeno" 
+      			transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport">
+      	<properties>
+      		<property name="configurationFile" value="jgroups-udp.xml"/>
+      	</properties>
+      </transport>
+
+      <!-- Again, sensible defaults are used here if this is omitted.  -->
+      <serialization marshallerClass="org.infinispan.marshall.VersionAwareMarshaller" version="1.0"/>
+
+      <!--
+         Used to register JVM shutdown hooks.
+         hookBehavior: DEFAULT, REGISTER, DONT_REGISTER
+      -->
+      <shutdown hookBehavior="DEFAULT"/>
+   </global>
+
+   <!-- *************************** -->
+   <!-- Default "template" settings -->
+   <!-- *************************** -->
+   <!-- this is used as a "template" configuration for all caches in the system. -->
+   <default>
+      <!--
+         isolation levels supported: READ_COMMITTED and REPEATABLE_READ
+      -->
+      <locking
+            isolationLevel="REPEATABLE_READ"
+            lockAcquisitionTimeout="20000"
+            writeSkewCheck="false"
+            concurrencyLevel="500"
+            useLockStriping="true"
+            />
+
+      <!--
+      Used to register a transaction manager and participate in ongoing transactions.
+      -->
+      <transaction
+            transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
+            syncRollbackPhase="false"
+            syncCommitPhase="false"
+            useEagerLocking="false"/>
+
+      <!--
+      Used to register JMX statistics in any available MBean server
+      -->
+      <jmxStatistics enabled="false"/>
+
+      <lazyDeserialization enabled="false"/>
+
+      <!--
+         Used to enable invocation batching and allow the use of Cache.startBatch()/endBatch() methods.
+      -->
+      <invocationBatching enabled="false"/>
+
+      <!--
+         This element specifies that the cache is clustered.
+         modes supported: distribution (d), replication (r) or invalidation (i).
+      -->
+      <clustering mode="replication">
+
+         <!--
+            Defines whether to retrieve state on startup
+         -->
+         <stateRetrieval timeout="20000" fetchInMemoryState="false"/>
+
+         <!--
+            Network calls are synchronous.
+         -->
+         <sync replTimeout="20000"/>
+         <!--
+            Uncomment this for async replication.
+         -->
+         <!--<async useReplQueue="true" replQueueInterval="10000" replQueueMaxElements="500"/>-->
+      </clustering>
+
+   </default>
+
+   <!-- ************************************** -->
+   <!-- Individually configured "named" caches -->
+   <!-- ************************************** -->
+
+   <namedCache name="asyncCache">
+      <clustering mode="replication">
+         <async asyncMarshalling="true"/>
+      </clustering>
+   </namedCache>
+
+   <!-- Note that any of the elements appearing in a namedCache section can also appear in the default section as a template. -->
+   <namedCache name="evictionCache">
+
+      <!--
+         Eviction configuration.  WakeupInterval defines how often the eviction thread runs, in milliseconds.  0 means
+         the eviction thread will never run.  A separate executor is used for eviction in each cache.
+      -->
+      <eviction wakeUpInterval="500" maxEntries="5000" strategy="FIFO"  threadPolicy="PIGGYBACK"/>
+      <expiration lifespan="60000" maxIdle="1000"/>
+   </namedCache>
+
+
+   <namedCache name="persistentCache">
+      <!--
+            Cache loaders.
+
+            If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted.  Similarly, when the state
+            is accessed again, it is removed from the cache loaderold and loaded into memory.
+
+            Otherwise, state is always maintained in the cache loaderold as well as in memory.
+
+            Set 'shared' to true if all instances in the cluster use the same cache loaderold instance, e.g., are talking to the
+            same database.
+
+            If "preload" is true, all keys are loaded from the cache loaderold into memory upon starting the cache.
+         -->
+      <loaders passivation="false" shared="false" preload="true">
+
+         <!--
+            We can have multiple cache loaders, which get chained
+         -->
+         <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
+                 ignoreModifications="true" purgeOnStartup="true">
+
+            <!-- See the documentation for more configuration examples and flags. -->
+            <properties>
+               <property name="location" value="${java.io.tmpdir}"/>
+            </properties>
+            <singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
+            <async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
+         </loader>
+      </loaders>
+
+      <deadlockDetection enabled="true" spinDuration="1000"/>
+
+   </namedCache>
+
+   <namedCache name="distributedCache">
+      <clustering mode="distribution">
+         <sync/>
+         <!--
+            num owners: number of owners for each key.  The larger this number is, the safer your data will be, but the
+                        slower the cluster will be.
+
+            rehashRpcTimeout: timeout used for RPC calls relating to rehashing.  This defaults to 600000 (10 minutes).
+         -->
+         <hash numOwners="3" rehashWait="120000" rehashRpcTimeout="600000"/>
+         <l1 enabled="true" lifespan="600000"/>
+      </clustering>
+   </namedCache>
+
+   <namedCache name="withReplicatinQueue">
+      <clustering>
+         <async useReplQueue="true" replQueueInterval="100" replQueueMaxElements="200"/>
+      </clustering>
+   </namedCache>
+
+   <namedCache name="lockPerEntry">
+      <locking useLockStriping="false" />
+   </namedCache>
+
+   <namedCache name="cacheWithCustomInterceptors">
+      <!--
+      Define custom interceptors.  All custom interceptors need to extend org.jboss.cache.interceptors.base.CommandInterceptor
+      -->
+      <!--
+      <customInterceptors>
+         <interceptor position="first" class="com.mycompany.CustomInterceptor1">
+            <property name="com.mycompany.attributeOne" value="value1" />
+            <property name="com.mycompany.attributeTwo" value="value2" />
+         </interceptor>
+         <interceptor position="last" class="com.mycompany.CustomInterceptor2"/>
+         <interceptor index="3" class="com.mycompany.CustomInterceptor1"/>
+         <interceptor before="org.infinispanpan.interceptors.CallInterceptor" class="com.mycompany.CustomInterceptor2"/>
+         <interceptor after="org.infinispanpan.interceptors.CallInterceptor" class="com.mycompany.CustomInterceptor1"/>
+      </customInterceptors>
+      -->
+   </namedCache>
+</infinispan>

Added: branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/udp.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/udp.xml	                        (rev 0)
+++ branches/JBPAPP_5_1_datagrid/testsuite/src/resources/test-configs/datagrid-1/deploy/datagrid.sar/META-INF/udp.xml	2010-10-18 20:59:44 UTC (rev 108642)
@@ -0,0 +1,57 @@
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups file:schema/JGroups-2.8.xsd">
+   <UDP
+         mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
+         mcast_port="${jgroups.udp.mcast_port:46655}"
+         tos="8"
+         ucast_recv_buf_size="20000000"
+         ucast_send_buf_size="640000"
+         mcast_recv_buf_size="25000000"
+         mcast_send_buf_size="640000"
+         loopback="true"
+         discard_incompatible_packets="true"
+         max_bundle_size="64000"
+         max_bundle_timeout="30"
+         ip_ttl="${jgroups.udp.ip_ttl:2}"
+         enable_bundling="true"
+         enable_diagnostics="false"
+
+         thread_naming_pattern="pl"
+
+         thread_pool.enabled="true"
+         thread_pool.min_threads="2"
+         thread_pool.max_threads="30"
+         thread_pool.keep_alive_time="5000"
+         thread_pool.queue_enabled="false"
+         thread_pool.queue_max_size="100"
+         thread_pool.rejection_policy="Discard"
+
+         oob_thread_pool.enabled="true"
+         oob_thread_pool.min_threads="2"
+         oob_thread_pool.max_threads="30"
+         oob_thread_pool.keep_alive_time="5000"
+         oob_thread_pool.queue_enabled="false"
+         oob_thread_pool.queue_max_size="100"
+         oob_thread_pool.rejection_policy="Discard"
+         />
+
+   <PING timeout="3000" num_initial_members="3"/>
+   <MERGE2 max_interval="30000" min_interval="10000"/>
+   <FD_SOCK/>
+   <FD_ALL/>
+   <BARRIER />
+   <pbcast.NAKACK use_stats_for_retransmission="false"
+                   exponential_backoff="0"
+                   use_mcast_xmit="true" gc_lag="0"
+                   retransmit_timeout="300,600,1200"
+                   discard_delivered_msgs="true"/>
+   <UNICAST timeout="300,600,1200"/>
+   <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="1000000"/>
+   <pbcast.GMS print_local_addr="false" join_timeout="3000" view_bundling="true"/>
+   <FC max_credits="500000" min_threshold="0.20"/>
+   <FRAG2 frag_size="60000"  />
+   <pbcast.STREAMING_STATE_TRANSFER/>
+   <!-- <pbcast.STATE_TRANSFER/> -->
+   <pbcast.FLUSH timeout="0"/>
+</config>



More information about the jboss-cvs-commits mailing list