[jboss-svn-commits] JBL Code SVN: r7904 - labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 28 17:13:55 EST 2006
Author: burrsutter
Date: 2006-11-28 17:13:54 -0500 (Tue, 28 Nov 2006)
New Revision: 7904
Modified:
labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/readme.txt
Log:
Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/readme.txt 2006-11-28 21:30:21 UTC (rev 7903)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/readme.txt 2006-11-28 22:13:54 UTC (rev 7904)
@@ -23,5 +23,27 @@
<action class="quickstart.MyJMSListenerAction" process="playWithMessage" exceptionMethod="exceptionHandler" />
<action class="quickstart.MyJMSListenerAction" process="displayMessage" exceptionMethod="exceptionHandler"/>
<action class="quickstart.MyJMSListenerAction" process="noOperation" okMethod="sendResponse"/>
-The firsst three
+An exceptions that are thrown by displayMessage or playWithMessage are sent to the exceptionHandler method.
+Once all other operations/actions are complete the last line is tied to "noOperation" which simply returns
+the same message that it is sent with a call to the okMethod, in this case, sendResponse. This is because
+sendResponse doesn't intend to return the Message.
+An alternative approach could be:
+ <action class="quickstart.MyJMSListenerAction" process="sendResponse" exceptionMethod="exceptionHandler"/>
+ public Message sendResponse(Message message) {
+ try {
+ logHeader();
+ System.out.println(new String(message.getBody().getContents()));
+ logFooter();
+ ReturnJMSMessage.sendMessage(message,"quickstart_helloworld_action_Response");
+ } catch (Exception e) {
+ logHeader();
+ System.out.println(e.getMessage());
+ logFooter();
+ }
+ return message; // return exactly what was passed in.
+ }
+An ESB action class must have a constructor that accepts a ConfigTree argument like the following:
+ public MyJMSListenerAction(ConfigTree config) { _config = config; }
+
+A ConfigTree is an object holding any attributes associated with the action declaration in the esb-config.xml
More information about the jboss-svn-commits
mailing list