[jboss-svn-commits] JBL Code SVN: r18763 - in labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications: src/org/jboss/soa/esb/samples/quickstart/notifications and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Mar 7 12:36:55 EST 2008


Author: ldimaggi at redhat.com
Date: 2008-03-07 12:36:55 -0500 (Fri, 07 Mar 2008)
New Revision: 18763

Added:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/src/org/jboss/soa/esb/samples/quickstart/notifications/MyAction.java
Modified:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/jboss-esb.xml
Log:
SOA-459

Committing fix for: http://jira.jboss.com/jira/browse/SOA-459

To branch: https://svn.labs.jboss.com/labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/

Corrected reference to jbossesb.message.id property (was incorrectly listed as jboss.message.id) - added action handler to set the jbossesb.message.id property



Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/jboss-esb.xml	2008-03-07 17:12:58 UTC (rev 18762)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/jboss-esb.xml	2008-03-07 17:36:55 UTC (rev 18763)
@@ -41,6 +41,11 @@
 
             <actions>
 
+              <action name="action1" 
+                  class="org.jboss.soa.esb.samples.quickstart.notifications.MyAction"
+                  process="setIDforMessage" 
+              />
+
               <action name="notificationTest" class="org.jboss.soa.esb.actions.Notifier">
 
                  <property name="okMethod" value="notifyOK" />
@@ -99,8 +104,8 @@
 
 		       <!-- send notification to FTP server by way of file transfer -->
 		       <!-- this requires an active ftp server with appropriate user account 
-                       <target class="NotifyFTP"
-		         <ftp URL="ftp://username:pwd@server.com/remote/dir" filename="{jboss.message.id}.txt"/>
+                       <target class="NotifyFTP">
+		         < <ftp URL="ftp://username:pwd@server.com/remote/dir" filename="{jbossesb.message.id}.txt"/>
 		       </target>
 		       -->
 

Added: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/src/org/jboss/soa/esb/samples/quickstart/notifications/MyAction.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/src/org/jboss/soa/esb/samples/quickstart/notifications/MyAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/notifications/src/org/jboss/soa/esb/samples/quickstart/notifications/MyAction.java	2008-03-07 17:36:55 UTC (rev 18763)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.notifications;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Message;
+
+public class MyAction extends AbstractActionLifecycle
+{
+    
+  protected ConfigTree	_config;
+	  
+  public MyAction(ConfigTree config) { _config = config; } 
+  
+  public Message noOperation(Message message) { return message; } 
+
+  public Message setIDforMessage(Message message) throws Exception {
+System.out.println("in setID " + message.getHeader().getCall().getMessageID());
+
+	   message.getProperties().setProperty("jbossesb.message.id", message.getHeader().getCall().getMessageID());
+	   return message;
+   }
+	
+}




More information about the jboss-svn-commits mailing list