[jboss-svn-commits] JBL Code SVN: r11753 - in labs/jbossesb/workspace/dbevenius/product: core/listeners/tests/resources/etc and 6 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue May 8 12:04:02 EDT 2007


Author: beve
Date: 2007-05-08 12:04:02 -0400 (Tue, 08 May 2007)
New Revision: 11753

Added:
   labs/jbossesb/workspace/dbevenius/product/lib/ext/jgroups-all.jar
Removed:
   labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/resources/etc/ftpfile_cache_test.xml
   labs/jbossesb/workspace/dbevenius/product/lib/ext/jgroups.jar
Modified:
   labs/jbossesb/workspace/dbevenius/product/.classpath
   labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener_ReadOnlyStrategyUnitTest.java
   labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/ReadOnlyRemoteFileSystemStrategyTest.java
   labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/FtpFileCacheTest.java
   labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/ftpfile_cache_test.xml
   labs/jbossesb/workspace/dbevenius/product/etc/test/resources/log4j/dev/log4j.xml
   labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/build.xml
   labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml
   labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-readonly-unfiltered.xml
   labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml
Log:
Fixed the issue with not being able to specify localhost in the jboss cache configuration.
Updated the helloworld_ftp_action quickstart. 


Modified: labs/jbossesb/workspace/dbevenius/product/.classpath
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/.classpath	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/.classpath	2007-05-08 16:04:02 UTC (rev 11753)
@@ -88,6 +88,6 @@
 	<classpathentry kind="lib" path="services/jbpm/lib/ext/jbpm-identity.jar"/>
 	<classpathentry kind="lib" path="services/jbpm/lib/ext/jbpm-jpdl.jar"/>
 	<classpathentry kind="lib" path="lib/ext/cache.jar"/>
-	<classpathentry kind="lib" path="lib/ext/jgroups.jar"/>
+	<classpathentry kind="lib" path="lib/ext/jgroups-all.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Deleted: labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/resources/etc/ftpfile_cache_test.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/resources/etc/ftpfile_cache_test.xml	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/resources/etc/ftpfile_cache_test.xml	2007-05-08 16:04:02 UTC (rev 11753)
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-
-    <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
-
-    <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
-
-        <depends>jboss:service=Naming</depends>
-        <depends>jboss:service=TransactionManager</depends>
-
-        <!-- Configure the TransactionManager -->
-        <attribute name="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute>
-
-        <!-- Isolation level : SERIALIZABLE REPEATABLE_READ (default) READ_COMMITTED READ_UNCOMMITTED NONE -->
-        <!--attribute name="IsolationLevel">REPEATABLE_READ</attribute-->
-        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
-        <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC -->
-        <attribute name="CacheMode">REPL_SYNC</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">FtpFileCache-Cluster</attribute>
-
-        <attribute name="ClusterConfig">
-            <config>
-                <UDP mcast_addr="228.1.2.3" mcast_port="48866" 
-					bind_addr="10.36.17.27"
-                    ip_ttl="64" ip_mcast="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="2" 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 -->
-        <attribute name="FetchStateOnStartup">true</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">10000</attribute>
-
-        <!--
-            Number of milliseconds to wait until all responses for a
-            synchronous call have been received.
-        -->
-        <attribute name="SyncReplTimeout">10000</attribute>
-
-        <!-- Max number of milliseconds to wait for a lock acquisition -->
-        <attribute name="LockAcquisitionTimeout">15000</attribute>
-
-
-        <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
-		<attribute name="EvictionPolicyConfig">
-			<config>
-				<attribute name="wakeUpIntervalSeconds">30</attribute>
-				<!-- Cache wide default -->
-				<region name="/_default_">
-				<attribute name="maxNodes">5000</attribute>
-				<attribute name="timeToLiveSeconds">1000</attribute>
-				</region>
-				<region name="/ftp/cache">
-					<attribute name="maxNodes">5000</attribute>
-					<attribute name="timeToLiveSeconds">1000</attribute>
-					<attribute name="maxAgeSeconds">86400</attribute>
-		      </region>
-		   </config>
-		</attribute>
-		
-		<attribute name="CacheLoaderConfiguration">
-	        <config>
-				<!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
-				<passivation>false</passivation>
-				
-				<!-- comma delimited FQNs to preload -->
-				<preload>/ftp/cache</preload>
-				
-				<!-- are the cache loaders shared in a cluster? -->
-				<shared>false</shared>
-				
-				<!-- we can now have multiple cache loaders, which get chained -->
-				<!-- the 'cacheloader' element may be repeated -->
-				<cacheloader>
-					<class>org.jboss.cache.loader.JDBCCacheLoader</class>
-					<properties>
-						cache.jdbc.driver=org.hsqldb.jdbcDriver
-						cache.jdbc.url=jdbc:hsqldb:hsql://localhost:9001/ftpcache
-						cache.jdbc.user=sa
-						cache.jdbc.password=
-					</properties>
-					<!-- whether the cache loader writes are asynchronous -->
-					<async>false</async>
-					
-					<!-- only one cache loader in the chain may set fetchPersistentState to true.
-					An exception is thrown if more than one cache loader sets this to true. -->
-					<fetchPersistentState>false</fetchPersistentState>
-					
-					<!-- determines whether this cache loader ignores writes - defaults to false. -->
-					<ignoreModifications>false</ignoreModifications>
-					
-					<!-- if set to true, purges the contents of this cache loader when the cache starts u Defaults to false. -->
-					<purgeOnStartup>false</purgeOnStartup>
-					
-				</cacheloader>
-			</config>
-		</attribute>
-        
-    </mbean>
-
-
-   <!--  Uncomment to get a graphical view of the TreeCache MBean above -->
-   <!--   <mbean code="org.jboss.cache.TreeCacheView" name="jboss.cache:service=TreeCacheView">-->
-   <!--      <depends>jboss.cache:service=TreeCache</depends>-->
-   <!--      <attribute name="CacheService">jboss.cache:service=TreeCache</attribute>-->
-   <!--   </mbean>-->
-
-
-</server>

Modified: labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener_ReadOnlyStrategyUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener_ReadOnlyStrategyUnitTest.java	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/RemoteGatewayListener_ReadOnlyStrategyUnitTest.java	2007-05-08 16:04:02 UTC (rev 11753)
@@ -164,7 +164,7 @@
 	{
 		ConfigTree configTree = RemoteGatewayListenerUnitTest.createConfigTree();
 		configTree.setAttribute( RemoteGatewayListener.REMOTE_FILE_SYSTEM_STRATEGY_CLASS, ReadOnlyRemoteFileSystemStrategy.class.getName());
-		configTree.setAttribute( RemoteGatewayListener.REMOTE_FILE_SYSTEM_STRATEGY_CONFIG_FILE, getCacheConfigFile() );
+		configTree.setAttribute( RemoteGatewayListener.REMOTE_FILE_SYSTEM_STRATEGY_CONFIG_FILE, getConfigFile() );
 		return configTree;
 	}
 	
@@ -175,14 +175,21 @@
 		return ftpServer;
 	}
 	
-	private static String getCacheConfigFile()
+	private static String getConfigFile()
 	{
 		String configFile = TestEnvironmentUtil.getBaseDir() + File.separator + 
 							"core" + File.separator + 
 							"listeners" + File.separator + 
 							"tests" + File.separator + 
-							"resources" + File.separator + 
-							"etc" + File.separator + 
+							"src" + File.separator + 
+							"org" + File.separator + 
+							"jboss" + File.separator + 
+							"soa" + File.separator + 
+							"esb" + File.separator + 
+							"listeners" + File.separator + 
+							"gateway" + File.separator + 
+							"remotestrategies" + File.separator + 
+							"cache" + File.separator + 
 							"ftpfile_cache_test.xml";
 		
 		if ( ! new File ( configFile ).exists() )

Modified: labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/ReadOnlyRemoteFileSystemStrategyTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/ReadOnlyRemoteFileSystemStrategyTest.java	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/ReadOnlyRemoteFileSystemStrategyTest.java	2007-05-08 16:04:02 UTC (rev 11753)
@@ -5,6 +5,7 @@
 import static org.junit.Assert.fail;
 
 import java.io.File;
+import java.net.InetAddress;
 
 import org.apache.log4j.Logger;
 import org.jboss.cache.CacheException;
@@ -23,7 +24,7 @@
  */
 public class ReadOnlyRemoteFileSystemStrategyTest
 {
-	private Logger log = Logger .getLogger( ReadOnlyRemoteFileSystemStrategyTest.class );
+	private static Logger log = Logger .getLogger( ReadOnlyRemoteFileSystemStrategyTest.class );
 	
 	private static ReadOnlyRemoteFileSystemStrategy strategy;
 
@@ -67,6 +68,7 @@
 	@Test
 	public void listFiles_With_Two_Strategy_Instances() throws Exception 
 	{
+		
 		try
 		{
 			File[] filteredFileList = strategy2.filterFileList( expectedFileList );
@@ -133,12 +135,19 @@
 	
 	private static String getConfigFile()
 	{
-		String configFile = TestEnvironmentUtil.getUserDir() + File.separator + 
+		String configFile = TestEnvironmentUtil.getBaseDir() + File.separator + 
 							"core" + File.separator + 
 							"listeners" + File.separator + 
 							"tests" + File.separator + 
-							"resources" + File.separator + 
-							"etc" + File.separator + 
+							"src" + File.separator + 
+							"org" + File.separator + 
+							"jboss" + File.separator + 
+							"soa" + File.separator + 
+							"esb" + File.separator + 
+							"listeners" + File.separator + 
+							"gateway" + File.separator + 
+							"remotestrategies" + File.separator + 
+							"cache" + File.separator + 
 							"ftpfile_cache_test.xml";
 		
 		if ( ! new File ( configFile ).exists() )
@@ -146,4 +155,5 @@
 		
 		return configFile;
 	}
+	
 }

Modified: labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/FtpFileCacheTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/FtpFileCacheTest.java	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/FtpFileCacheTest.java	2007-05-08 16:04:02 UTC (rev 11753)
@@ -112,8 +112,15 @@
 							"core" + File.separator + 
 							"listeners" + File.separator + 
 							"tests" + File.separator + 
-							"resources" + File.separator + 
-							"etc" + File.separator + 
+							"src" + File.separator + 
+							"org" + File.separator + 
+							"jboss" + File.separator + 
+							"soa" + File.separator + 
+							"esb" + File.separator + 
+							"listeners" + File.separator + 
+							"gateway" + File.separator + 
+							"remotestrategies" + File.separator + 
+							"cache" + File.separator + 
 							"ftpfile_cache_test.xml";
 		
 		if ( ! new File ( configFile ).exists() )

Modified: labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/ftpfile_cache_test.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/ftpfile_cache_test.xml	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/remotestrategies/cache/ftpfile_cache_test.xml	2007-05-08 16:04:02 UTC (rev 11753)
@@ -37,7 +37,9 @@
         <attribute name="ClusterConfig">
             <config>
                 <UDP mcast_addr="228.1.2.3" mcast_port="48866" 
-					bind_addr="10.36.17.27"
+					bind_addr="localhost"
+					receive_on_all_interfaces="true"
+					send_on_all_interfaces="true"
                     ip_ttl="64" ip_mcast="true" 
                     mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
                     ucast_send_buf_size="150000" ucast_recv_buf_size="80000"

Modified: labs/jbossesb/workspace/dbevenius/product/etc/test/resources/log4j/dev/log4j.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/etc/test/resources/log4j/dev/log4j.xml	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/etc/test/resources/log4j/dev/log4j.xml	2007-05-08 16:04:02 UTC (rev 11753)
@@ -77,7 +77,7 @@
    </category>
 	
    <category name="org.jboss.cache">
-      <priority value="WARN"/>
+      <priority value="INFO"/>
    </category>
 
    <!-- Limit the jacorb category to WARN as its INFO is verbose -->

Added: labs/jbossesb/workspace/dbevenius/product/lib/ext/jgroups-all.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/workspace/dbevenius/product/lib/ext/jgroups-all.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: labs/jbossesb/workspace/dbevenius/product/lib/ext/jgroups.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/build.xml	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/build.xml	2007-05-08 16:04:02 UTC (rev 11753)
@@ -7,7 +7,7 @@
 	
 	<import file="../conf/base-build.xml"/>
   
-	<target name="config">
+	<target name="config" unless="readonly.mode">
 		<antcall target="filter_jboss-esb.xml">
 				<param name="file.name" value="jboss-esb-unfiltered.xml"/>
 		</antcall>
@@ -37,14 +37,18 @@
 	
 	<target name="run-readonly" description="run the readonly version">
 		<copy file="ftpfile-cache-config.xml" todir="${basedir}/classes"/>
+		<property name="readonly.mode" value="true"/>
+		
 		<antcall target="filter_jboss-esb.xml">
 			<param name="file.name" value="${basedir}/jboss-esb-readonly-unfiltered.xml"/>
 		</antcall>
+	
 		<antcall target="run"/>
 	</target>
 	
 	
 	<target name="filter_jboss-esb.xml">
+		<echo message="${file.name}"/>
 		<copy file="${file.name}" tofile="${basedir}/jboss-esb.xml" overwrite="true" filtering="true">
 				<filterset>
 					<filter token="FTP_HOSTNAME" value="${quickstart.jbossesb.ftp.hostname}"/>

Modified: labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/ftpfile-cache-config.xml	2007-05-08 16:04:02 UTC (rev 11753)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
+<!--
+	This file is a copy of the one in core/listeners/test/resources/etc and only here
+	to test the ability to specify a configuration file relative to the classes classpath.
+-->
 <server>
 
     <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
@@ -34,7 +37,9 @@
         <attribute name="ClusterConfig">
             <config>
                 <UDP mcast_addr="228.1.2.3" mcast_port="48866" 
-					bind_addr="10.36.17.27"
+					bind_addr="localhost"
+					receive_on_all_interfaces="true"
+					send_on_all_interfaces="true"
                     ip_ttl="64" ip_mcast="true" 
                     mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
                     ucast_send_buf_size="150000" ucast_recv_buf_size="80000"

Modified: labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-readonly-unfiltered.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-readonly-unfiltered.xml	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-readonly-unfiltered.xml	2007-05-08 16:04:02 UTC (rev 11753)
@@ -49,7 +49,9 @@
             		is-gateway="true"
             		>
             		<property name="pollLatencySeconds" value="5"/> 
-            		<!--property name="remoteFileSystemStrategy-configFile" value="ftpfile_cache_test_config.xml"/--> 
+					<!-- Example of how one can specify a different configuration file for jboss cache
+            		<property name="remoteFileSystemStrategy-configFile" value="ftpfile_cache_test_config.xml"/> 
+					-->
             	</ftp-listener>
                 <jms-listener name="helloWorldFileAction"
                               busidref="quickstartEsbChannel"

Modified: labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml	2007-05-08 14:59:26 UTC (rev 11752)
+++ labs/jbossesb/workspace/dbevenius/product/samples/quickstarts/helloworld_ftp_action/jboss-esb-unfiltered.xml	2007-05-08 16:04:02 UTC (rev 11753)
@@ -7,7 +7,6 @@
           		<ftp-message-filter
           			username="@FTP_USERNAME@"
           			password="@FTP_PASSWORD@"
-					read-only="true"
           			passive="false"
           			directory="@FTP_DIRECTORY@"
           			input-suffix=".dat"
@@ -49,7 +48,6 @@
             		is-gateway="true"
             		>
             		<property name="pollLatencySeconds" value="5"/> 
-            		<!--property name="remoteFileSystemStrategy-configFile" value="ftpfile_cache_test_config.xml"/--> 
             	</ftp-listener>
                 <jms-listener name="helloWorldFileAction"
                               busidref="quickstartEsbChannel"




More information about the jboss-svn-commits mailing list