[jboss-svn-commits] JBL Code SVN: r14955 - in labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action: src/org/jboss/soa/esb/samples/quickstart/helloworldsqlaction and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Sep 8 17:33:31 EDT 2007
Author: tcunning
Date: 2007-09-08 17:33:30 -0400 (Sat, 08 Sep 2007)
New Revision: 14955
Modified:
labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml
labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldsqlaction/MyAction.java
Log:
bug:JBESB-928
Set the data in the message body.
Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml 2007-09-08 21:30:00 UTC (rev 14954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jboss-esb.xml 2007-09-08 21:33:30 UTC (rev 14955)
@@ -50,11 +50,11 @@
/>
</listeners>
<actions>
- <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln" />
<action name="action1"
class="org.jboss.soa.esb.samples.quickstart.helloworldsqlaction.MyAction"
process="displayMessage"
- />
+ />
+ <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln" />
</actions>
</service>
Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldsqlaction/MyAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldsqlaction/MyAction.java 2007-09-08 21:30:00 UTC (rev 14954)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/src/org/jboss/soa/esb/samples/quickstart/helloworldsqlaction/MyAction.java 2007-09-08 21:33:30 UTC (rev 14955)
@@ -41,9 +41,15 @@
logHeader();
Map<String,Object> rowData =(Map)message.getProperties()
.getProperty(ListenerTagNames.SQL_ROW_DATA_TAG);
- for (Map.Entry<String,Object> curr : rowData.entrySet())
- System.out.println("column "+curr.getKey()+" = <" + curr.getValue()+">");
+ StringBuffer results = new StringBuffer();
+ for (Map.Entry<String,Object> curr : rowData.entrySet()) {
+ results.append("column "+curr.getKey()+" = <" + curr.getValue()+">");
+ }
logFooter();
+
+ // Set message properties and message body so that SystemPrintln will display message
+ message.getProperties().setProperty("jbesbfilename", "helloworldSQlAction.log");
+ message.getBody().setByteArray(results.toString().getBytes());
return message;
}
@@ -56,4 +62,4 @@
}
-}
\ No newline at end of file
+}
More information about the jboss-svn-commits
mailing list