running hawtio in standalone camel app

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

running hawtio in standalone camel app

kiranreddykasa
Hi

How to run http://hawt.io/ hawtio in standalone camel app?

I tried this


   
    io.hawt.embedded.Main hawtioMain=new io.hawt.embedded.Main();
   
    hawtioMain.setContextPath("/hawtio");
    hawtioMain.setPort(8000);
    hawtioMain.setWar("D:\\camelworkspace\\camelactivemq");
    hawtioMain.run();
   
    AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext(
                                "classpath:/META-INF/spring/camel-context*.xml");
        Main main = new Main();
        main.setApplicationContext(applicationContext);
        main.enableHangupSupport();
        main.addRouteBuilder(new CustomeRouteBuilder());
        CamelContext camelContext=applicationContext.getBean(CamelContext.class);
        camelContext.addService(new DatabaseService());
       main.run(args);
       
   
hawtioMain.run() is blocking and the control is not returning  to load camel, Is there any way I can run this?
Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: running hawtio in standalone camel app

jstrachan
One quick option is to run hawtio stand alone via its executable jar
then connect to any other JVM:
http://hawt.io/getstarted/index.html

Though if you want to run hawtio & camel stand alone, outside of a
container (by embedding an internal Jetty container under the covers)
I raised this issue to enable it:
https://github.com/hawtio/hawtio/issues/508

Its now fixed in master; I'll cut 1.2-M11 shortly with this fix. So
you can now either call:

  main.run(false);

or

  main.setJoinServerThread(false);


On 3 September 2013 12:47, kiranreddykasa <[hidden email]> wrote:

> Hi
>
> How to run  http://hawt.io/ <http://hawt.io/>   hawtio in standalone camel
> app?
>
> I tried this
>
>
>
>         io.hawt.embedded.Main hawtioMain=new io.hawt.embedded.Main();
>
>         hawtioMain.setContextPath("/hawtio");
>         hawtioMain.setPort(8000);
>         hawtioMain.setWar("D:\\camelworkspace\\camelactivemq");
>         hawtioMain.run();
>
>         AbstractApplicationContext applicationContext = new
> ClassPathXmlApplicationContext(
>                                 "classpath:/META-INF/spring/camel-context*.xml");
>         Main main = new Main();
>         main.setApplicationContext(applicationContext);
>         main.enableHangupSupport();
>         main.addRouteBuilder(new CustomeRouteBuilder());
>         CamelContext
> camelContext=applicationContext.getBean(CamelContext.class);
>         camelContext.addService(new DatabaseService());
>        main.run(args);
>
>
> hawtioMain.run() is blocking and the control is not returning  to load
> camel, Is there any way I can run this?
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/running-hawtio-in-standalone-camel-app-tp5738579.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
James
-------
Red Hat

Email: [hidden email]
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration
Reply | Threaded
Open this post in threaded view
|

Re: running hawtio in standalone camel app

kiranreddykasa
Thanks
Regards

kiran Reddy