[jboss-svn-commits] JBL Code SVN: r8563 - in labs/jbossesb/trunk/product: core/listeners/src/org/jboss/soa/esb/listeners/gateway samples/quickstarts/helloworld_file_action

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Dec 22 14:41:34 EST 2006


Author: estebanschifman
Date: 2006-12-22 14:41:29 -0500 (Fri, 22 Dec 2006)
New Revision: 8563

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml
Modified:
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
Log:
Minor touches to make helloworld_file_action work properly

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java	2006-12-22 19:08:46 UTC (rev 8562)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java	2006-12-22 19:41:29 UTC (rev 8563)
@@ -28,6 +28,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.URI;
+import java.net.URL;
 import java.util.Collection;
 
 import org.apache.log4j.Logger;
@@ -250,7 +251,9 @@
         resolveComposerClass();
 
 	//  INPUT directory and suffix  (used for FileFilter)
-	  String sInpDir = _controller.obtainAtt(_config,ListenerTagNames.FILE_INPUT_DIR_TAG,null);
+      String url = _config.getAttribute(ListenerTagNames.URL_TAG);
+	  String sInpDir = (null!=url) ? new URL(url).getFile()
+			  : _controller.obtainAtt(_config,ListenerTagNames.FILE_INPUT_DIR_TAG,null);
       _inputDirectory = fileFromString(sInpDir);
       seeIfOkToWorkOnDir(_inputDirectory);
 

Added: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml	2006-12-22 19:08:46 UTC (rev 8562)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jbossesb.xml	2006-12-22 19:41:29 UTC (rev 8563)
@@ -0,0 +1,76 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" >
+
+    <providers>
+          <fs-provider name="FSprovider1">
+          	<fs-bus busid="helloFileChannel" >
+          		<fs-message-filter
+          			directory="/tmp/ESBInput"
+          			input-suffix=".dat"
+          			work-suffix=".esbWorking"
+          			post-delete="false"
+          			post-directory="/tmp/ESBInput"
+          			post-suffix=".sentToEsb"
+          			error-delete="false"
+          			error-directory="/tmp/ESBInput"
+          			error-suffix=".IN_ERROR"
+          		/>
+          	</fs-bus>
+          </fs-provider>
+          
+          <jms-provider name="JBossMQ" 
+          		connection-factory="ConnectionFactory"
+            	jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+            	jndi-URL="localhost" >
+            
+			    <jms-bus busid="quickstartEsbChannel">
+			        <jms-message-filter
+			            dest-type="QUEUE"
+			            dest-name="queue/A"
+			            selector="type='fromHelloworldFileAction'"
+			        />
+			    </jms-bus>
+			
+		   </jms-provider>
+
+      </providers>
+      
+      <services>
+          <service 
+          		category="myCategory" 
+          		name="TheFileGateway" 
+          		description="Hello World File Action(gateway)" 
+          		is-gateway="true"
+			 	target-service-category="myCategory"
+			    target-service-name="myFileListener"
+          		>
+              <listeners>        
+                  <fs-listener name="FileGateway"
+                              busidref="helloFileChannel"
+                              maxThreads="1"
+                  />
+                          <!-- pollLatencySeconds="10"  WHERE DOES THIS GO--> 
+              </listeners>    
+          </service>
+          
+        <service 
+			category="myCategory"
+			name="myFileListener"
+        	description="Hello World File Action (esb listener)" 
+        	is-gateway="false">
+            <listeners>
+                <jms-listener name="helloWorldFileAction"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"
+                />
+            </listeners>
+            <actions>
+                   <action name="action1" 
+                   	class="quickstart.hw_file_action.MyAction" 
+                   	process="displayMessage,playWithMessage" 
+                   	/>      
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>




More information about the jboss-svn-commits mailing list