[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [equinox-dev] Daemonize Equinox
- From: "Murphree, Michael" <Michael.Murphree@xxxxxxxxxxxxx>
- Date: Thu, 6 Mar 2008 13:11:32 -0500
- Delivered-to: email@example.com
- Importance: normal
- Priority: normal
- Thread-index: Ach/WxizxfQTyJNBRLaiNVigb5b0PAAQwI3w
- Thread-topic: [equinox-dev] Daemonize Equinox
It isn't necessarily "standard" but I've used Tanuki Software's Java Service Wrapper ( http://wrapper.tanukisoftware.org/doc/english/introduction.html ) to create an Equinox "server" to good effect. The trick is to hack on org.eclipse.equinox.launcher.Main ever so lightly to accomplish three things:
1. Gain access to the OSGi runtime so that you can propagate shutdown signals from the OS into the OSGi framework for graceful shutdown.
2. Interface the Main class to the Tanuki libraries.
3. Make the startup return in a timely fashion for the wrapper (the existing one blocks until shutdown).
You'll lose the UI (splash handler) interfaces, but gain operation as a daemon on Unix-like systems and as a Windows service on NT-like systems.
One last hint: You won't be able to subclass Main, as there are a few methods that you need to override that are private that you have to get into. You'll have to make a copy and hack.
I hope this helps.
From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Srijith Kochunni
Sent: Thursday, March 06, 2008 2:12 AM
Subject: [equinox-dev] Daemonize Equinox
I am looking at possible methods to daemonize the equinox process. Found some indormation of how I can pre-load bundles etc, on teh Equnix QuickStart Guide, but they do not talk about a facility to daemonize the process. I was wondering whether there is any Eclipse runtime options. osgi.noShutdown, but it does not seem to be for that purpose. Is there any standard procedure to daemonize the equinox osgi runtime.? or should it be treated like any other Java Application, possibly use a Java Service Wrapper or so..
I also read about an Headless Equinox Launcher http://willcode4beer.com/ware.jsp?set=equinoxBootstrap , but this does not seem like a standard implementation.
Has anyone done this before..? Any inputs on how an Equinox setup should be daemonized would be truly helpful
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.