Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
mvn archetype:create \
  -DarchetypeGroupId=org.apache.servicemix.tooling \
  -DarchetypeArtifactId=servicemix-file-service-unit \
  -DarchetypeVersion=2010.01 \
  -DgroupId=your.group.id \
  -DartifactId=your.artifact.id \
  -Dversion=your-version

Once you've customized the service unit, simply install the SU:

Code Block

mvn install
Info

Remember that to be deployable in ServiceMix, the ServiceUnit has to be embedded in a Service Assembly: only the Service Assembly zip file can be deployed in ServiceMix.
To add your SU in a SA, you need to define it in the dependency sets:

Code Block

<dependency>
  <groupId>your.group.id</groupId>
  <artifactId>your.artifact.id</artifactId>
  <version>your-version</version>
</dependency>

Endpoints Configuration

Poller Endpoint

...

In the example above, the Apache ORO jar must be in the classpath. See: http://jakarta.apache.org/oro/Image Removed

Code Block
langxml
titleServiceMix 3.2 Filter example
<file:poller service="test:poller" endpoint="poller"
	file="file:inbox" targetService="test:service"
	targetEndpoint="endpoint" period="10000" recursive="true">
        <property name="filter">
            <bean class="org.apache.commons.io.filefilter.WildcardFilter">
                <constructor-arg value="*.csv" />
            </bean>
        </property>
</file:poller>

In the example above it uses Apache Commons IO WildcardFilter as it implements FileFilter. The Apache Commons IO jar file must be in the classpath. See: http://commons.apache.org/io/Image Removed

Comparators

You can define an implementation of the java.util.Comparator interface to specifies the process order of the files.

...