Yes, you can do it without code.
I take an example using the JBI packaging.
We're going to create two SUs : one based on the file BC, another one
based on JMS BC. Theses two SUs will be packaged in one SA.
The most important is the xbean.xml : it's the SU descriptor. Using
SMX4, you can gather the two xbean.xml definition into one XML file.
First, we define a servicemix-file endpoint acting as poller (reading
file into a directory) :
<file:poller service="smx:my" endpoint="file"
targetService="smx:my" targetEndpoint="jms"
file="file:target/myDir"/>
Warning: the default file marshaler expects for XML files. If you want
to support another kind of file, you need to define your own marshaler.
Now, we can describe the JMS as provider (sending message into a queue).
We describe this into the JMS SU's xbean.xml :
<jms:provider service="smx:my" endpoint="jms"
destinationName="queue"
connectionFactory="#connectionFactory"/>
<beans xmlns:amqpool="http://jencks.org/amqpool/2.0"> <amqpool:xa-pool
id="connectionFactory" url="tcp://localhost:61616"
transactionManager="#transactionManager"/>
Hope that it helps you.
Regards
JB
Glenn Macgregor wrote:
Ok, sorry for jumping the gun on the post. It seems like it takes a few mvn
runs before all the dependencies get resolved...
So now I have SMX4 built, installed and running and I want to create a simple
example.
How would I configure the servicemix-file component to watch a directory and
put all files that appear in that dir on an activemq queue? Is this possible
without java code?
Thanks
Glenn
From: Glenn Macgregor
Sent: 26 March 2009 14:26
To: '[email protected]'
Subject: Example problem
Hi all,
Just getting started with servicemix...and maven, I am having a problem
building the cxf-wsdl-first example. I run maven install and it goes off and
downloads many packages but for many of them I get:
Unable to find resource
Downloading:
http://download.java.net/maven/2/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom
[INFO] Unable to find resource
'org.codehaus.plexus:plexus-interpolation:pom:1.6' in repository java.net.2
(http://download.java.net/maven/2)
I am really looking forward to getting servicemix going, so any help on this
issue would be great.
Thanks
Glenn