servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r471522 [1/2] - in /incubator/servicemix/site/sm30ug: ./ basic-old.data/ bpel-example.data/ file-binding-old.data/ http-binding.data/ jms-binding.data/ quartz-binding.data/ rss-binding.data/
Date Sun, 05 Nov 2006 20:24:39 GMT
Author: chirino
Date: Sun Nov  5 12:24:38 2006
New Revision: 471522

URL: http://svn.apache.org/viewvc?view=rev&rev=471522
Log:
Latest export from confluence

Added:
    incubator/servicemix/site/sm30ug/basic-old.data/
    incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg   (with props)
    incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg.jpeg   (with props)
    incubator/servicemix/site/sm30ug/basic-old.html
    incubator/servicemix/site/sm30ug/bpel-example.data/
    incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg   (with props)
    incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg.jpeg   (with props)
    incubator/servicemix/site/sm30ug/bpel-example.html
    incubator/servicemix/site/sm30ug/examples.html
    incubator/servicemix/site/sm30ug/file-binding-old.data/
    incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg   (with props)
    incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg.jpeg   (with props)
    incubator/servicemix/site/sm30ug/file-binding-old.html
    incubator/servicemix/site/sm30ug/http-binding.data/
    incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg   (with props)
    incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg.jpeg   (with props)
    incubator/servicemix/site/sm30ug/http-binding.html
    incubator/servicemix/site/sm30ug/jms-binding.data/
    incubator/servicemix/site/sm30ug/jms-binding.data/jmsflow.jpg   (with props)
    incubator/servicemix/site/sm30ug/jms-binding.data/jmsflow.jpg.jpeg   (with props)
    incubator/servicemix/site/sm30ug/jms-binding.html
    incubator/servicemix/site/sm30ug/loan-broker-example.html
    incubator/servicemix/site/sm30ug/quartz-binding.data/
    incubator/servicemix/site/sm30ug/quartz-binding.data/quartzflow.jpg   (with props)
    incubator/servicemix/site/sm30ug/quartz-binding.data/quartzflow.jpg.jpeg   (with props)
    incubator/servicemix/site/sm30ug/quartz-binding.html
    incubator/servicemix/site/sm30ug/soap-binding-example.html
    incubator/servicemix/site/sm30ug/understanding-the-soap-binding-example.html
Modified:
    incubator/servicemix/site/sm30ug/rss-binding.data/rssflow.jpg
    incubator/servicemix/site/sm30ug/rss-binding.data/rssflow.jpg.jpeg
    incubator/servicemix/site/sm30ug/rss-binding.html
    incubator/servicemix/site/sm30ug/vfs-binding.html

Added: incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg.jpeg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg.jpeg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/basic-old.data/basicflow1.jpg.jpeg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/servicemix/site/sm30ug/basic-old.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/basic-old.html?view=auto&rev=471522
==============================================================================
--- incubator/servicemix/site/sm30ug/basic-old.html (added)
+++ incubator/servicemix/site/sm30ug/basic-old.html Sun Nov  5 12:24:38 2006
@@ -0,0 +1,239 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <LINK type="text/css" rel="stylesheet" href="resources/site.css">
+    <SCRIPT src="resources/space.js" type="text/javascript"></SCRIPT>
+    <TITLE>
+Basic old
+    </TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+
+    <!-- Banner -->
+    <DIV id="site-banner">
+    </DIV>
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-page">
+            <DIV class="wiki-content"><H3><A name="Basicold-OverviewoftheServiceMixBasicExample"></A>Overview of the ServiceMix Basic Example</H3>
+
+<P>This document describes how to run the <EM>Basic</EM> example and provides details about what it does. For information on the business use case, please refer to: <SPAN class="nobr"><A href="http://www.servicemix.org/Use%20Cases" title="Visit page outside Confluence" rel="nofollow">Use Case for Basic<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.
+<BR clear="all">
+<BR clear="all">
+The Basic example illustrates the following:</P>
+<UL>
+	<LI>use of declarative programming</LI>
+	<LI>how to use an <SPAN class="nobr"><A href="http://www.activemq.org/Spring%20Support" title="Visit page outside Confluence" rel="nofollow">ActiveMQ<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> message broker</LI>
+	<LI>how to use a <SPAN class="nobr"><A href="http://www.servicemix.org/Quartz" title="Visit page outside Confluence" rel="nofollow">Quartz<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> timer</LI>
+	<LI>how to use the <SPAN class="nobr"><A href="http://jencks.org/" title="Visit page outside Confluence" rel="nofollow">Jencks<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> JCA container</LI>
+	<LI>how to use the <SPAN class="nobr"><A href="http://geronimo.apache.org/" title="Visit page outside Confluence" rel="nofollow">Geronimo<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> Transaction Manager via the <SPAN class="nobr"><A href="http://jencks.org/Transaction%20Manager" title="Visit page outside Confluence" rel="nofollow">Jencks factory bean<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI>how to use tracing</LI>
+</UL>
+
+
+<P>The source code for the Basic example is located in the ServiceMix installation directory under the <TT>examples\basic</TT> directory in the <TT>servicemix.xml</TT> file. It is recommended that you refer to the source code while reading this document.
+<BR clear="all">
+<BR clear="all">
+There are several components in the <TT>servicemix.xml</TT>file. One component sets off a trigger to send messages to a source destination. Then those messages are consumed by another component and sent to a different output destination. A trace component displays the messages as they arrive.
+<BR clear="all">
+<BR clear="all"></P>
+
+<H3><A name="Basicold-RunningtheBasicExample"></A>Running the <EM>Basic</EM> Example</H3>
+
+<P>From a command shell, go to the Basic example directory:</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">cd [SM:servicemix_install_dir]\examples\basic</PRE>
+</DIV></DIV>
+<P><BR clear="all"></P>
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="tipMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Handy Hint</B><BR>
+<P>Note: if you are running version 3.0-M2 and experience an error like<BR>
+&nbsp;&nbsp;<EM>bla, bla, bla &apos;Bean class org.quartz.SimpleTrigger&apos; not found bla, bla, bla</EM><BR>
+you probably need to run &quot;ant setup&quot; in <TT>\examples\basic</TT> directory to download additional packages (as Quartz, Common Pools and Common Collection)</P></TD></TR></TABLE>
+<P>Then type:</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">[SM:servicemix_install_dir]\bin\servicemix servicemix.xml</PRE>
+</DIV></DIV>
+<P>where <TT>servicemix_install_dir</TT> is the directory in which ServiceMix was installed.
+<BR clear="all">
+<BR clear="all"></P>
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="tipMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Handy Hint</B><BR>
+<P>Add <EM>$SERVICEMIX_HOME\bin</EM> directory to <EM>$PATH</EM> variable to simplify execution of the example.</P></TD></TR></TABLE>
+
+<H3><A name="Basicold-StoppingtheBasicExample"></A>Stopping the <EM>Basic</EM> Example</H3>
+
+<P>To terminate the Basic example type &quot;CTRL-C&quot; in the command shell in which it is running and answer &quot;y&quot; to the &quot;Terminate batch job (y/n)?&quot; question.
+<BR clear="all"></P>
+
+<H3><A name="Basicold-HowitWorks"></A>How it Works</H3>
+
+<P>The diagram below illustrates the flow of messages through the <EM>Basic</EM> components.
+<BR clear="all">
+<BR clear="all"></P>
+<DIV class="panel" style="border-style: solid; border-color: #ccc; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #ccc; "><B>Basic Example Message Flow Diagram</B></DIV><DIV class="panelContent">
+<P><DIV align="center"><IMG src="basic-old.data/basicflow1.jpg" border="0"></DIV><BR>
+&nbsp;</P>
+</DIV></DIV>
+<P><BR clear="all">
+<BR clear="all"></P>
+
+<P>Messages flow through the components as follows:</P>
+<OL>
+	<LI>The <EM>timer</EM> component sends a message to <EM>inputSender</EM> through the Normalized Message Router (NMR).</LI>
+	<LI><EM>inputSender</EM> converts the message (marshals it) into a JMS message, then uses the <EM>jmsTemplate</EM> bean to publish the message.</LI>
+	<LI><EM>jmsTemplate</EM> uses the <EM>jmsFactory</EM>bean to get a connection to the port associated with the JMS topic called &quot;demo.org.servicemix.source.&quot; The message is published on the &quot;demo.org.servicemix.source&quot; topic.</LI>
+	<LI><EM>jencks</EM> (the JCA resource adapter) listens on port 61616 for messages.</LI>
+	<LI><EM>inputReceiver</EM> subscribes to the &quot;demo.org.servicemix.source&quot; topic via <EM>jencks</EM> and receives the JMS message.</LI>
+	<LI><EM>inputReceiver</EM> normalizes the JMS message and sends it to <EM>outputSender</EM> via the NMR.</LI>
+	<LI><EM>outputSender</EM> marshals the normalized message to a JMS message and uses <EM>jmsTemplate</EM> to publish the message on the &quot;demo.org.servicemix.result&quot; topic.</LI>
+	<LI><EM>jmsTemplate</EM> publishes it on the &quot;demo.org.servicemix.result&quot; topic using <EM>jmsFactory</EM> to get a connection to the result topic.</LI>
+	<LI><EM>jencks</EM> listens on port 61616 for messages.</LI>
+	<LI><EM>jmsTrace</EM> subscribes to the &quot;demo.org.servicemix.result&quot; topic and receives the JMS message via <EM>jencks</EM>.</LI>
+	<LI><EM>jmsTrace</EM> converts the JMS message into a normalized message and sends it to <EM>trace</EM> via the NMR.</LI>
+	<LI><EM>trace</EM> transforms the normalized message into a string and logs it to the console.
+<BR clear="all"></LI>
+</OL>
+
+
+<P>Every 5 seconds logging information is written to the console, followed by information from the trace component. Note, that the triggers&apos; property values of &quot;name&quot;, &quot;My Example Job&quot;, &quot;group&quot;, and &quot;ServiceMix&quot; are displayed along with a timestamp. Typical output looks like the following:
+<BR clear="all"></P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">[SM:INFO] TraceComponent - -Exchange: org.servicemix.jbi.messaging.InOnlyImpl@4fdf11 received IN message:
+org.servicemix.jbi.messaging.NormalizedMessageImpl@1be0369{properties: {org.servicemix.jms.message=ACTIVEMQ_TEXT_MESSAGE:
+id = 0 ActiveMQMessage{ , jmsMessageID = <SPAN class="code-keyword">null</SPAN>, bodyAsBytes = org.activemq.io.util.ByteArray@1d1fc02,
+readOnlyMessage = <SPAN class="code-keyword">true</SPAN>, jmsClientID = &apos;ID:Lisas-2828-1126207917359-23:0&apos; ,
+ jmsCorrelationID = &apos;<SPAN class="code-keyword">null</SPAN>&apos; , jmsDestination = demo.org.servicemix.result, jmsReplyTo = <SPAN class="code-keyword">null</SPAN>, jmsDeliveryMode = 2,
+ jmsRedelivered = <SPAN class="code-keyword">false</SPAN>, jmsType = &apos;<SPAN class="code-keyword">null</SPAN>&apos; , jmsExpiration = 0, jmsPriority = 4, jmsTime
+stamp = 1126207938593, properties = {}, readOnlyProperties = <SPAN class="code-keyword">true</SPAN>, entryBrokerName = &apos;ID:Lisas-2828-1126207917359-0:0&apos; ,
+entryClusterName = &apos;<SPAN class="code-keyword">default</SPAN>&apos; , consumerNos = [0], transactionId = &apos;<SPAN class="code-keyword">null</SPAN>&apos; , xaTransacted = <SPAN class="code-keyword">false</SPAN>,
+consumerIdentifer = &apos;ID:Lisas-2828-1126207917359-14:0&apos; , messageConsumed = <SPAN class="code-keyword">false</SPAN>, transientConsumed = <SPAN class="code-keyword">true</SPAN>,
+sequenceNumber = 7, deliveryCount = 1, dispatchedFromDLQ = <SPAN class="code-keyword">false</SPAN>, messageAcknowledge = org.activemq.ActiveMQSession@1de7497,
+jmsMessageIdentity = <SPAN class="code-keyword">null</SPAN>, producerKey = ID:Lisas-2828-1126207917359-29: }, text = &lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN> encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN>?&gt;
+&lt;timer&gt;&lt;name&gt;My Example Job&lt;/name&gt;&lt;group&gt;ServiceMix&lt;/group&gt;&lt;fullname&gt;ServiceMix.My Example Job&lt;/fullname&gt;&lt;description/&gt;&lt;fireTime&gt;
+Thu Sep 08 12:32:18 PDT 2005&lt;/fireTime&gt;&lt;/timer&gt;}}</PRE>
+</DIV></DIV>
+
+<H3><A name="Basicold-Details"></A>Details</H3>
+
+<P>The following table provides more details about the function of each component and bean in the servicemix.xml file.
+<BR clear="all">
+<BR clear="all"></P>
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Component or Bean ID </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>jbi</EM> </TD>
+<TD class="confluenceTd"> <EM>jbi</EM> is the &quot;id&quot; of the JBI container and provides the basic infrastructure services for the following components: <EM>timer</EM>, <EM>inputSender</EM>, <EM>inputReceiver</EM>, <EM>outputSender</EM>, <EM>jmsTrace</EM>, and <EM>trace</EM>.  During initialization, several singletons are instantiated: <EM>transactionManager</EM>, <EM>broker</EM>, <EM>jencks</EM>, <EM>jmsFactory</EM>, and <EM>jbi</EM>. After initialization, the components in the <EM>jbi</EM> container are activated, starting with the <EM>timer</EM> component. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>timer</EM> </TD>
+<TD class="confluenceTd"> The <EM>timer</EM> component shows the use of the QuartzComponent class. Every 5 seconds, until the program is terminated, the timer component kicks off an instance of a SimpleTrigger, which is associated with an instance of JobDetail. The job has a property called &quot;name&quot; with a value of &quot;My Example Job&quot; and another property called &quot;group&quot; with a value of &quot;ServiceMix.&quot; The resulting message is converted to a normalized message and routed through the NMR. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>inputSender</EM> </TD>
+<TD class="confluenceTd"> This is a component inside the JBI container. It receives the normalized message (the message from the trigger), converts it to a JMS message, and publishes it to the topic called demo.org.servicemix.source. It uses the <EM>jmsTemplate</EM>(1) bean to handle the publish. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>inputReceiver</EM> </TD>
+<TD class="confluenceTd"> This component uses <EM>jencks</EM> , the JCA container, to listen on port 61616 for a JMS message on the topic called &quot;demo.org.servicemix.source.&quot; <EM>inputReceiver</EM> subscribes to the demo.org.servicemix.source topic. It takes the message, normalizes it, and routes it to <EM>outputSender</EM> via the NMR. This component combined with <EM>outputSender</EM> and supporting beans creates a JMS bridge between two topics. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>outputSender</EM> </TD>
+<TD class="confluenceTd"> This component receives a normalized message from the NMR, marshals it into a JMS message using <EM>jmsTemplate</EM>, then publishes it on the ActiveMQ (JMS) topic called &quot;demo.org.servicemix.result.&quot; </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>jmsTrace</EM> </TD>
+<TD class="confluenceTd"> This component uses <EM>jencks</EM> to subscribe to the &quot;demo.org.servicemix.result&quot; topic and get messages. It then marshals the message into a normalized message and routes it via the NMR to the <EM>trace</EM> component. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>trace</EM> </TD>
+<TD class="confluenceTd"> Receives normalized messages from <EM>jmsTrace</EM> via the NMR. It transforms the normalized message into a string and logs it to the console. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>jencks</EM> </TD>
+<TD class="confluenceTd"> The <EM>jencks</EM> bean defines a JCA container. The JCA container allows you to configure thread pool size, configure a transaction manager, and configure a resource adapter. In this example, the resource adapter is an ActiveMQ adapter, however, another JMS listener could be configured instead. This adapter listens on port 61616 for JMS messages. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>broker</EM> </TD>
+<TD class="confluenceTd"> The <EM>broker</EM> bean uses the <TT>activemq.xml</TT> file to configure the message broker, which handles the JMS messages for the components that require JMS messaging services. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>transactionManager</EM> </TD>
+<TD class="confluenceTd"> This bean is configured to be the default transaction manager for the <EM>jbi</EM> container. <EM>jencks</EM>is configured to use the default transaction manager. This transaction manager provides transactional services between the resource adapter (in this case the ActiveMQ resource adapter provided by the <EM>jencks</EM> JCA container) and components the <EM>jbi</EM> container. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>jmsFactory</EM> </TD>
+<TD class="confluenceTd"> This bean listens on port 61616 and provides a pooled ActiveMQ connection. </TD>
+</TR>
+</TBODY></TABLE>
+<P>1. <EM>jmsTemplate:</EM> JmsTemplate is a Spring component which hides the low level details when sending JMS messages. For additional information see: <SPAN class="nobr"><A href="http://docs.codehaus.org/display/ACTIVEMQ/Spring%20Support" title="Visit page outside Confluence" rel="nofollow">JmsTemplate<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>. jmsTemplate is not a component in the <EM>jbi</EM> container. It is used by <EM>inputSender</EM> and <EM>outputSender</EM>.</P>
+
+<H3><A name="Basicold-Issues"></A>Issues</H3>
+
+<P>The ServiceMix 2.0.2 distribution has a known logging bug, so output is not logged to the console. This can be corrected in the <B>source</B>distribution of ServiceMix 2.0.2, by replacing the jencks-all-1.1.1.jar with the jencks-all-1.1.2.jar file. Upgrading to 2.0.3 will also resolve the problem. 2.0.3 release is a developer&apos;s release at this time. Please see <A href="../SM/download.html" title="Download">SM:Download</A> for the latest developer&apos;s release.</P>
+
+<P>This procedure explains the work around for 2.0.2.</P>
+<OL>
+	<LI>Download the jencks-all-1.2.jar <SPAN class="nobr"><A href="http://dist.codehaus.org/jencks/jars/jencks-all-1.1.2.jar" title="Visit page outside Confluence" rel="nofollow">here<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.</LI>
+	<LI>Copy the jar file to [SM:servicemix_src_install_dir]\assembly\target\servicemix-2.0.2\bin\servicemix-2.0.2\lib, where [SM:servicemix_src_install_dir] is the directory in which the ServiceMix distribution is located.</LI>
+	<LI>Delete jencks-all-1.1.1.jar from that directory.</LI>
+	<LI>Place a copy of the jar file in the ServiceMix web directory at [SM:servicemix_src_install_dir]\servicemix-2.0.2\tooling\servicemix-web\target\servicemix-web\WEB-INF as well.</LI>
+	<LI>To run the example in the source distribution:
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">cd [SM:servicemix_src_install_dir]\assembly\target\servicemix-2.0.2\bin\servicemix-2.0.2\bin
+
+..\..\bin\servicemix servicemix.xml</PRE>
+</DIV></DIV></LI>
+	<LI>test</LI>
+</OL>
+
+
+<P>Note: It is not necessary to build the source distribution if you have previously done so. If ServiceMix has not been built, execute the above steps before building. The procedure on how to build the source distribution can be found <SPAN class="nobr"><A href="http://www.servicemix.org/Getting%20Started#GettingStarted-WindowsSourceInstallation" title="Visit page outside Confluence" rel="nofollow">here<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.</P>
+
+<H3><A name="Basicold-RelatedDocumentation"></A>Related Documentation</H3>
+
+<P>For more information on the following topics please see:</P>
+<UL>
+	<LI><SPAN class="nobr"><A href="http://www.activemq.org/Spring%20Support" title="Visit page outside Confluence" rel="nofollow">ActiveMQ related components, <EM>jmsFactory</EM>, <EM>jmsTemplate</EM>, <EM>broker</EM><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<UL>
+	<LI><SPAN class="nobr"><A href="http://jencks.org/" title="Visit page outside Confluence" rel="nofollow">JCA Container, <EM>jencks</EM><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<UL>
+	<LI><SPAN class="nobr"><A href="http://www.servicemix.org/Quartz" title="Visit page outside Confluence" rel="nofollow">Quartz timer<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P>For a brief explanation of the XML tags in the <TT>servicemix.xml</TT> file, please see:</P>
+<UL>
+	<LI><SPAN class="nobr"><A href="http://servicemix.codehaus.org/maven/servicemix.xsd.html" title="Visit page outside Confluence" rel="nofollow">XSD<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>
+<BR clear="all">
+<BR clear="all"></LI>
+</UL>
+</DIV>
+          </DIV>
+        </TD>
+      </TR>
+      </TABLE>     
+      </DIV>
+    </DIV>
+    <DIV id="site-footer">
+          Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=rajdavies">Rob Davies</A>,
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume Nodet</A> on Nov 08, 2006
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=2093&originalId=14763">view change</A>)
+              
+      (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=2093">edit page</A>)
+    </DIV>
+
+  </BODY>
+
+</HTML>
\ No newline at end of file

Added: incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg.jpeg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg.jpeg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/bpel-example.data/bpelflow.jpg.jpeg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/servicemix/site/sm30ug/bpel-example.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/bpel-example.html?view=auto&rev=471522
==============================================================================
--- incubator/servicemix/site/sm30ug/bpel-example.html (added)
+++ incubator/servicemix/site/sm30ug/bpel-example.html Sun Nov  5 12:24:38 2006
@@ -0,0 +1,270 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <LINK type="text/css" rel="stylesheet" href="resources/site.css">
+    <SCRIPT src="resources/space.js" type="text/javascript"></SCRIPT>
+    <TITLE>
+BPEL example
+    </TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+
+    <!-- Banner -->
+    <DIV id="site-banner">
+    </DIV>
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-page">
+            <DIV class="wiki-content">
+<H3><A name="BPELexample-OverviewoftheServiceMix1.xBPELExample"></A>Overview of the ServiceMix 1.x <EM>BPEL</EM> Example</H3>
+
+<P>This document describes how to run ServiceMix&apos;s <EM>BPEL</EM> example and provides details about what it does. For information on the business use case, please refer to: <SPAN class="nobr"><A href="http://www.servicemix.org/Use%20Cases" title="Visit page outside Confluence" rel="nofollow">Use Case for BPEL<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.</P>
+
+<P>The <EM>BPEL</EM> example illustrates the following:</P>
+<UL>
+	<LI>an example of declarative programming</LI>
+	<LI>how to perform <EM>BPEL</EM> integration with ServiceMix</LI>
+	<LI>how to use <EM>JmsTemplate</EM> for publishing and subscribing to ActiveMQ topics</LI>
+</UL>
+
+
+<P>The XML code for the <EM>BPEL</EM> example is located in the ServiceMix installation directory under the <TT>examples\bpel</TT> directory in the <TT>servicemix.xml</TT> file. It is recommended that you refer to the <TT>servicemix.xml</TT> file while reading this document.</P>
+
+<P>This example has a client application, <EM>JMSClient</EM>, which sends a SOAP message to a ServiceMix binding component called <EM>myComponent</EM>. <EM>myComponent</EM> forwards the request to the PXE BPEL engine and waits for a response. In other words, <EM>JMSClient</EM> places a book order and <EM>myComponent</EM> receives the order and then sends it to the Webservice that takes orders. The client, <EM>JMSClient</EM>, and the binding component, <EM>myComponent</EM>, communicate via JMS; this communication is external to the ServiceMix JBI. <EM>myComponent</EM> and the PXE BPEL service engine communicate internally over the Normalized Message Router (NMR).</P>
+
+<H3><A name="BPELexample-PrerequisitestoRuntheBPELExample"></A>Prerequisites to Run the <EM>BPEL</EM> Example</H3>
+
+<P>The following must be installed to run this example:</P>
+<UL>
+	<LI>Java Standard Edition 5.0</LI>
+	<LI>Ant - <SPAN class="nobr"><A href="http://ant.apache.org/" title="Visit page outside Confluence" rel="nofollow">http://ant.apache.org<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI>PXE - We support <SPAN class="nobr"><A href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel" title="Visit page outside Confluence" rel="nofollow">WS-BPEL<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> via the <SPAN class="nobr"><A href="http://pxe.fivesight.com/" title="Visit page outside Confluence" rel="nofollow">PXE BPEL Engine<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> from <SPAN class="nobr"><A href="http://www.fivesight.com/" title="Visit page outside Confluence" rel="nofollow">FiveSight<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.
+<BR clear="all">
+<BR clear="all">
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="warningMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Warning</B><BR>
+<P><B>NOTE:</B> ServiceMix works on any Java SE 1.4 or later environment; however to use PXE a Java SE 5 or later platform is required. Before running this example, use Java 1.5 to start up ServiceMix.</P></TD></TR></TABLE></LI>
+</UL>
+
+
+<H3><A name="BPELexample-RunningtheBPELExample"></A>Running the <EM>BPEL</EM> Example</H3>
+
+<P>Before running this example, the following setup must be done. PXE has a JBI component and deployment unit, which can be auto-deployed in any JBI compliant container, in this case ServiceMix. To use PXE with ServiceMix, the PXE deployment unit must be placed in the <TT>install</TT> directory so it will be auto-deployed in ServiceMix. <B>NOTE:</B> The PXE deployment unit has already been placed into the <TT>install</TT> directory for you - take a look at the <TT>servicemix_install_dir\examples\bpel\install</TT> directory to see the PXE jar file.</P>
+
+<P>Perform the following steps to run the <EM>BPEL</EM> example:</P>
+<OL>
+	<LI>From a command shell, go to the <EM>BPEL</EM> example directory:
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">cd [SM:servicemix_install_dir]\examples\bpel</PRE>
+</DIV></DIV>
+<P>where <TT>servicemix_install_dir</TT> is the directory in which ServiceMix was installed.</P></LI>
+	<LI>Then type:
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">[SM:servicemix_install_dir]\bin\servicemix servicemix.xml
+
+OR
+
+..\..\bin\servicemix servicemix.xml</PRE>
+</DIV></DIV>
+<P><BR clear="all"></P></LI>
+	<LI>To trigger the BPEL business process, send it some messages. To do this, compile and run a simple JMS client. The client is built and run from source code using Ant. Execute Ant from the <EM>BPEL</EM> directory: <TT>servicemix_install_dir\examples\bpel</TT>. To run the JMS client type:
+<BR clear="all">
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">ant</PRE>
+</DIV></DIV>
+<P><BR clear="all">
+Ant will compile and run the simple JMS client, <EM>JMSClient</EM>, which performs a JMS based request-response into the ServiceMix container before returning the results to the console.
+<BR clear="all"></P>
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="tipMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Handy Hint</B><BR>
+<P>Add <EM>$SERVICEMIX_HOME\bin</EM> directory to <EM>$PATH</EM> variable to simplify execution of the example.</P></TD></TR></TABLE></LI>
+</OL>
+
+
+<H3><A name="BPELexample-StoppingtheBPELExample"></A>Stopping the <EM>BPEL</EM> Example</H3>
+
+<P>To terminate the <EM>BPEL</EM> example type &quot;CTRL-C&quot; in the command shell in which it is running and answer &quot;y&quot; to the &quot;Terminate batch job (y/n)?&quot; question.
+<BR clear="all"></P>
+
+<H3><A name="BPELexample-HowitWorks"></A>How it Works</H3>
+
+<P>The diagram below illustrates the logical flow of the program through the <EM>BPEL</EM> components:</P>
+
+<P><BR clear="all">
+<BR clear="all"></P>
+<DIV class="panel" style="border-style: solid; border-color: #ccc; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #ccc; "><B>BPEL Logical Flow Diagram</B></DIV><DIV class="panelContent">
+<P><DIV align="center"><IMG src="bpel-example.data/bpelflow.jpg" border="0"></DIV></P>
+</DIV></DIV>
+<P><BR clear="all">
+<BR clear="all"></P>
+
+<P>The logical flow of the program is:</P>
+<OL>
+	<LI>The <EM>JMSClient</EM>, through ActiveMQConnectionFactory, connects to the topic named &quot;demo.org.servicemix.source&quot; and sends a text message containing the <TT>message.soap</TT> file.</LI>
+	<LI><EM>myComponent</EM>, being a subscriber of the topic &quot;demo.org.servicemix.source,&quot; receives the message.</LI>
+	<LI>The <EM>myComponent</EM> implementation class, JmsServiceComponent, sends the message over the ServiceMix bus to the <EM>PxeBpelEngine</EM> by executing its onMessage() method. The destinationService property defines the destination of the message. <B>NOTE:</B> the destinationService property is found in the <TT>servicemix.xml</TT> file.</LI>
+	<LI><EM>PxeBpelEngine</EM> sends a response back to <EM>myComponent</EM> through the ServiceMix bus, the NMR.</LI>
+	<LI><EM>myComponent</EM> uses the <EM>jmsTemplate</EM> bean to publish the message.</LI>
+	<LI><EM>jmsTemplate</EM> uses the <EM>jmsFactory</EM> bean to get a connection to the port associated with the JMS topic called &quot;demo.org.servicemix.source.&quot; The message is published on the &quot;demo.org.servicemix.source&quot; topic.</LI>
+	<LI><EM>JMSClient</EM>, being a subscriber of topic &quot;demo.org.servicemix.source,&quot; receives the message.</LI>
+	<LI>The response is printed on the console.</LI>
+</OL>
+
+
+<P>Typical output looks like the following:
+<BR clear="all"></P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">ServiceMix ESB: 1.0
+
+Loading ServiceMix from file: servicemix.xml
+[SM:INFO] XmlBeanDefinitionReader - -Loading XML bean definitions from file C:\exist\servicemix\servicemix-1.0.1\examples\bpel\servicemix.xml]
+[SM:INFO] CollectionFactory - -JDK 1.4+ collections available
+[SM:INFO] CollectionFactory - -Commons Collections 3.x available
+[SM:INFO] FileSystemXmlApplicationContext - -Bean factory <SPAN class="code-keyword">for</SPAN> application context
+[SM:org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=110
+2920]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans
+[SM:jndi,broker,transactionManager,jmsFactory,jbi];
+ root of BeanFactory hierarchy[SM:INFO] FileSystemXmlApplicationContext - -5 beans defined in application context
+ [SM:org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=1102920]
+[SM:INFO] FileSystemXmlApplicationContext - -Unable to locate MessageSource with name &apos;messageSource&apos;: using <SPAN class="code-keyword">default</SPAN>
+[SM:org.springframework.context.support.DelegatingMessageSource@18e2b22]
+[SM:INFO] FileSystemXmlApplicationContext - -Unable to locate ApplicationEventMulticaster with name &apos;applicationEventMulticaster&apos;:
+using <SPAN class="code-keyword">default</SPAN> [SM:org.springframework.context.event.SimpleApplicationEventMulticaster@13caecd]
+[SM:INFO] DefaultListableBeanFactory - -Pre-instantiating singletons in factory
+ [org.springframework.beans.factory.support.DefaultListableBeanFactory
+defining beans [SM:jndi,broker,transactionManager,jmsFactory,jbi]; root of BeanFactory hierarchy]
+[SM:INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean&apos;jndi&apos;
+[SM:INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;broker&apos;
+[SM:INFO] SpringBrokerContainerFactory - -Loading ActiveMQ broker from configuration: class path resource [SM:activemq.xml]
+[SM:INFO] ActiveMQBeanDefinitionReader - -Loading XML bean definitions from class path resource [SM:activemq.xml]
+[SM:INFO] ActiveMQBeanFactory - -Creating shared instance of singleton bean &apos;broker&apos;
+[SM:INFO] ActiveMQBeanFactory - -Creating shared instance of singleton bean &apos;memoryManager&apos;
+[SM:INFO] ActiveMQBeanFactory - -Creating shared instance of singleton bean &apos;derby-ds&apos;
+[SM:INFO] ActiveMQBeanFactory - -Creating shared instance of singleton bean &apos;mysql-ds&apos;
+[SM:INFO] BrokerContainerImpl - -ActiveMQ 3.1-M6 JMS Message Broker (ID:el2tong-1095-1129854563062-0:0) is starting
+[SM:INFO] BrokerContainerImpl - -For help or more information please see: http:<SPAN class="code-comment">//www.logicblaze.com
+</SPAN>[SM:INFO] JDBCPersistenceAdapter - -Database driver recognized: [SM:apache_derby_embedded_jdbc_driver]
+[SM:INFO] DefaultJDBCAdapter - -Could not create JDBC tables; they could already exist. Failure was:
+CREATE TABLE ACTIVEMQ_MSGS(ID INTEGER NOT NULL, CONTAINER VARCHAR(250), MSGID VARCHAR(250), MSG BLOB, PRIMARY KEY ( ID ) )
+Message: Table/View &apos;ACTIVEMQ_MSGS&apos; already exists in Schema &apos;APP&apos;. SQLState: X0Y32 Vendor code: 20000
+[SM:INFO] DefaultJDBCAdapter - -Could not create JDBC tables; they could already exist. Failure was:
+CREATE TABLE ACTIVEMQ_TXS(XID VARCHAR(250) NOT NULL, PRIMARY KEY ( XID )) Message: Table/View &apos;ACTIVEMQ_TXS&apos; already exists in Schema &apos;APP&apos;. SQLState: X0Y32 Vendor code: 20000
+[SM:INFO] DefaultJDBCAdapter - -Could not create JDBC tables; they could already exist. Failure was:
+CREATE TABLE ACTIVEMQ_ACKS(SUB VARCHAR(250) NOT NULL, CONTAINER VARCHAR(250) NOT NULL, LAST_ACKED_ID INTEGER, SE_ID INTEGER,
+SE_CLIENT_ID VARCHAR(250), SE_CONSUMER_NAME VARCHAR(250), SE_SELECTOR VARCHAR(250), PRIMARY KEY (
+ SUB, CONTAINER )) Message: Table/View &apos;ACTIVEMQ_ACKS&apos; already exists in Schema &apos;APP&apos;. SQLState: X0Y32 Vendor code: 20000
+[SM:INFO] DefaultJDBCAdapter - -Could not create JDBC tables; they could already exist. Failure was:
+ALTER TABLE ACTIVEMQ_MSGS ADD EXPIRATION BIGINT Message: Column &apos;EXPIRATION&apos; already exists in Table/View &apos;APP.ACTIVEMQ_MSGS&apos;. SQLState: X0Y32 Vendor code: 20000
+[SM:INFO] JournalPersistenceAdapter - -Opening journal.
+[SM:INFO] JournalPersistenceAdapter - -Opened journal: Active Journal: using 2 x 20.0 Megs at: ..\<SPAN class="code-keyword">var</SPAN>\journal
+[SM:INFO] JournalPersistenceAdapter - -Journal Recovery Started.
+[SM:INFO] JournalPersistenceAdapter - -Journal Recovered: 0 message(s) in transactions recovered.
+[SM:INFO] TcpTransportServerChannel - -Listening <SPAN class="code-keyword">for</SPAN> connections at: tcp:<SPAN class="code-comment">//el2tong:61616
+</SPAN>[SM:INFO] BrokerConnectorImpl - -ActiveMQ connector started: TcpTransportServerChannel@tcp:<SPAN class="code-comment">//el2tong:61616
+</SPAN>[SM:INFO] BrokerContainerImpl - -ActiveMQ JMS Message Broker (ID:el2tong-1095-1129854563062-0:0) has started
+[SM:INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;transactionManager&apos;
+[SM:INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;jmsFactory&apos;
+[SM:INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;jbi&apos;
+[SM:INFO] ActiveMQConnection - -channel status changed: Channel: TcpTransportChannel: Socket[SM:addr=localhost/127.0.0.1,port=61616,localport=1096] has connected
+[SM:INFO] BrokerContainerImpl - -Adding <SPAN class="code-keyword">new</SPAN> client: ID:el2tong-1095-1129854563062-5:0 on transport: TcpTransportChannel: Socket[SM:addr=/127.0.0.1,port=1096,localport=61616]
+[SM:INFO] JBIContainer - -ServiceMix JBI Container (http:<SPAN class="code-comment">//servicemix.org/) name: defaultJBI running version: ServiceMix.
+</SPAN>[SM:INFO] JBIContainer - -Activating component <SPAN class="code-keyword">for</SPAN>: [SM:container=defaultJBI,name=myComponent,id=myComponent]
+ with service: {uri:fivesight.com/examples/AsyncProcessJBI}JmsService component: org.servicemix.components.jms.JmsServiceComponent@1b82d69
+[SM:INFO] ComponentContextImpl - -Component: myComponent activated endpoint: {uri:fivesight.com/examples/AsyncProcessJBI}JmsService : myComponent</PRE>
+</DIV></DIV>
+
+<H3><A name="BPELexample-Details"></A>Details</H3>
+
+<P>The following table provides more details about the function of each component and bean in the <TT>servicemix.xml</TT> file:
+<BR clear="all">
+<BR clear="all"></P>
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Component or Bean ID </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>jbi</EM> </TD>
+<TD class="confluenceTd"> jbi is the &quot;id&quot; of the JBI container and provides the basic infrastructure services for <EM>myComponent</EM>. During initialization, several singletons are instantiated: <EM>transactionManager</EM>, <EM>broker</EM>, <EM>jmsFactory</EM>, and <EM>jbi</EM>. Also, take note of the properties installationDirPath and deploymentDirPath defined in <TT>servicemix.xml</TT>. ServiceMix automatically installs components found in the folder specified in the installationDirPath property. It automatically deploys component-specific artifacts found in the folder specified in the deploymentDirPath property. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>JMSClient</EM> </TD>
+<TD class="confluenceTd"> This Java standalone program, through the ActiveMQConnectionFactory, connects to topic &quot;demo.org.servicemix.source.&quot; It then creates a text message from the file <TT>message.soap</TT> and publishes it to the topic &quot;demo.org.servicemix.source,&quot; then requests and waits for a response. It eventually prints the response to the console. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>myComponent</EM> </TD>
+<TD class="confluenceTd"> This JMS service component subscribes to the &quot;demo.org.servicemix.source&quot; topic via its defaultDestinationName property specified in the <TT>servicemix.xml</TT> configuration file. Through its template property, it uses <EM>jmsFactory</EM> to listen on port 61616 via ActiveMQConnectionFactory. It is implemented by the <EM>JmsServiceComponent</EM> that has an onMessage() method which is called by ActiveMQ when a message arrives on the topic. This method creates a normalized message, which is sent over the ServiceMix bus to the PxeBpelEngine as specified on its destinationService property. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>jndi</EM> </TD>
+<TD class="confluenceTd"> This bean loads up database and transaction manager resources, which will be used by the other components in the system. More importantly, the JNDI context must be configured so that PXE can be deployed. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>Pxe-install.jar</EM> </TD>
+<TD class="confluenceTd"> This jarfile is located in the <TT>examples\bpel\install</TT> directory. It contains many files, which in turn contain the classes that implement the PXE BPEL engine. It also has a <TT>jbi.xml</TT> file, which is used by ServiceMix to install the PXE BPEL engine as a ServiceMix service-engine component. Note, that in this file the component type is &quot;service-engine&quot; and the component name is <EM>PxeBpelEngine</EM>. When processes are deployed to the PXE engine (see next row with AsyncProcess-sa.jar), it exposes them as services on the JBI, which can be referenced by other components as destinationService(s), with destinationEnpoint(s) - see the <TT>servicemix.xml</TT> file. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>AsyncProcess-sa.jar</EM> </TD>
+<TD class="confluenceTd"> This jarfile is located in the <TT>examples\bpel\deploy</TT> directory. It contains a <TT>jbi.xml</TT> file, which references the <EM>PxeBpelEngine</EM>. This ties the processes to the PXE engine described in the previous section. The <TT>jbi.xml</TT> file also references the <TT>AsyncProcess-su.zip</TT> file, which is also contained in the <EM>AsycnProcess-sa.jar</EM> file. This zipfile contains other configuration files and WSDL files, i.e., <TT>pxe-system.xml</TT> and <TT>resource_X.stream</TT>, which describe the services deployed on the PXE engine. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>broker</EM> </TD>
+<TD class="confluenceTd"> The broker bean uses the <TT>activemq.xml</TT> file to configure the message broker, which handles the JMS messages for the components that require JMS messaging services. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>transactionManager</EM> </TD>
+<TD class="confluenceTd"> This bean is configured to be the default transaction manager for the jbi container. This transaction manager provides transactional services between the resource adapter (in this case the ActiveMQ resource adapter provided by the jencks JCA container) and components in the jbi container. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>jmsFactory</EM> </TD>
+<TD class="confluenceTd"> This bean listens on port 61616 and provides a pooled ActiveMQ connection. </TD>
+</TR>
+</TBODY></TABLE>
+
+<H3><A name="BPELexample-RelatedDocumentation"></A>Related Documentation</H3>
+
+<P>For more information on the following topics please see:</P>
+<UL>
+	<LI><SPAN class="nobr"><A href="http://www.activemq.org/Spring%20Support" title="Visit page outside Confluence" rel="nofollow">ActiveMQ related components, jmsFactory, jmsTemplate, broker<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<UL>
+	<LI><A href="../SM/glossary.html#Glossary-NMR" title="NMR on Glossary">NMR</A></LI>
+</UL>
+
+
+<UL>
+	<LI><SPAN class="nobr"><A href="http://pxe.fivesight.com/" title="Visit page outside Confluence" rel="nofollow">PXE BPEL Engine<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<UL>
+	<LI><SPAN class="nobr"><A href="http://www.servicemix.org/Spring%20support" title="Visit page outside Confluence" rel="nofollow">Spring<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P>For a brief explanation of the XML tags in the <TT>servicemix.xml</TT> file, please see:</P>
+<UL>
+	<LI><SPAN class="nobr"><A href="http://servicemix.codehaus.org/maven/servicemix.xsd.html" title="Visit page outside Confluence" rel="nofollow">XSD<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+</DIV>
+          </DIV>
+        </TD>
+      </TR>
+      </TABLE>     
+      </DIV>
+    </DIV>
+    <DIV id="site-footer">
+          Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James Strachan</A>,
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume Nodet</A> on Nov 08, 2006
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=2066&originalId=14755">view change</A>)
+              
+      (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=2066">edit page</A>)
+    </DIV>
+
+  </BODY>
+
+</HTML>
\ No newline at end of file

Added: incubator/servicemix/site/sm30ug/examples.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/examples.html?view=auto&rev=471522
==============================================================================
--- incubator/servicemix/site/sm30ug/examples.html (added)
+++ incubator/servicemix/site/sm30ug/examples.html Sun Nov  5 12:24:38 2006
@@ -0,0 +1,45 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <LINK type="text/css" rel="stylesheet" href="resources/site.css">
+    <SCRIPT src="resources/space.js" type="text/javascript"></SCRIPT>
+    <TITLE>
+Examples
+    </TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+
+    <!-- Banner -->
+    <DIV id="site-banner">
+    </DIV>
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-page">
+            <DIV class="wiki-content"><P>We provide a number of examples of ServiceMix in use inside the <A href="../SM/download.html" title="Download">binary download</A>.</P>
+
+<P>Once you have a binary distribution you should be able to see the examples in the <EM>examples</EM> directory.</P>
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="tipMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Handy Hint</B><BR>
+<P>Add <EM>$SERVICEMIX_HOME/bin</EM> directory to <EM>$PATH</EM> variable to simplify execution of the examples.</P></TD></TR></TABLE>
+
+<UL><LI><A href="basic-old.html" title="Basic old">Basic old</A></LI><LI><A href="bpel-example.html" title="BPEL example">BPEL example</A></LI><LI><A href="file-binding-old.html" title="file binding old">file binding old</A></LI><LI><A href="http-binding.html" title="HTTP binding">HTTP binding</A></LI><LI><A href="jms-binding.html" title="jms-binding">jms-binding</A></LI><LI><A href="loan-broker-example.html" title="Loan Broker example">Loan Broker example</A></LI><LI><A href="quartz-binding.html" title="quartz-binding">quartz-binding</A></LI><LI><A href="rss-binding.html" title="RSS-binding">RSS-binding</A></LI><LI><A href="soap-binding-example.html" title="soap binding example">soap binding example</A><UL><LI><A href="understanding-the-soap-binding-example.html" title="Understanding the 'soap-binding' example">Understanding the &apos;soap-binding&apos; example</A></LI></UL></LI><LI><A href="vfs-binding.html" title="vfs-binding">vfs-binding</A></LI></UL></DIV>
+          </DIV>
+        </TD>
+      </TR>
+      </TABLE>     
+      </DIV>
+    </DIV>
+    <DIV id="site-footer">
+          Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James Strachan</A>,
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume Nodet</A> on Nov 08, 2006
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=2113&originalId=14735">view change</A>)
+              
+      (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=2113">edit page</A>)
+    </DIV>
+
+  </BODY>
+
+</HTML>
\ No newline at end of file

Added: incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg.jpeg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg.jpeg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/file-binding-old.data/filebindingexample.jpg.jpeg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/servicemix/site/sm30ug/file-binding-old.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/file-binding-old.html?view=auto&rev=471522
==============================================================================
--- incubator/servicemix/site/sm30ug/file-binding-old.html (added)
+++ incubator/servicemix/site/sm30ug/file-binding-old.html Sun Nov  5 12:24:38 2006
@@ -0,0 +1,244 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <LINK type="text/css" rel="stylesheet" href="resources/site.css">
+    <SCRIPT src="resources/space.js" type="text/javascript"></SCRIPT>
+    <TITLE>
+file binding old
+    </TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+
+    <!-- Banner -->
+    <DIV id="site-banner">
+    </DIV>
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-page">
+            <DIV class="wiki-content"><H3><A name="filebindingold-OverviewoftheServiceMixFileBindingExample"></A>Overview of the ServiceMix File Binding Example</H3>
+
+<P>This document describes how to run ServiceMix&apos;s <EM>File Binding</EM> example and provides details about what it does. For information on the business use case, please refer to: <SPAN class="nobr"><A href="http://www.servicemix.org/Use%20Cases" title="Visit page outside Confluence" rel="nofollow">Use Case for File Binding<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.</P>
+
+<P>The <EM>File Binding</EM> example illustrates the following:</P>
+<UL>
+	<LI>an example of declarative programming</LI>
+	<LI>how to interact with the file system</LI>
+	<LI>how to use a WorkManager thread pool</LI>
+</UL>
+
+
+<P>The XML code for the <EM>File Binding</EM> example is located in the ServiceMix installation directory under the <TT>examples\file-binding</TT> directory in the <TT>servicemix.xml</TT> file. It is recommended that you refer to the <TT>servicemix.xml</TT> file while reading this document.</P>
+
+<P>The <EM>File Binding</EM> XML file, <TT>servicemix.xml</TT>, contains two components and a supporting bean. One component waits for a file to be deposited into the the <TT>inbox</TT>directory, retrieves it, creates a normalized message that contains the file, then sends the message to the Normalized Message Router (NMR). The NMR routes the file to the other component, which deposits it into an <TT>outbox</TT> directory. The bean provides a thread pool to enhance the performance of the reading and processing of the files. Details about the components and bean are discussed below.<TABLE cellpadding="5" width="85%" cellspacing="8px" class="infoMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Note</B><BR><BR>
+The file to be transmitted from the inbox to outbox must be in XML format.</TD></TR></TABLE></P>
+
+<H3><A name="filebindingold-RunningtheFileBindingExample"></A>Running the <EM>File Binding</EM> Example</H3>
+
+<P>From a command shell, go to the <EM>File Binding</EM> example directory:</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">cd [SM:servicemix_install_dir]\examples\file-binding</PRE>
+</DIV></DIV>
+<P>where <TT>servicemix_install_dir</TT> is the directory in which ServiceMix was installed.</P>
+
+<P>Before running the example, copy a test file into the inbox directory:</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">copy test-file.xml inbox</PRE>
+</DIV></DIV>
+<P>Then type:</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">[SM:servicemix_install_dir]\bin\servicemix servicemix.xml
+
+OR
+
+..\..\bin\servicemix servicemix.xml</PRE>
+</DIV></DIV>
+<P><BR clear="all">
+After a few seconds, the <TT>sample_xxx.xml</TT>file will appear in the outbox directory. To see this open another command window and do a directory listing on the outbox directory, for example:</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">dir [SM:servicemix_install_dir]\examples\file-binding\outbox</PRE>
+</DIV></DIV>
+<P>If you would like to see more files moved from <TT>inbox</TT> to <TT>outbox</TT>, copy another file into the <TT>inbox</TT> directory. The <EM>file binding</EM> program continually polls (every 1000 ms) for new files, so any new file placed in <TT>inbox</TT>, will be transmitted to <TT>outbox</TT>.
+<BR clear="all"> <TABLE cellpadding="5" width="85%" cellspacing="8px" class="tipMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Handy Hint</B><BR><BR>
+Add <EM>$SERVICEMIX_HOME/bin</EM> directory to <EM>$PATH</EM> variable to simplify execution of the example.</TD></TR></TABLE></P>
+
+<H3><A name="filebindingold-StoppingtheFileBindingExample"></A>Stopping the <EM>File Binding</EM> Example</H3>
+
+<P>To terminate the <EM>File Binding</EM> example type &quot;CTRL-C&quot; in the command shell in which it is running and answer &quot;y&quot; to the &quot;Terminate batch job (y/n)?&quot; question.
+<BR clear="all"></P>
+
+<H3><A name="filebindingold-HowitWorks"></A>How it Works</H3>
+
+<P>The diagram below illustrates the logical flow of the program through the <EM>file binding</EM> components.</P>
+
+<P><BR clear="all">
+<BR clear="all"></P>
+<DIV class="panel" style="border-style: solid; border-color: #ccc; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #ccc; "><B>File Binding Logical Flow Diagram</B></DIV><DIV class="panelContent">
+<P><DIV align="center"><IMG src="file-binding-old.data/filebindingexample.jpg" border="0"></DIV></P>
+</DIV></DIV>
+<P><BR clear="all">
+<BR clear="all"></P>
+
+<P>The logical flow of the program is:</P>
+<OL>
+	<LI>The <EM>filePoller</EM> polls the <TT>inbox</TT> directory every 1000 ms looking for a file.</LI>
+	<LI>Once a file appears in the <TT>inbox</TT> directory, the <EM>filePoller</EM> gets a thread from the <EM>workManager</EM>. The thread will be used to process the file.</LI>
+	<LI>The <EM>filePoller</EM>creates a normalized message that contains the file to be transmitted. It sends the normalized message to the NMR. The NMR routes the message to the <EM>fileSender</EM> component.</LI>
+	<LI>The <EM>fileSender</EM> transforms the normalized message back into a file and &quot;sends&quot; it (places it) to the <TT>outbox</TT> directory.</LI>
+</OL>
+
+
+<P>Logging information is written to the console as files are transmitted. Typical output looks like the following:
+<BR clear="all"></P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">ServiceMix ESB: 1.0.1
+
+Loading ServiceMix from file: servicemix.xml
+[SM:INFO] XmlBeanDefinitionReader - -Loading XML bean definitions from file [C:\Program Files\servicemix-1.0.1\examples\file-binding\servicemi.xml]
+[SM:INFO] FileSystemXmlApplicationContext - -Bean factory <SPAN class="code-keyword">for</SPAN> application context [SM:org.springframework.context.support.FileSystemXmlApplication
+Context;hashCode=7486844]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [SM:workManager,jbi]; root of BeanFactory hierarchy
+[SM:INFO] FileSystemXmlApplicationContext - -2 beans defined in application context
+[SM:org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=7486844]
+[SM:INFO] CollectionFactory - -JDK 1.4+ collections available
+[SM:INFO] CollectionFactory - -Commons Collections 3.x available
+[SM:INFO] FileSystemXmlApplicationContext - -Unable to locate MessageSource with name &apos;messageSource&apos;: using <SPAN class="code-keyword">default</SPAN> [SM:org.springframework.conte
+xt.support.DelegatingMessageSource@1d6776d]
+[SM:INFO] FileSystemXmlApplicationContext - -Unable to locate ApplicationEventMulticaster with name &apos;applicationEventMulticaster&apos;: using defaul
+t [SM:org.springframework.context.event.SimpleApplicationEventMulticaster@4fce71]
+[SM:INFO] DefaultListableBeanFactory - -Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanF
+actory defining beans [SM:workManager,jbi]; root of BeanFactory hierarchy]
+[SM:INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;workManager&apos;
+[SM:INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;jbi&apos;
+Created MBeanServer with ID: 203c31:106bd250a5b:-7fff:Lisas:1
+[SM:INFO] SpringInitialContextFactory - -Loading JNDI context from: class path resource [SM:jndi.xml]
+[SM:INFO] XmlBeanDefinitionReader - -Loading XML bean definitions from class path resource [SM:jndi.xml]
+[SM:INFO] XmlBeanFactory - -Creating shared instance of singleton bean &apos;jndi&apos;
+RMIConnectorServer started at: service:jmx:rmi:<SPAN class="code-comment">//lisas/jndi/rmi://localhost:1099/defaultJBIJMX
+</SPAN>[SM:INFO] JBIContainer - -ServiceMix JBI Container (http:<SPAN class="code-comment">//servicemix.org/) name: defaultJBI running version: ServiceMix.
+</SPAN>[SM:INFO] JBIContainer - -Activating component <SPAN class="code-keyword">for</SPAN>: [SM:container=defaultJBI,name=fileSender,id=fileSender] with service: fileSender component: org.servicemix.components.file.FileWriter@b1cc87
+[SM:INFO] ComponentContextImpl - -Component: fileSender activated endpoint: fileSender : fileSender
+[SM:INFO] JBIContainer - -Activating component <SPAN class="code-keyword">for</SPAN>: [SM:container=defaultJBI,name=filePoller,id=filePoller] with service: filePoller component: or
+g.servicemix.components.file.FilePoller@183e7de
+[SM:INFO] ComponentContextImpl - -Component: filePoller activated endpoint: filePoller : filePoller
+[SM:INFO] DeliveryChannel - -<SPAN class="code-keyword">default</SPAN> destination serviceName <SPAN class="code-keyword">for</SPAN> filePoller = fileSender</PRE>
+</DIV></DIV>
+<P>Note: In the <TT>servicemix.xml</TT> file, the &quot;destinationService&quot; attribute of the <EM>filePoller</EM> component is &quot;foo:fileSender.&quot; The last line of output (above) shows the NMR using that to deliver the normalized message to <EM>fileSender</EM>.</P>
+
+<H3><A name="filebindingold-Details"></A>Details</H3>
+
+<P>The following table provides more details about the function of each component and bean in the <TT>servicemix.xml</TT> file.
+<BR clear="all">
+<BR clear="all"></P>
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Component or Bean ID </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>filePoller</EM> </TD>
+<TD class="confluenceTd"> This component periodically checks the &quot;inbox&quot; directory looking for files. If there is a file or directory present, it adds the file to the &quot;workingSet&quot;, which is a collection of files to be processed. The <EM>workManger</EM> is invoked to schedule the work of processing the file from the workingSet. Another thread is created and the processing of the file begins. Processing consists of marshalling the file (streaming it from disk into a normalized message). The normalized message is sent over the NMR to the <EM>fileSender</EM> component per the specified &quot;destinationService&quot;. The destinationService is specified in the <TT>servicemix.xml</TT> file as an attribute the <EM>filePoller</EM> component. In this example, the &quot;destinationService&quot; is the <EM>fileSender</EM> component. Finally, after it has been processed, the <EM>filePoller</EM> deletes the file from the source directory. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>fileSender</EM> </TD>
+<TD class="confluenceTd"> This component is the &quot;destinationService&quot; for the <EM>filePoller</EM>. It receives normalized messages from <EM>filePoller</EM>. The messages it receives are the files that <EM>filePoller</EM>has transferred to it via the NMR. It converts the normalized message to its original file format and sends it to the destination directory, the <TT>outbox</TT> directory. This component creates the filename to which to copy the file by concatenating the string &quot;sample_&quot; with the process id following by &quot;.xml&quot;. The concatenated string is passed to the org.servicemix.expression.JaxenStringXPathExpression bean as an argument to the constructor, as can be seen by the <TT>constructor-arg value</TT> tag in the XML file. </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> <EM>workManager</EM> </TD>
+<TD class="confluenceTd"> This bean is used by the <EM>filePoller</EM> to increase the throughput of the application. The workManager is a thread pool whose size can be adjusted declaratively in the <TT>servicemix.xml</TT> file. The other components in the <EM>File Binding</EM> application ask the <EM>workManager</EM> for threads as needed. For example, threads are used by this application to periodically (every second) check for files in the <TT>inbox</TT>. Other threads are used to do the work of processing files (streaming them in, normalizing them, and sending them to the NMR). <EM>Note:</EM> The <EM>fileSender</EM> component also uses a thread to do its&apos; work, however, it is not using a thread from the <EM>workManager&apos;s</EM> thread pool. </TD>
+</TR>
+</TBODY></TABLE>
+
+<H3><A name="filebindingold-UsefulCodeHints"></A>Useful Code Hints</H3>
+
+<P>This section describes the start-up sequence and how the ServiceMix container interacts with the <EM>File Binding</EM>application. The Java class files are located in the servicemix-1.0.1.jar file in the ServiceMix installation directory. To look at the Java source code, unjar and decompile the .class files or <SPAN class="nobr"><A href="http://www.servicemix.org/Downloads" title="Visit page outside Confluence" rel="nofollow">download<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> the source code. Please note: the downloadable source code is slightly different than the compiled binary code.</P>
+
+<P>Viewing the Java source code is recommended for understanding the information in this section.</P>
+
+<P><B><EM>filePoller</EM></B> <B>Details</B></P>
+<OL>
+	<LI>The ServiceMix container reads the <TT>servicemix.xml</TT> file and sees it needs to instantiate a <B>FilePoller</B>.</LI>
+	<LI>The container calls the init() method of <B>FilePoller</B>, as well as the init() methods of its parents.</LI>
+	<LI>The container determines that <B>FilePoller</B> is an MBean and, therefore, calls the start() method of <B>FilePoller</B>, which it inherits from its parent PollingComponentSupport.</LI>
+	<LI>The start() method will: (<B>See:</B> PollingComponentSupport.java code fragment below)<BR>
+A. Create a timerTask.<BR>
+B. Schedule the timerTask at a fixed rate. The start() method uses the &quot;timer&quot; (created in the init method) to schedule the timerTask at a fixed rate: timer.scheduleAtFixedRate(timerTask, firstTime, period). Recall &quot;period&quot; is a property of <B>FilePoller</B>. It was assigned the value of 1000ms by dependency injection from the <TT>servicemix.xml</TT> file.<BR>
+C. timer will call the run() method of the timerTask periodically. timerTask&apos;s run method() is defined inline. This run() method will get the <B>workManager</B> object (see below for details).<BR>
+D. The <B>workManager</B> will call &quot;scheduleWork(PollingComponentSupport.this)&quot;. _Note:_it passes in PollingComponent support, which by virtue of its inheritance hierarchy, is of type &quot;Work&quot;, which is a &quot;Runnable&quot; object.<BR>
+E. &quot;workManager.scheduleWork(Work)&quot; will get a Thread, passing in a Runnable object, i.e. PollingComponentSupport, and call its run() method.<BR>
+F. PollingComponent&apos;s run() method calls poll(), which is implemented in <B>FilePoller</B>.<BR>
+G. From this point on the call sequence can be followed in <B>FilePoller</B>...<BR>
+H. The start() method of PollingComponentSupport, will eventually call super.start(), which propagates up to call the start() method of BaseLifeCycle, which sets the component state to &quot;RUNNING.&quot;</LI>
+</OL>
+
+
+<P>Eventually, one of the threads that is polling (see step G) for a file in the <TT>inbox</TT> directory will see a one. It will use <B>workManager&apos;s</B> thread pool to get a thread for processing the file. Processing the file consists of streaming it from <TT>inbox</TT>, creating a normalized message, and sending the message to the NMR.</P>
+<DIV class="code" style="border-style: solid; "><DIV class="codeHeader" style="border-bottom-style: solid; "><B>PollingComponentSupport.java</B></DIV><DIV class="codeContent">
+<PRE class="code-java"><SPAN class="code-keyword">protected</SPAN> void init() <SPAN class="code-keyword">throws</SPAN> JBIException {
+        <SPAN class="code-keyword">if</SPAN> (scheduler == <SPAN class="code-keyword">null</SPAN>) {
+            scheduler = <SPAN class="code-keyword">new</SPAN> Scheduler(<SPAN class="code-keyword">true</SPAN>);
+        }
+        <SPAN class="code-keyword">if</SPAN> (scheduleIterator == <SPAN class="code-keyword">null</SPAN>) {
+        	scheduleIterator = <SPAN class="code-keyword">new</SPAN> PollScheduleIterator();
+        }
+        <SPAN class="code-keyword">if</SPAN> (workManager == <SPAN class="code-keyword">null</SPAN>) {
+            ComponentContextImpl context = (ComponentContextImpl) getContext();
+            workManager = context.getWorkManager();
+        }
+        <SPAN class="code-keyword">super</SPAN>.init();
+       
+    }</PRE>
+</DIV></DIV>
+<P><B><EM>workManager</EM></B> <B>Details</B></P>
+
+<P><EM>workManager</EM> is a property of the <B>FilePoller</B> object. This property is defined by a local reference, the &quot;ref&quot; attribute in the <TT>servicemix.xml</TT> file. The local reference is a bean which instantiates org.activemq.work.SpringWorkManager.</P>
+
+<P>The SpringWorkManager is a Spring bean. By default when a Spring bean starts, the properties are set, and then the afterPropertiesSet() method is called by the container.</P>
+
+<P>The <B>workManager</B> is used to allocate threads. The <B>FilePoller</B> asks for threads from the <B>workManager</B> for two operations:</P>
+<OL>
+	<LI>The timerTask uses threads from the thread pool to periodically check the <TT>inbox</TT> directory for files.</LI>
+	<LI>The <B>workManager</B> will also allocate a thread to process a file (read, normalize and send to NMR). The <B>workManager</B> calls a scheduleWork() method which is non-blocking. Therefore, if multiple files need to be processed, <B>FilePoller</B> can continue making requests to the <B>workManager</B> to schedule work.</LI>
+</OL>
+
+
+<P>Summarizing, when the ServiceMix container instantiates an MBean it firsts sets the property values if there are any, then calls the init() method of the class and its&apos; parent classes, if applicable. Then it calls the start() method of the class. When a Spring bean starts up, the properties are set and then the afterPropertiesSet() method is called.</P>
+
+<H3><A name="filebindingold-RelatedDocumentation"></A>Related Documentation</H3>
+
+<P>For more information on the following topics please see:</P>
+<UL>
+	<LI><A href="../SM/glossary.html#Glossary-NMR" title="NMR on Glossary">NMR</A></LI>
+</UL>
+
+
+<UL>
+	<LI><SPAN class="nobr"><A href="http://www.servicemix.org/Spring%20support" title="Visit page outside Confluence" rel="nofollow">Spring<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<P><BR clear="all">
+For a brief explanation of the XML tags in the <TT>servicemi.xml</TT> file, please see:</P>
+<UL>
+	<LI><SPAN class="nobr"><A href="http://servicemix.codehaus.org/maven/servicemix.xsd.html" title="Visit page outside Confluence" rel="nofollow">XSD<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+</DIV>
+          </DIV>
+        </TD>
+      </TR>
+      </TABLE>     
+      </DIV>
+    </DIV>
+    <DIV id="site-footer">
+          Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=rajdavies">Rob Davies</A>,
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume Nodet</A> on Nov 08, 2006
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=1893&originalId=14764">view change</A>)
+              
+      (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=1893">edit page</A>)
+    </DIV>
+
+  </BODY>
+
+</HTML>
\ No newline at end of file

Added: incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg.jpeg
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg.jpeg?view=auto&rev=471522
==============================================================================
Binary file - no diff available.

Propchange: incubator/servicemix/site/sm30ug/http-binding.data/httpflow.jpg.jpeg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message