You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Aaron Daubman <da...@gmail.com> on 2012/04/09 05:07:19 UTC

Looking for example init.d script for starting a camel-based application on system boot

Greetings,

I'm wondering if anybody has any example/working/in-use init.d scripts used
to start up a standalone camel-based app?

I'm currently using the Main class from camel-spring, but am flexible. I am
not using any container...

I have read through Camel In Action Chapter 13 as well as
http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.htmlbut
would find some larger/production examples, along with the init.d
script (e.g. do people use nohup for starting java apps in production?) and
even your apps' 'main' if you can share it, to be very helpful.

Things like preference for how to demonize, rule-of-thumb/common vm-args,
any settings tweaked in main, etc... would be appreciated.

Thanks,
     Aaron

Re: Looking for example init.d script for starting a camel-based application on system boot

Posted by Willem jiang <wi...@gmail.com>.
Thanks for sharing this with us. 

-- 
Willem jiang


On Monday, August 6, 2012 at 12:38 AM, aedwards wrote:

> sorry about the late reply.
> 
> Here is a script i've used before which does what you're looking for.
> 
> https://github.com/abedwardsw/samples/blob/master/scripts/springc-initd
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Looking-for-example-init-d-script-for-starting-a-camel-based-application-on-system-boot-tp5626707p5716845.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
> 
> 



Re: Looking for example init.d script for starting a camel-based application on system boot

Posted by aedwards <ad...@middleware360.com>.
sorry about the late reply.

Here is a script i've used before which does what you're looking for.

https://github.com/abedwardsw/samples/blob/master/scripts/springc-initd



--
View this message in context: http://camel.465427.n5.nabble.com/Looking-for-example-init-d-script-for-starting-a-camel-based-application-on-system-boot-tp5626707p5716845.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Looking for example init.d script for starting a camel-based application on system boot

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

You can start the camel route as a common java programe as the url you 
found in the camel web site.
There is no any other specific option you should specify for the common 
use case.
I think you can copy the tomcat one by using the org.apache.camel.Main 
as the main class.

On Mon Apr  9 11:07:19 2012, Aaron Daubman wrote:
> Greetings,
>
> I'm wondering if anybody has any example/working/in-use init.d scripts used
> to start up a standalone camel-based app?
>
> I'm currently using the Main class from camel-spring, but am flexible. I am
> not using any container...
>
> I have read through Camel In Action Chapter 13 as well as
> http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.htmlbut
> would find some larger/production examples, along with the init.d
> script (e.g. do people use nohup for starting java apps in production?) and
> even your apps' 'main' if you can share it, to be very helpful.
>
> Things like preference for how to demonize, rule-of-thumb/common vm-args,
> any settings tweaked in main, etc... would be appreciated.
>
> Thanks,
>       Aaron
>



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Re: Looking for example init.d script for starting a camel-based application on system boot

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Apr 9, 2012 at 5:07 AM, Aaron Daubman <da...@gmail.com> wrote:
> Greetings,
>
> I'm wondering if anybody has any example/working/in-use init.d scripts used
> to start up a standalone camel-based app?
>
> I'm currently using the Main class from camel-spring, but am flexible. I am
> not using any container...
>
> I have read through Camel In Action Chapter 13 as well as
> http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.htmlbut
> would find some larger/production examples, along with the init.d
> script (e.g. do people use nohup for starting java apps in production?) and
> even your apps' 'main' if you can share it, to be very helpful.
>
> Things like preference for how to demonize, rule-of-thumb/common vm-args,
> any settings tweaked in main, etc... would be appreciated.
>

I guess you can take a look at other Java projects which is a server
and provides start/stop scripts and service wrappers to start
automatic upon restart. For example Apache Karaf, Apache ActiveMQ has
such scripts.

If you want a light-weight container then possible Apache Karaf can be
a good fit. It also offers more powerful management capabilities, so
you can access it over SSH, and it has a shell just like on the unix.

http://karaf.apache.org/manual/2.2.5/users-guide/wrapper.html
http://karaf.apache.org/manual/2.2.5/users-guide/remote-console.html

Also maybe checkout stackoverflow as it tend to be a good place to
find good talks about general stuff with Java etc.

> Thanks,
>     Aaron



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
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/