You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2014/03/20 11:13:23 UTC

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Hi

Yeah Apache Camel is just a library and its container agnostic -
meaning that you can run and use Camel anywhere you want - just
requires Java JVM.

There is plenty of documentation how to develop web applications for
Apache Tomcat (eg WAR files).

There is some details here
http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html



On Thu, Mar 20, 2014 at 11:04 AM, N.S.KARTHIK <ns...@gmail.com> wrote:
> Hi
>
> Spec : Jdk1.7
> O/s : RedHat Linux
> Camel : Latest
>
>   Question : I know using Fuse / Eclipse Ide, Camel basic Http routes can be
> written  and executed.
>                  But Instead of Executing the same on "SERVICE MIX" env  can
> i use Tomcat  for processing the
>                  Camel routes.
>
>  Note :  the Routes devloped are
>                                  a) Routes of WebService using CFX
>                                  b) Routes with db connectivity to store the
> info from webservice.
>
>
>
> with regards
> karthik
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by Charlie Mordant <cm...@gmail.com>.
Hi Karthik,

Camel-spring uses standard spring beans, so the packaging will be the same
as a spring war/jar, or even a ultra customized one.
You just have to reference your spring context xml in your war web.xml
(like this:
http://stackoverflow.com/questions/6451377/loading-context-in-spring-using-web-xml
).

Regards,


2014-03-27 1:53 GMT+01:00 N.S.KARTHIK <ns...@gmail.com>:

> Hi
>
> >>No its just standard WAR deployment for Tomcat or any other JEE web
> container.
>
>
> I need to hide all my "Camel DSL Spring XML/Java" Routes in a Jar file.
>
> This jar file would be part of the /WEB-INF/lib/Route-X.jar  as standards
> of
> Web contaner specifications.
>
> Question : How different is the packaging structure in jar of the  "Camel
> DSL Spring XML" for the Web-container ?
>
> *[ since for SMIX all spring XML's  should /would be  packaged as  "/
> META-INF / spring / camel-context.xml" ] *
>
>
> with regards
> karthik
> Claus Ibsen-2 wrote
> > On Wed, Mar 26, 2014 at 8:39 AM, N.S.KARTHIK &lt;
>
> > nskarthik.k@
>
> > &gt; wrote:
> >> Hi
> >>
> >> On Tomcat the "Camel DSL-Spring / java Routes" will be part of the war
> as
> >> "WEB-INF/lib" as  jar file  and
> >>
> >> within the war in "/WEB-INF/applicationContext.xml"  file  declaring a
> >>
> > <packageScan>
> >>
> >> to scan  all of the Jars from local context to process.
> >>
> >>
> >> Finally For Tomcat deployment
> >>
> >> 1) Would the OSGI within "MANIFEST.MF" still need to be part of the jar
> ?
> >>
> >
> > No that is only needed for deploying to OSGi containers.
> >
> >> 2) Would the packaging of "Camel DSL-Spring / java Routes" be in a
> >> specific
> >> format for Tomcat deployment.
> >>
> >
> > No its just standard WAR deployment for Tomcat or any other JEE web
> > container.
> >
> >>
> >> Note: - I did not fine this packaging info on Camel Site [
> >> https://camel.apache.org/spring.html ]
> >>
> >>
> >> with regards
> >> Karthik
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749379.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > Email:
>
> > cibsen@
>
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
> > Make your Camel applications look hawt, try: http://hawt.io
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749406.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by "N.S.KARTHIK" <ns...@gmail.com>.
Hi

>>No its just standard WAR deployment for Tomcat or any other JEE web
container. 


I need to hide all my "Camel DSL Spring XML/Java" Routes in a Jar file.

This jar file would be part of the /WEB-INF/lib/Route-X.jar  as standards of 
Web contaner specifications.

Question : How different is the packaging structure in jar of the  "Camel
DSL Spring XML" for the Web-container ?

*[ since for SMIX all spring XML's  should /would be  packaged as  "/
META-INF / spring / camel-context.xml" ] *


with regards
karthik
Claus Ibsen-2 wrote
> On Wed, Mar 26, 2014 at 8:39 AM, N.S.KARTHIK &lt;

> nskarthik.k@

> &gt; wrote:
>> Hi
>>
>> On Tomcat the "Camel DSL-Spring / java Routes" will be part of the war as
>> "WEB-INF/lib" as  jar file  and
>>
>> within the war in "/WEB-INF/applicationContext.xml"  file  declaring a
>> 
> <packageScan>
>>
>> to scan  all of the Jars from local context to process.
>>
>>
>> Finally For Tomcat deployment
>>
>> 1) Would the OSGI within "MANIFEST.MF" still need to be part of the jar ?
>>
> 
> No that is only needed for deploying to OSGi containers.
> 
>> 2) Would the packaging of "Camel DSL-Spring / java Routes" be in a
>> specific
>> format for Tomcat deployment.
>>
> 
> No its just standard WAR deployment for Tomcat or any other JEE web
> container.
> 
>>
>> Note: - I did not fine this packaging info on Camel Site [
>> https://camel.apache.org/spring.html ]
>>
>>
>> with regards
>> Karthik
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749379.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: 

> cibsen@

> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io





--
View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749406.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Mar 26, 2014 at 8:39 AM, N.S.KARTHIK <ns...@gmail.com> wrote:
> Hi
>
> On Tomcat the "Camel DSL-Spring / java Routes" will be part of the war as
> "WEB-INF/lib" as  jar file  and
>
> within the war in "/WEB-INF/applicationContext.xml"  file  declaring a
> <packageScan>
>
> to scan  all of the Jars from local context to process.
>
>
> Finally For Tomcat deployment
>
> 1) Would the OSGI within "MANIFEST.MF" still need to be part of the jar ?
>

No that is only needed for deploying to OSGi containers.

> 2) Would the packaging of "Camel DSL-Spring / java Routes" be in a specific
> format for Tomcat deployment.
>

No its just standard WAR deployment for Tomcat or any other JEE web container.

>
> Note: - I did not fine this packaging info on Camel Site [
> https://camel.apache.org/spring.html ]
>
>
> with regards
> Karthik
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749379.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by "N.S.KARTHIK" <ns...@gmail.com>.
Hi

On Tomcat the "Camel DSL-Spring / java Routes" will be part of the war as 
"WEB-INF/lib" as  jar file  and  

within the war in "/WEB-INF/applicationContext.xml"  file  declaring a
<packageScan> 

to scan  all of the Jars from local context to process.


Finally For Tomcat deployment

1) Would the OSGI within "MANIFEST.MF" still need to be part of the jar ? 

2) Would the packaging of "Camel DSL-Spring / java Routes" be in a specific
format for Tomcat deployment. 


Note: - I did not fine this packaging info on Camel Site [
https://camel.apache.org/spring.html ]


with regards
Karthik



--
View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749379.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Mar 26, 2014 at 8:13 AM, N.S.KARTHIK <ns...@gmail.com> wrote:
> Hi
>
> Thx for the qk reply.
>
> *>>Could a bunch of "Camel Routes" be part of  WEB-INF/lib/jar"*
>
> I would prefer to use "DSL Spring & java " based routes.
>
> Are there any Specific packaging structure changes for deployment in TOMCAT
> ,  Compared to packaging for  servicemix techniques.
>

Yes its WAR (= Tomcat) vs OSGi (= SMX).
See the link in my previous mails about Tomcat.

For SMX its more complicated with OSGi and packaging your code as a
bundle et all.


>
>
> with regards
> Karthik
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749375.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by "N.S.KARTHIK" <ns...@gmail.com>.
Hi

Thx for the qk reply.

*>>Could a bunch of "Camel Routes" be part of  WEB-INF/lib/jar"*

I would prefer to use "DSL Spring & java " based routes.

Are there any Specific packaging structure changes for deployment in TOMCAT
,  Compared to packaging for  servicemix techniques.



with regards
Karthik



--
View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749375.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah you can define your routes in Java code
https://camel.apache.org/java-dsl.html

And if you are using spring then you can refer to these route builder
classes from the spring xml file
https://camel.apache.org/spring.html

Or tell Camel to use package scanning etc to find the route builder
classes to use.

On Wed, Mar 26, 2014 at 7:00 AM, N.S.KARTHIK <ns...@gmail.com> wrote:
> HI
>
> Thx  for the Info and Sorry for Delay to replay ....
>
> Now To make the task more Intresting.
>
> Ref:
> http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html
>
> Question : Could a bunch of "*Camel Routes" be part of  WEB-INF/lib/jar*"
> file instead of hardcoding in
>
> "applicationContext.xml file" .
>
> Reason : Need to hide the Routing complexity & pre-causion.
>
>
> How could this be achieved ?
>
>
> with regards
> Karthik
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749369.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Came DSL ( Spring Routes ) on Tomcat (insted of Servicemix )

Posted by "N.S.KARTHIK" <ns...@gmail.com>.
HI

Thx  for the Info and Sorry for Delay to replay ....

Now To make the task more Intresting.

Ref:
http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html

Question : Could a bunch of "*Camel Routes" be part of  WEB-INF/lib/jar*"
file instead of hardcoding in

"applicationContext.xml file" .

Reason : Need to hide the Routing complexity & pre-causion.
               

How could this be achieved ?


with regards
Karthik



--
View this message in context: http://camel.465427.n5.nabble.com/Came-DSL-Spring-Routes-on-Tomcat-insted-of-Servicemix-tp5749137p5749369.html
Sent from the Camel - Users mailing list archive at Nabble.com.