6 Replies Latest reply on Jun 23, 2009 9:16 AM by dinesh_gioe

    DSL: FUSE Integration Designer 1.2

    jkhan

      I have created a simple loopback example using DSL. The flow is JMS -> Contentbase -> JMS

           public void configure() throws Exception {

               // Define routing rules here:

               from("activemq:Queue.RQ").

               choice()

                .when().xpath("/test = 'test'")

                     .to("activemq:ReplyQ1")

                .otherwise()

                     .to("activemq:ReplyQ2");

                

                 

           }

      I added my project to SMX4.1 server and saw a zip file which has the my code. Attached is the TestDSL.zip. This zip contains jbi.xml and dsl-project.zip files. The dsl-project.zip contains the camel-context.xml, jbi.xml, TestDSL.class and TestDSL.java files. It gets deployed and osgi status is Active too but not connecting to Activemq queues.  Can someone suggest what I need to do?

      I tried debugging and put a breakpoint but nothing happens. How do I debug also?  

      Thanks

      Jawed

       

      Edited by: jkhan on Jun 1, 2009 6:59 PM

        • 1. Re: DSL: FUSE Integration Designer 1.2
          spindipr

          Hi Jawed,

           

          While using JMS Endpoints in the JAVA DSL Project, You need to code the below statement in Java Program.

           

          1. you need to create an instance of ActiveMQConnectionFactory and define your connection URL in that.

          For Example,

          ActiveMQConnectionFactory act=new ActiveMQConnectionFactory("tcp://localhost:61616");

           

          2. you need to add the component to the Connection Factory and get the context of the connection, this can be achieved by below code.

          this.getContext().addComponent("ActiveMQ", JmsComponent.jmsComponentAutoAcknowledge(act));

           

          After these steps you start building your route.

           

          I have attached my sample project(TestDSL).

           

          Hope this helps you.

           

          Thanks,

          Sailaja.

          • 2. Re: DSL: FUSE Integration Designer 1.2
            jkhan

            Hi Sailaja,

            Thank you. I did try your example and still not connecting to ActiveMQ. Attached is the TestDSL.zip which you can deploy in SMX4.1. 

             

            Thanks

            Jawed

            • 3. Re: DSL: FUSE Integration Designer 1.2
              spindipr

              Hi Jawed,

               

              In your attached project, below code is missing in the java class.

               

              ActiveMQConnectionFactory act=new ActiveMQConnectionFactory("tcp://localhost:61616");

                        this.getContext().addComponent("ActiveMQ", JmsComponent.jmsComponentAutoAcknowledge(act));

               

              And also your code seems to be invalid.

              The syntax for defining the queue seems to be incorrect (from("activemq:Queue.RQ")) and it should be like this from("activemq:queue:RQ") and even in the to (to("activemq:ReplyQ1")) part you dint mention whether it is a topic or queue.

               

              I have attached the zip file(CBRTest.zip) which worked fine.

              Import the attached zip file(CBRTest.zip) into the workspace and configure the project build path with the respective jars files and also the JVM. Now deploy the project into SMX4.1 server which is already configured and started in the servers view. Now publish the server.

               

              Still if it doesn't work please attach the service mix log file,it will help us for debugging.

               

              Thanks,

              Sailaja.

               

              Edited by: spindipr on Jun 3, 2009 10:12 AM

              • 4. Re: DSL: FUSE Integration Designer 1.2
                dinesh_gioe

                Hi Jawed,

                 

                Did you find some time to try out the solution provided by Sailaja? Could you please let me know if you are still getting the problems in running the sample?

                 

                Thanks

                Dinesh

                • 5. Re: DSL: FUSE Integration Designer 1.2
                  jkhan

                  Hi Dinesh,

                  Yes, I tried and works fine inside FUSE ESB 4.1(while running outside) not in FID. But I can't run as standalone like EIP Design. I didn't spend that much time on this. I haven't add the    

                  public static void main(String[] args) {

                          new Main().run(args);

                      }

                  inside the RouteBuilder yet.

                   

                  Thanks

                  Jawed

                  • 6. Re: DSL: FUSE Integration Designer 1.2
                    dinesh_gioe

                    Hi Jawed,

                     

                    Which project you have tried to deploy? Is it TestDSL or CBRTest?

                     

                    Are you facing any problems in starting the FUSE ESB 4.1 inside the FID? If so, do you have any exceptions anywhere? Can you provide the screen shot? Also provide us the servicemix.log file which is located in the \data\log folder.

                     

                    Thanks

                    Dinesh