0 Replies Latest reply on Dec 1, 2016 7:01 AM by Somaya Rayan

    How to use A-MQ bean that is defined in a camel route in switchyard

    Somaya Rayan Newbie

      I created a Java camel route and I defined an ActiveMQConnectionFactory object and added it as a bean like the below, then I created a reference in my switchyard and used a JMS binding and in the JMS binding details, I put the connection factory value as "#activeMQConnectionFactory", the bean that I defined it in the camel route but I got this exception "No bean could be found in the registry for: activeMQConnectionFactory of type: javax.jms.ConnectionFactory"

       

      Any help please?

       

      ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();

        activeMQConnectionFactory.setBrokerURL("tcp:/IP:Port/");

        activeMQConnectionFactory.setUserName("username");

        activeMQConnectionFactory.setPassword("password");

        from("switchyard://AMQService").bean(activeMQConnectionFactory, "createTopicConnection").log("Received message for 'AMQService' : ${body}");