You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by newbiee <m_...@hotmail.com> on 2011/10/03 21:46:27 UTC
CAMEL project in a web application
I want to try a CAMEL example in my Test environment:
Following is the example:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Content based router
${header.CamelFileName} regex '^.*xml$'
${header.CamelFileName} regex '^.*(csv|csl)$'
I put this code in
"serviceMix\apache-servicemix-4.3.0\apache-servicemix-4.3.0\deploy". I was
able to see that this route has been created and an ID had been given to it.
When I run it, all the activities take place in hte CAMLE folder i.e.
serviceMix\apache-servicemix-4.3.0\apache-servicemix-4.3.0\camel
The service (moving files from input folder to output1, output2 etc.
continues happening as soon as a files arrives in the input folder provided
that service mix is running.
Now I want to run this example in a web application. So I need to understand
the process and all the tools that I need to make it work:
1. I will need to install CAMEL in my test environment I understand that,
but what else will I need to install i.e. do I need to download any
dependencies separately?
2. Let's say CAMEL is installed in C drive and my web Application is also
running in C drive. My web application has a source folder and I'm going to
define destination folders according to the example shown above. What
changes will I need to make so that the above application would poll from
the folder of the web application and then move files in the folder on the
web application.
3. How will I have to bundle the above application and deploy it in the web
application.
4. How will the above application be started and once started it should
continously poll the folder for the files.
Please explain whatever is needed to make this application work in my test
environment with the web applcation.
--
View this message in context: http://camel.465427.n5.nabble.com/CAMEL-project-in-a-web-application-tp4866255p4866255.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CAMEL project in a web application
Posted by boday <be...@initekconsulting.com>.
same as your other post...
to run a Camel app in "dev" mode, just use the
http://camel.apache.org/camel-maven-plugin.html camel maven plugin .
Otherwise, you can package your app as a
http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html
WAR and run it with either
http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin maven jetty plugin
or drop it into Tomcat
newbiee wrote:
>
> I want to try a CAMEL example in my Test environment:
>
> Following is the example:
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?><blueprint
> xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>
> <camelContext xmlns="http://camel.apache.org/schema/blueprint">
> <route>
> <from uri="file:camel/input"/>
> <choice>
> <description>Content based router</description>
> <when>
> <language language="simple">${header.CamelFileName} regex
> '^.*xml$'</language>
> <to uri="file:camel/output1"/>
> </when>
> <when>
> <language language="simple">${header.CamelFileName} regex
> '^.*(csv|csl)$'</language>
> <to uri="file:camel/output2"/>
> </when>
> <otherwise>
> <to uri="file:camel/output3"/>
> <stop/>
> </otherwise>
> </choice>
> </route>
> </camelContext>
> </blueprint>
>
> I put this code in
> "serviceMix\apache-servicemix-4.3.0\apache-servicemix-4.3.0\deploy". I was
> able to see that this route has been created and an ID had been given to
> it. When I run it, all the activities take place in hte CAMLE folder i.e.
>
> serviceMix\apache-servicemix-4.3.0\apache-servicemix-4.3.0\camel
> The service (moving files from input folder to output1, output2 etc.
> continues happening as soon as a files arrives in the input folder
> provided that service mix is running.
>
> Now I want to run this example in a web application. So I need to
> understand the process and all the tools that I need to make it work:
>
> 1. I will need to install CAMEL in my test environment I understand that,
> but what else will I need to install i.e. do I need to download any
> dependencies separately?
> 2. Let's say CAMEL is installed in C drive and my web Application is also
> running in C drive. My web application has a source folder and I'm going
> to define destination folders according to the example shown above. What
> changes will I need to make so that the above application would poll from
> the folder of the web application and then move files in the folder on the
> web application.
> 3. How will I have to bundle the above application and deploy it in the
> web application.
> 4. How will the above application be started and once started it should
> continously poll the folder for the files.
>
> Please explain whatever is needed to make this application work in my test
> environment with the web applcation.
>
-----
Ben O'Day
IT Consultant -http://consulting-notes.com
--
View this message in context: http://camel.465427.n5.nabble.com/CAMEL-project-in-a-web-application-tp4866255p4866811.html
Sent from the Camel - Users mailing list archive at Nabble.com.