Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ABD6DE4EA for ; Thu, 7 Mar 2013 13:42:50 +0000 (UTC) Received: (qmail 10582 invoked by uid 500); 7 Mar 2013 13:42:49 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 10240 invoked by uid 500); 7 Mar 2013 13:42:45 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 10216 invoked by uid 99); 7 Mar 2013 13:42:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 13:42:45 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of iemmons@bbn.com designates 128.33.1.81 as permitted sender) Received: from [128.33.1.81] (HELO smtp.bbn.com) (128.33.1.81) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 13:42:37 +0000 Received: from smp.bbn.com ([192.1.122.26]:41232) by smtp.bbn.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1UDb5L-0001Cn-NT for user@commons.apache.org; Thu, 07 Mar 2013 08:42:15 -0500 Received: from ros-dhcp192-1-51-25.bbn.com ([192.1.51.25]:65288) by smp.bbn.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1UDb5L-000Oay-If for user@commons.apache.org; Thu, 07 Mar 2013 08:42:15 -0500 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: [daemon] jsvc won't recognize my entry point class From: Ian Emmons In-Reply-To: <51361F0A.40702@apache.org> Date: Thu, 7 Mar 2013 08:42:12 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <8E27C4DB-C508-497D-BB7C-61C92F296E1F@bbn.com> References: <6935DB1C-22BD-4C4B-B602-60DA591D0D74@bbn.com> <15018474-C76D-42A3-9C25-05F5D73853A0@bbn.com> <51361F0A.40702@apache.org> To: "Commons Users List" X-Mailer: Apple Mail (2.1499) X-Authenticated-User: iemmons X-Virus-Checked: Checked by ClamAV on apache.org On Mar 5, 2013, at 11:36 AM, Mladen Turk 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). >>=20 >> 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. >>=20 >> 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. >=20 > 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: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org