Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
 
 
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 for 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 'messageSource': using default [org.springframework.conte
xt.support.DelegatingMessageSource@1d6776d]
[INFO] FileSystemXmlApplicationContext - -Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': 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 'workManager'
[INFO] DefaultListableBeanFactory - -Creating shared instance of singleton bean 'jbi'
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 'jndi'
RMIConnectorServer started at: service:jmx:rmi://lisas/jndi/rmi://localhost:1099/defaultJBIJMX
[INFO] JBIContainer - -ServiceMix JBI Container (http://servicemix.org/) name: defaultJBI running version: ServiceMix.
[INFO] JBIContainer - -Activating component for: [container=defaultJBI,name=fileSender,id=fileSender] with service: fileSender component: or
gorg.servicemix.components.file.FileWriter@b1cc87
[INFO] ComponentContextImpl - -Component: fileSender activated endpoint: fileSender : fileSender
[INFO] JBIContainer - -Activating component for: [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 - -default destination serviceName for filePoller = fileSender


Details

The following table provides more details about the function of each component and bean in the servicemix.xml file.

Component or Bean ID

Description

filePoller

This component periodically checks the "inbox" directory - it recursively scans the inbox directory and subdirectories for new files. If there is a file present, it adds the file to the "workingSet" of the workManager. The workManger dispatches to a worker thread, which calls back into the filePoller to process a file from the workingSet. Processing consists of marshalling the file (streaming it from disk into a normalized message). The normalized message is sent over the Normalized Message Router (NMR) to the fileSender component per the specified "destinationService" which is specified in the servicmix.xml file in the filePoller component. In this case the "destinationService" is the fileSender component. Finally, after it has been processed, the filePoller deletes the file from the source directory.

fileSender

this component listens for normalized messages. The messages it receives are the files that filePoller has transferred to it via the NMR. It converts the normalized message to its original file format by processing it and sending it to the destination directory, in this case the outbox directory.

workManager

this This bean is used by the filePoller to increase the throughput of the application. The workManager is a thread pool whose size can be adjusted declaratively in the servicemix.xml file. The workManager processes the workingSet. The workingSet is the collection of files to be transfered over the NMR. The workManager continually dispatches a unit of work, i.e., a file transfer, to one of the threads in its pool, until the workingSet has been fully transfered.

...