Versions Compared

Key

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

...

Info
titleDownload ServiceMix/JBoss Deployer Bundle

You can download the ServiceMix 2.0 release bundled with the JBoss deployer here

 

Currently the deployer is available from Subversion in tooling/jboss-deployer, the build process is completely managed by Maven, though you will first need to install a SAR plugin for Maven to allow it to build the SAR (Service Archive) for the JBoss deployer. This can be done by checking out tooling/maven-sar-plugin and running:

No Format
maven plugin:install

 

This will install the SAR plugin you can download the jboss-deployer code and run the following goal in Maven:

No Format
maven sar:install

 

You will then find a jboss-deployer-2.0.sar in the target directory, simply take this and drop it in your JBoss deploy directory (currently only tested on JBos 4.0.3), and away you go!!! Want to see it in action? You should be able to drop the JBI RI Transformation Engine example straight into the deploy directory and watch it pick up. Suddenly you have JBI enabled your JBoss Server!

...

Info
titleUseful Information

Note that if you are planning on using the components that ship with ServiceMix there libraries are not included in the ServiceMix JBoss deployer, therefore you will need to copy your $SERVICEMIX_HOME/lib and $SERVICEMIX_HOME/lib/optional directories to your application server's library path (ie. $JBOSS_HOME/server/default/lib).

 

Since it is this approach that most people start with we added the ability to deploy this Spring JBI configurations onto JBoss, in .  In order to do this, deploy the jboss-deployer-2.0.sar deployer that you see below and then . Next, take a servicemix.xml configuration file and rename it so that it ends in -sm.xml (ie. filebind-sm.xml), then .  Place the configuration file in the JBoss deploy directory.   Before you do that, you will need to make same basic modification some basic modifications to the configuration file to get it running:, namely you will need to make sure that the createMBeanServer property is false.  Below is the file binding example configured to run under JBoss.

Example filebinding-sm.xml for ServiceMix 2.0

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xbean.org/schemas/spring/1.0"
	xmlns:spring="http://xbean.org/schemas/spring/1.0"
	xmlns:sm="http://servicemix.org/config/1.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"	
	xmlns:foo="http://servicemix.org/demo/">

	<!-- the JBI container -->
	<sm:container id="jbi" useMBeanServer="false"
		createMBeanServer="false" dumpStats="true" statsInterval="10">

		<sm:activationSpecs>

			<!-- Write files to the outbox directory -->
			<sm:activationSpec componentName="fileSender"
				service="foo:fileSender">
				<sm:component>
					<bean xmlns="http://xbean.org/schemas/spring/1.0"
						class="org.servicemix.components.file.FileWriter">
						<property name="directory" value="outbox" />
						<property name="marshaler">
							<bean
								class="org.servicemix.components.util.DefaultFileMarshaler">
								<property name="fileName">
									<bean
										class="org.servicemix.expression.JaxenStringXPathExpression">
										<constructor-arg
											value="concat('sample_', /sample/@id, '.xml')" />
									</bean>
								</property>
							</bean>
						</property>
					</bean>
				</sm:component>
			</sm:activationSpec>

			<!-- Look for files in the inbox directory -->
			<sm:activationSpec componentName="filePoller"
				destinationService="foo:fileSender" service="foo:filePoller">
				<sm:component>
					<bean xmlns="http://xbean.org/schemas/spring/1.0"
						class="org.servicemix.components.file.FilePoller">
						<property name="workManager" ref="workManager" />
						<property name="file" value="inbox" />
						<property name="period" value="1000" />
					</bean>
				</sm:component>
			</sm:activationSpec>
		</sm:activationSpecs>
	</sm:container>

	<!-- the work manager (thread pool) for this container -->
	<bean id="workManager"
		class="org.jencks.factory.WorkManagerFactoryBean">
		<property name="threadPoolSize" value="30" />
	</bean>

</beans>

Above is the file binding example, however note that to run under JBoss you need to make sure that the createMBeanServer property is false.