You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Flavio Magacho - M4U <fl...@m4u.com.br> on 2012/10/10 00:21:00 UTC

Camel and JBoss

Hi,
Did anyone have used Camel with JBoss.
I mean, did anyone knows if we have a MBean that starts and takes care of a Camel Context?

I know that I can do that in many diferent ways, but it seems to be a common problems so . . .

Thanks,
Magacho
Flavio Magacho
Gerente de Desenvolvimento
Diretoria de Tecnologia da Informação
[cid:image001.gif@01CDA653.21546D90]  M4U
+55 (21) 2546-4050 ▪ Ramal: 4082
+55 (21) 8889-1572

þ Antes de imprimir, pense em sua responsabilidade e compromisso com o Meio Ambiente.
O conteúdo desta mensagem é confidencial e pode ser privilegiado. É vedada a sua cópia ou divulgação.
The contents of this message are confidential and may be privileged. Copying or disclosing is prohibited.



RE: Camel and JBoss

Posted by Gnanaguru S <gn...@wipro.com>.
Yeah, I hope Ravishankar has guessed you right. 

I dont have more to tell after that.

regards
Guru
@gnanaguru



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720906.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: Camel and JBoss

Posted by Flavio Magacho - M4U <fl...@m4u.com.br>.
I am talking about how to use Camel with JBoss and have some management functions like reloading the rules, have some statustics and stuff like that in a HTTP/JMX interface.
Did you got what I mean?

Thanks,
Magacho

-----Original Message-----
From: Gnanaguru S [mailto:gnanaguru.sattanathan@wipro.com] 
Sent: quarta-feira, 10 de outubro de 2012 01:14
To: users@camel.apache.org
Subject: Re: Camel and JBoss


Hello Flavio,

Yes I am currently working with Camel & JBoss. 

I was not able to understand your question, Can you elaborate ?

Regards
Guru
@gnanagurus



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720823.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel and JBoss

Posted by Gnanaguru S <gn...@wipro.com>.
Hello Flavio,

Yes I am currently working with Camel & JBoss. 

I was not able to understand your question, Can you elaborate ?

Regards
Guru
@gnanagurus



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720823.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel and JBoss

Posted by Chris Wolf <cw...@gmail.com>.
Yes.  You can load a plain Spring AppContext (with embedded Camel
context a/k/a "Spring DSL")  using JBoss's Spring Deployer, which is
available for JBoss 4,5, 6 and 7.

https://www.jboss.org/snowdrop

I find this is the cleanest method of deploying Camel on JBoss.

  -Chris

On Thu, Oct 11, 2012 at 12:12 PM, ravishankar.singaram
<by...@gmail.com> wrote:
> Flavio,
>
> We created a Dummy Spring bootstrap web application and loaded camel context
> similar to the lines of William's suggestion.
>
> Now that the subject has been brought up, is there a way to load the camel
> context in jboss deployment without a web application?
>
>
>
> -----
> Ravishankar Singaram
> Technical Lead
> Amadeus Software Labs
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720919.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel and JBoss

Posted by Willem jiang <wi...@gmail.com>.
You can also start a camel context by using the Camel web console[1].

[1]http://camel.apache.org/web-console.html 

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Friday, October 12, 2012 at 12:12 AM, ravishankar.singaram wrote:

> Flavio,
> 
> We created a Dummy Spring bootstrap web application and loaded camel context
> similar to the lines of William's suggestion.
> 
> Now that the subject has been brought up, is there a way to load the camel
> context in jboss deployment without a web application?
> 
> 
> 
> -----
> Ravishankar Singaram
> Technical Lead
> Amadeus Software Labs
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720919.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: Camel and JBoss

Posted by "ravishankar.singaram" <by...@gmail.com>.
Flavio,

We created a Dummy Spring bootstrap web application and loaded camel context
similar to the lines of William's suggestion.

Now that the subject has been brought up, is there a way to load the camel
context in jboss deployment without a web application?



-----
Ravishankar Singaram
Technical Lead
Amadeus Software Labs
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720919.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel and JBoss

Posted by Willem jiang <wi...@gmail.com>.
Hi,

You can use Spring web ContextLoaderListener in the Web.xml to load the camel context like this.

<web-app>
<!-- tell Spring where it should load the XML file -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:camelContext.xml</param-value>
</context-param>
<!-- spring context listener which loads the XML file -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>


….  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: willemjiang





On Thursday, October 11, 2012 at 9:43 PM, Flavio Magacho - M4U wrote:

> Ok raviwithyou, but how do you start the camel context?
> You use a Servlet in a web application?  
>  
>  
>  
> -----Original Message-----
> From: raviwithyou [mailto:bytes2ravi@gmail.com]  
> Sent: quarta-feira, 10 de outubro de 2012 03:25
> To: users@camel.apache.org (mailto:users@camel.apache.org)
> Subject: Re: Camel and JBoss
>  
> Hi,
>  
> Yes, we did.
> We created an MBean for managing our configurations and hooked up CamelContext to restart our routes.
>  
> There are many ways as you said, we tried to wire in CamelContext to our MBean as below in our camel-context.xml.
>  
> <camelContext autoStartup="true" id="camel"
> xmlns="http://camel.apache.org/schema/spring">
> ...</camelContext>
> <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"
> lazy-init="false">
> <property name="beans">
> <map>  
> <entry key="com.my.domainname:name=RoutesMgmtBean"
> value-ref="RoutesMgmtBean"/>
> </map>
> </property>
> </bean>
>  
> <bean id="RoutesMgmtBean" class="com.my.domainname.RunCamelApplication">
> <property name="context" ref="camel"/>
> </bean>
>  
>  
> Hope it helps!!!
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720831.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




RE: Camel and JBoss

Posted by Flavio Magacho - M4U <fl...@m4u.com.br>.
Ok raviwithyou, but how do you start the camel context?
You use a Servlet in a web application? 



-----Original Message-----
From: raviwithyou [mailto:bytes2ravi@gmail.com] 
Sent: quarta-feira, 10 de outubro de 2012 03:25
To: users@camel.apache.org
Subject: Re: Camel and JBoss

Hi,

Yes, we did.
We created an MBean for managing our configurations and hooked up CamelContext to restart our routes.

There are many ways as you said, we tried to wire in CamelContext to our MBean as below in our camel-context.xml.

	<camelContext autoStartup="true" id="camel"
xmlns="http://camel.apache.org/schema/spring">
...</camelContext>
	  <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
     <property name="beans">
      <map> 
        <entry key="com.my.domainname:name=RoutesMgmtBean"
value-ref="RoutesMgmtBean"/>
      </map>
    </property>
  </bean>

  <bean id="RoutesMgmtBean" class="com.my.domainname.RunCamelApplication">
    <property name="context" ref="camel"/>
  </bean>


Hope it helps!!!



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720831.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel and JBoss

Posted by raviwithyou <by...@gmail.com>.
Hi,

Yes, we did.
We created an MBean for managing our configurations and hooked up
CamelContext to restart our routes.

There are many ways as you said, we tried to wire in CamelContext to our
MBean as below in our camel-context.xml.

	<camelContext autoStartup="true" id="camel"
xmlns="http://camel.apache.org/schema/spring">
...</camelContext>
	  <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
     <property name="beans">
      <map> 
        <entry key="com.my.domainname:name=RoutesMgmtBean"
value-ref="RoutesMgmtBean"/>
      </map>
    </property>
  </bean>

  <bean id="RoutesMgmtBean" class="com.my.domainname.RunCamelApplication">
    <property name="context" ref="camel"/>
  </bean>


Hope it helps!!!



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-and-JBoss-tp5720819p5720831.html
Sent from the Camel - Users mailing list archive at Nabble.com.