This content has been marked as final.
Show 3 replies
-
1. Re: How can i use switchyard camel with activemq?
beve Apr 26, 2012 7:45 AM (in response to alex.liu)Hi,
I've not had time to try this out yet, but in theory you should be able to use a CDI to specify a method that creates an ActiveMQComponent:
import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; import javax.inject.Named; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.camel.component.ActiveMQComponent; @ApplicationScoped public class ActiveMQComponentFactory { @Produces @Named ("activemq") public ActiveMQComponent createActiveMQComponent() { final ActiveMQComponent ac = new ActiveMQComponent(); final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(); factory.setBrokerURL("vm://localhost?broker.persistent=false&broker.useJmx=false"); ac.setConnectionFactory(factory); return ac; } }
In SwitchYard CDI components are available to Camel's registry so you can specify 'activemq' in the uri as shown below:
<camel:binding.camel configURI="activemq://TestQueue"/>
Regards,
/Daniel
-
2. Re: How can i use switchyard camel with activemq?
kcbabo Apr 26, 2012 9:41 AM (in response to beve)In addition to what Dan posted, you will also need to add the activemq camel component and dependencies as modules in the AS7 distribution.
I would be interested in hearing about how this turns out, so please post back with questions/results if you decide to try it yourself. If not, we'll probably get around crafting an example sooner or later.
-
3. Re: How can i use switchyard camel with activemq?
beve Apr 30, 2012 10:01 AM (in response to kcbabo)We've add a jira for this which you can find here: