What would be the best way to programatically add servicmix-bean endpoints?
I have a bunch of service classes that implement a Task interface, which has
a process method, which processes a common model (Task.process(Block
block)). I've created a MessageExchangeListener, which takes in a Task
object as a dependency, and pulls a block object from a NRM message
property, processes that block object, and then puts the block object back
into a message and sends it along. This works great, but I would like to
create a component which will programatically pull any Task objects from the
spring application context, create a MessageExcangeListener wrapper object
for each Task object, and set it as an endpoint. This sounded much simpler
than it turns out to be.
I had a hard time getting the JBIContainer, and finally got it using the
reflection workaround and using a servicmix-jsr181 component, but then I was
having library issues trying to get the servicemix-bean component so that I
could add endpoints to it
(jbi.getComponent("servicmix-bean").getComponent().addEndpoint(myEndpoint))
I've been banging my head against this for a few days, so I wanted to see if
I was going about this the right way.
Thanks, Will
--
View this message in context:
http://www.nabble.com/Programatically-adding-servicemix-bean-endpoints-tp22793162p22793162.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.