You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Creedinger <cr...@web.de> on 2012/01/31 15:19:27 UTC

Camel-Web-Console in Non-Web Camel-Application with Maven

Hi. 
I have problems understanding the use of the web-console. Is it made for
Camel-Web-Applications only or is it possible to monitor an regular java-app
which includes some camel stuff? 

I only got as far as integrating jetty into my project and starting it
including the camel-web-console component. But I have to start jetty in a
new thread so it does not block my main thread while running the servlet.
After starting jetty I have access to the web-console. The only problem is,
that it does not show any information about existing camel-routes or
messages send in the main process (which has its own camel context). Is
there any way to "connect" the context within the java application to the
web-console? 

All routes that are use within the project are defined via Java DSL and not
Spring DSL. I don't want to change that. 

I have read some threads, but as far as I understood it they were all about
integrating the web-console into a maven-web project. 

In summary I did this: 
*Create a mvn-project
*Code Route-Class by inheriting from RouteBuilder
*Code MainClass which sets up the Routes and sends some Messages 

*Within the POM-File I include: Jetty, Camel-Webconsole-Standalone,
Camel-Web ...
*Within the POM-File I use the Plugins: Jetty-Plugin, AssemblyPlugin ... 

*Assembly.xml which Builds the war-File which gets included in the main jar. 

*Second class that starts Jetty as a different Process. 

I would be very thankful for any advice where to read or what to do. 

Best regards
Creedinger

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Web-Console-in-Non-Web-Camel-Application-with-Maven-tp5444640p5444640.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-Web-Console in Non-Web Camel-Application with Maven

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Jan 31, 2012 at 3:19 PM, Creedinger <cr...@web.de> wrote:
> Hi.
> I have problems understanding the use of the web-console. Is it made for
> Camel-Web-Applications only or is it possible to monitor an regular java-app
> which includes some camel stuff?
>

Its for web-apps only. And it can only monitor the camel apps in the
same WAR file.
Its really just for developers to play with and for light
administration of a Camel WAR app.


> I only got as far as integrating jetty into my project and starting it
> including the camel-web-console component. But I have to start jetty in a
> new thread so it does not block my main thread while running the servlet.
> After starting jetty I have access to the web-console. The only problem is,
> that it does not show any information about existing camel-routes or
> messages send in the main process (which has its own camel context). Is
> there any way to "connect" the context within the java application to the
> web-console?
>
> All routes that are use within the project are defined via Java DSL and not
> Spring DSL. I don't want to change that.
>

It does not matter if routes is created using Java or XML DSL. The
Camel web console
should be able to detect them either way. However the current web
console only works with a WAR app,
and for the routes to be in the same WAR file.


> I have read some threads, but as far as I understood it they were all about
> integrating the web-console into a maven-web project.
>
> In summary I did this:
> *Create a mvn-project
> *Code Route-Class by inheriting from RouteBuilder
> *Code MainClass which sets up the Routes and sends some Messages
>
> *Within the POM-File I include: Jetty, Camel-Webconsole-Standalone,
> Camel-Web ...
> *Within the POM-File I use the Plugins: Jetty-Plugin, AssemblyPlugin ...
>
> *Assembly.xml which Builds the war-File which gets included in the main jar.
>
> *Second class that starts Jetty as a different Process.
>
> I would be very thankful for any advice where to read or what to do.
>
> Best regards
> Creedinger
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Web-Console-in-Non-Web-Camel-Application-with-Maven-tp5444640p5444640.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/