You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2006/11/05 14:31:37 UTC

svn commit: r471420 [2/2] - in /incubator/servicemix/site/main: ./ basic-old.data/ file-binding-old.data/

Added: incubator/servicemix/site/main/file-binding-old.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/main/file-binding-old.html?view=auto&rev=471420
==============================================================================
--- incubator/servicemix/site/main/file-binding-old.html (added)
+++ incubator/servicemix/site/main/file-binding-old.html Sun Nov  5 05:31:36 2006
@@ -0,0 +1,339 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+<!--
+    Pier's plugin always overwrites the stylesheet so lets explicitly use another one
+    <link type="text/css" rel="stylesheet" href="autoexport:///SM/resources/space.css">
+-->
+    <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">
+
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" class="topbardiv" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/servicemix/main/images/logo.jpg">
+          </TD>
+          <TD align="right" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+          </TD>
+        </TR> 
+      </TABLE>
+
+    </DIV>
+
+    <!-- Bread crumbs and Quick Links -->
+    <DIV id="site-navbar">
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" valign="middle" nowrap="">
+            <DIV id="site-breadcrumbs">
+<A href="home.html" title="ServiceMix">ServiceMix</A>&nbsp;&gt;&nbsp;<A href="home.html" title="Home">Home</A>&nbsp;&gt;&nbsp;<A href="documentation.html" title="Documentation">Documentation</A>&nbsp;&gt;&nbsp;<A href="example-use-cases.html" title="Example & Use Cases">Example &amp; Use Cases</A>&nbsp;&gt;&nbsp;<A href="examples.html" title="Examples">Examples</A>&nbsp;&gt;&nbsp;<A href="" title="file binding old">file binding old</A>
+            </DIV>
+          </TD>
+          <TD align="right" valign="middle" nowrap="">
+            <DIV id="site-quicklinks">
+<P><A href="download.html" title="Download">Download</A> &#124; <A href="documentation.html" title="Documentation">Documentation</A> &#124; <A href="javadocs.html" title="JavaDocs">JavaDocs</A> &#124; <A href="source.html" title="Source">Source</A> &#124; <SPAN class="nobr"><A href="home.html" title="Visit page outside Confluence" rel="nofollow">Wiki<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> &#124; <A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A> &#124; <A href="support.html" title="Support">Support</A></P>
+            </DIV>
+          </TD>
+        </TR> 
+      </TABLE>
+    </DIV>
+
+<!-- Integrate google search later.
+          <form name="search" action="http://www.google.com/search" method="get">
+            <input type="hidden" name="ie" value="UTF- 8" />
+            <input type="hidden" name="oe" value="UTF- 8" />
+            <input type="hidden" name="domains" value="" />
+            <input type="hidden" name="sitesearch" value="" />
+            <input type="text" name="q" maxlength="255" value="" />        
+            <input type="submit" name="btnG" value="Google Search" />
+          </form>
+-->
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-navigation">
+<H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="home.html" title="Home">Home</A></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">ASF<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><A href="license.html" title="License">License</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="download.html" title="Download">Download</A></LI>
+	<LI><A href="sitemap.html" title="SiteMap">SiteMap</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Community"></A>Community</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="../SM30UG/users-guide.html" title="User's Guide">User&apos;s Guide</A></LI>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
+	<LI><A href="support.html" title="Support">Support</A></LI>
+	<LI><A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A></LI>
+	<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+	<LI><SPAN class="nobr"><A href="http://issues.apache.org/activemq/browse/SM" title="Visit page outside Confluence" rel="nofollow">Issues<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><A href="contributing.html" title="Contributing">Contributing</A></LI>
+	<LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/listpages-dirview.action?key=SM" title="Visit page outside Confluence" rel="nofollow">Wiki<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><A href="team.html" title="Team">Team</A></LI>
+	<LI><A href="users.html" title="Users">Users</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Developers"></A>Developers</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="source.html" title="Source">Source</A></LI>
+	<LI><A href="building.html" title="Building">Building</A></LI>
+	<LI><A href="ideas.html" title="Ideas">Ideas</A></LI>
+	<LI><A href="becoming-a-committer.html" title="Becoming a committer">Becoming a committer</A></LI>
+	<LI><A href="release-guide.html" title="Release Guide">Release Guide</A></LI>
+	<LI><A href="related-projects.html" title="Related Projects">Related Projects</A></LI>
+	<LI><A href="tools.html" title="Tools">Tools</A></LI>
+	<LI><A href="resources.html" title="Resources">Resources</A></LI>
+</UL>
+
+          </DIV>
+        </TD>
+        <TD valign="top">
+          <DIV id="site-page">
+
+<!--          
+            <div class="pagetitle">file binding old</div>
+-->
+            <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 [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">[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 [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
+[INFO] XmlBeanDefinitionReader - -Loading XML bean definitions from file [C:\Program Files\servicemix-1.0.1\examples\file-binding\servicemi.xml]
+[INFO] FileSystemXmlApplicationContext - -Bean factory <SPAN class="code-keyword">for</SPAN> application context [org.springframework.context.support.FileSystemXmlApplication
+Context;hashCode=7486844]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [workManager,jbi]; root of BeanFactory hierarchy
+[INFO] FileSystemXmlApplicationContext - -2 beans defined in application context
+[org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=7486844]
+[INFO] CollectionFactory - -JDK 1.4+ collections available
+[INFO] CollectionFactory - -Commons Collections 3.x available
+[INFO] FileSystemXmlApplicationContext - -Unable to locate MessageSource with name &apos;messageSource&apos;: using <SPAN class="code-keyword">default</SPAN> [org.springframework.conte
+xt.support.DelegatingMessageSource@1d6776d]
+[INFO] FileSystemXmlApplicationContext - -Unable to locate ApplicationEventMulticaster with name &apos;applicationEventMulticaster&apos;: using defaul
+t [org.springframework.context.event.SimpleApplicationEventMulticaster@4fce71]
+[INFO] DefaultListableBeanFactory - -Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanF
+actory defining beans [workManager,jbi]; root of BeanFactory hierarchy]
+[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;workManager&apos;
+[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean &apos;jbi&apos;
+Created MBeanServer with ID: 203c31:106bd250a5b:-7fff:Lisas:1
+[INFO] SpringInitialContextFactory - -Loading JNDI context from: class path resource [jndi.xml]
+[INFO] XmlBeanDefinitionReader - -Loading XML bean definitions from class path resource [jndi.xml]
+[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>[INFO] JBIContainer - -ServiceMix JBI Container (http:<SPAN class="code-comment">//servicemix.org/) name: defaultJBI running version: ServiceMix.
+</SPAN>[INFO] JBIContainer - -Activating component <SPAN class="code-keyword">for</SPAN>: [container=defaultJBI,name=fileSender,id=fileSender] with service: fileSender component: org.servicemix.components.file.FileWriter@b1cc87
+[INFO] ComponentContextImpl - -Component: fileSender activated endpoint: fileSender : fileSender
+[INFO] JBIContainer - -Activating component <SPAN class="code-keyword">for</SPAN>: [container=defaultJBI,name=filePoller,id=filePoller] with service: filePoller component: or
+g.servicemix.components.file.FilePoller@183e7de
+[INFO] ComponentContextImpl - -Component: filePoller activated endpoint: filePoller : filePoller
+[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="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=14589">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

Modified: incubator/servicemix/site/main/jbi-components.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/main/jbi-components.html?view=diff&rev=471420&r1=471419&r2=471420
==============================================================================
--- incubator/servicemix/site/main/jbi-components.html (original)
+++ incubator/servicemix/site/main/jbi-components.html Sun Nov  5 05:31:36 2006
@@ -113,7 +113,7 @@
 <!--          
             <div class="pagetitle">JBI Components</div>
 -->
-            <DIV class="wiki-content"><UL><LI><A href="servicemix-bean.html" title="servicemix-bean">servicemix-bean</A></LI><LI><A href="servicemix-bpe.html" title="servicemix-bpe">servicemix-bpe</A></LI><LI><A href="servicemix-eip.html" title="servicemix-eip">servicemix-eip</A></LI><LI><A href="servicemix-file.html" title="servicemix-file">servicemix-file</A></LI><LI><A href="servicemix-ftp.html" title="servicemix-ftp">servicemix-ftp</A></LI><LI><A href="servicemix-http.html" title="servicemix-http">servicemix-http</A></LI><LI><A href="servicemix-jms.html" title="servicemix-jms">servicemix-jms</A></LI><LI><A href="servicemix-jsr181.html" title="servicemix-jsr181">servicemix-jsr181</A></LI><LI><A href="servicemix-lwcontainer.html" title="servicemix-lwcontainer">servicemix-lwcontainer</A></LI><LI><A href="servicemix-wsn2005.html" title="servicemix-wsn2005">servicemix-wsn2005</A></LI><LI><A href="servicemix-xmpp.html" title="servicemix-xmpp">servicemix-xmpp</A><UL><LI><A href
 ="xmpp-integration-testing.html" title="XMPP Integration Testing">XMPP Integration Testing</A></LI></UL></LI></UL></DIV>
+            <DIV class="wiki-content"><UL><LI><A href="servicemix-bean.html" title="servicemix-bean">servicemix-bean</A></LI><LI><A href="servicemix-bpe.html" title="servicemix-bpe">servicemix-bpe</A></LI><LI><A href="servicemix-eip.html" title="servicemix-eip">servicemix-eip</A></LI><LI><A href="servicemix-file.html" title="servicemix-file">servicemix-file</A></LI><LI><A href="servicemix-ftp.html" title="servicemix-ftp">servicemix-ftp</A></LI><LI><A href="servicemix-http.html" title="servicemix-http">servicemix-http</A></LI><LI><A href="servicemix-jms.html" title="servicemix-jms">servicemix-jms</A></LI><LI><A href="servicemix-jsr181.html" title="servicemix-jsr181">servicemix-jsr181</A></LI><LI><A href="servicemix-lwcontainer.html" title="servicemix-lwcontainer">servicemix-lwcontainer</A></LI><LI><A href="servicemix-wsn2005-old.html" title="servicemix-wsn2005 old">servicemix-wsn2005 old</A></LI><LI><A href="servicemix-xmpp.html" title="servicemix-xmpp">servicemix-xmpp</A><UL
 ><LI><A href="xmpp-integration-testing.html" title="XMPP Integration Testing">XMPP Integration Testing</A></LI></UL></LI></UL></DIV>
           
         <!--
           <div class="tabletitle">
@@ -133,16 +133,13 @@
                           <a href="http://goopen.org/confluence/display/SM/servicemix- http" title="servicemix- http">servicemix- http</a>
               <span class="smalltext">(ServiceMix)</span>
               <br>
-                          <a href="http://goopen.org/confluence/display/SM/servicemix- jsr181" title="servicemix- jsr181">servicemix- jsr181</a>
-              <span class="smalltext">(ServiceMix)</span>
-              <br>
                           <a href="http://goopen.org/confluence/display/SM/servicemix- jms" title="servicemix- jms">servicemix- jms</a>
               <span class="smalltext">(ServiceMix)</span>
               <br>
                           <a href="http://goopen.org/confluence/display/SM/servicemix- eip" title="servicemix- eip">servicemix- eip</a>
               <span class="smalltext">(ServiceMix)</span>
               <br>
-                          <a href="http://goopen.org/confluence/display/SM/servicemix- wsn2005" title="servicemix- wsn2005">servicemix- wsn2005</a>
+                          <a href="http://goopen.org/confluence/display/SM/servicemix- wsn2005+old" title="servicemix- wsn2005 old">servicemix- wsn2005 old</a>
               <span class="smalltext">(ServiceMix)</span>
               <br>
                           <a href="http://goopen.org/confluence/display/SM/servicemix- ftp" title="servicemix- ftp">servicemix- ftp</a>
@@ -155,6 +152,9 @@
               <span class="smalltext">(ServiceMix)</span>
               <br>
                           <a href="http://goopen.org/confluence/display/SM/servicemix- bean" title="servicemix- bean">servicemix- bean</a>
+              <span class="smalltext">(ServiceMix)</span>
+              <br>
+                          <a href="http://goopen.org/confluence/display/SM/servicemix- jsr181" title="servicemix- jsr181">servicemix- jsr181</a>
               <span class="smalltext">(ServiceMix)</span>
               <br>
                       </div>

Added: incubator/servicemix/site/main/servicemix-wsn2005-old.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/main/servicemix-wsn2005-old.html?view=auto&rev=471420
==============================================================================
--- incubator/servicemix/site/main/servicemix-wsn2005-old.html (added)
+++ incubator/servicemix/site/main/servicemix-wsn2005-old.html Sun Nov  5 05:31:36 2006
@@ -0,0 +1,135 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+<!--
+    Pier's plugin always overwrites the stylesheet so lets explicitly use another one
+    <link type="text/css" rel="stylesheet" href="autoexport:///SM/resources/space.css">
+-->
+    <LINK type="text/css" rel="stylesheet" href="resources/site.css">
+    <SCRIPT src="resources/space.js" type="text/javascript"></SCRIPT>
+    <TITLE>
+servicemix-wsn2005 old
+    </TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+
+    <!-- Banner -->
+    <DIV id="site-banner">
+
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" class="topbardiv" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/servicemix/main/images/logo.jpg">
+          </TD>
+          <TD align="right" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+          </TD>
+        </TR> 
+      </TABLE>
+
+    </DIV>
+
+    <!-- Bread crumbs and Quick Links -->
+    <DIV id="site-navbar">
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" valign="middle" nowrap="">
+            <DIV id="site-breadcrumbs">
+<A href="home.html" title="ServiceMix">ServiceMix</A>&nbsp;&gt;&nbsp;<A href="home.html" title="Home">Home</A>&nbsp;&gt;&nbsp;<A href="documentation.html" title="Documentation">Documentation</A>&nbsp;&gt;&nbsp;<A href="components.html" title="Components">Components</A>&nbsp;&gt;&nbsp;<A href="jbi-components.html" title="JBI Components">JBI Components</A>&nbsp;&gt;&nbsp;<A href="" title="servicemix-wsn2005 old">servicemix-wsn2005 old</A>
+            </DIV>
+          </TD>
+          <TD align="right" valign="middle" nowrap="">
+            <DIV id="site-quicklinks">
+<P><A href="download.html" title="Download">Download</A> &#124; <A href="documentation.html" title="Documentation">Documentation</A> &#124; <A href="javadocs.html" title="JavaDocs">JavaDocs</A> &#124; <A href="source.html" title="Source">Source</A> &#124; <SPAN class="nobr"><A href="home.html" title="Visit page outside Confluence" rel="nofollow">Wiki<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> &#124; <A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A> &#124; <A href="support.html" title="Support">Support</A></P>
+            </DIV>
+          </TD>
+        </TR> 
+      </TABLE>
+    </DIV>
+
+<!-- Integrate google search later.
+          <form name="search" action="http://www.google.com/search" method="get">
+            <input type="hidden" name="ie" value="UTF- 8" />
+            <input type="hidden" name="oe" value="UTF- 8" />
+            <input type="hidden" name="domains" value="" />
+            <input type="hidden" name="sitesearch" value="" />
+            <input type="text" name="q" maxlength="255" value="" />        
+            <input type="submit" name="btnG" value="Google Search" />
+          </form>
+-->
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-navigation">
+<H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="home.html" title="Home">Home</A></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">ASF<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><A href="license.html" title="License">License</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="download.html" title="Download">Download</A></LI>
+	<LI><A href="sitemap.html" title="SiteMap">SiteMap</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Community"></A>Community</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="../SM30UG/users-guide.html" title="User's Guide">User&apos;s Guide</A></LI>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
+	<LI><A href="support.html" title="Support">Support</A></LI>
+	<LI><A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A></LI>
+	<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+	<LI><SPAN class="nobr"><A href="http://issues.apache.org/activemq/browse/SM" title="Visit page outside Confluence" rel="nofollow">Issues<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><A href="contributing.html" title="Contributing">Contributing</A></LI>
+	<LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/listpages-dirview.action?key=SM" title="Visit page outside Confluence" rel="nofollow">Wiki<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><A href="team.html" title="Team">Team</A></LI>
+	<LI><A href="users.html" title="Users">Users</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Developers"></A>Developers</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="source.html" title="Source">Source</A></LI>
+	<LI><A href="building.html" title="Building">Building</A></LI>
+	<LI><A href="ideas.html" title="Ideas">Ideas</A></LI>
+	<LI><A href="becoming-a-committer.html" title="Becoming a committer">Becoming a committer</A></LI>
+	<LI><A href="release-guide.html" title="Release Guide">Release Guide</A></LI>
+	<LI><A href="related-projects.html" title="Related Projects">Related Projects</A></LI>
+	<LI><A href="tools.html" title="Tools">Tools</A></LI>
+	<LI><A href="resources.html" title="Resources">Resources</A></LI>
+</UL>
+
+          </DIV>
+        </TD>
+        <TD valign="top">
+          <DIV id="site-page">
+
+<!--          
+            <div class="pagetitle">servicemix- wsn2005 old</div>
+-->
+            <DIV class="wiki-content"><P>ServiceMix ships with an implementation of WS-Notification in the servicemix-wsn2005 jbi component.<BR>
+See <A href="../SM30UG/servicemix-wsn2005.html" title="servicemix-wsn2005">WS Notification</A> for more informations.</P></DIV>
+          
+                  </DIV>
+        </TD>
+      </TR>
+      </TABLE>     
+      </DIV>
+    </DIV>
+    <DIV id="site-footer">
+          Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnt">gnt</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=2042&originalId=14587">view change</A>)
+              
+      (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=2042">edit page</A>)
+    </DIV>
+
+  </BODY>
+
+</HTML>
\ No newline at end of file