On Mar 5, 2013, at 11:36 AM, Mladen Turk <[email protected]> wrote: > On 03/04/2013 06:00 PM, Ian Emmons wrote: >> Update: I've done some digging in the jsvc source code, and it appears to >> be at odds with the documentation [1]. The docs indicate that I can (a) >> write a Java class that implements the Daemon interface, or (b) define a >> class that implements four specific methods (init, start, stop, destroy, >> with specific signatures). >> >> If I choose (a), the docs say I needs to put the commons-daemon jar on my >> classpath (an obvious requirement), but if I choose (b), then the jar is not >> needed. However, the jsvc source code seems to load the DaemonLoader class >> in both cases, and so therefore the jar is always required. >> >> Can a someone familiar with the jsvc internals confirm this analysis? If I >> am correct, then I will enter a JIRA issue against the docs. > > Yes, commons-daemon is always required. If you do not specify Daemon > interface, it's still created internally and calls your methods. I don't see > anything that says that its not required. It's your presumption, so perhaps a > statement that its always needed would be more clear. You are welcome to > write something and if it make sense, I'll commit it.
The part of the docs I'm referring to is [1], where it shows two examples of invoking jsvc, one corresponding to case (a) and the other to case (b). The only difference between the two is that the example for case (b) omits the commons-daemon jar from the class path. The change I would suggest it to make the second example identical to the first. [1] http://commons.apache.org/proper/commons-daemon/jsvc.html#Using_jsvc --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
