commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Griffiths <nicobre...@gmail.com>
Subject Re: svn commit: r1023303 - in /commons/proper/daemon/trunk: RELEASE-NOTES.txt src/java/org/apache/commons/daemon/Daemon.java src/java/org/apache/commons/daemon/DaemonInitException.java src/java/org/apache/commons/daemon/support/DaemonLoader.java
Date Sun, 17 Oct 2010 11:58:50 GMT
OK, i've removed the other use of getCause and modified the SimpleDaemon to
use the exception if it can't bind to its server port.

I'm going to have a look and see if I can get the failure message to come
out on stderr, as well as out to the logs (if they are used). Reason being
that if you are running /etc/init.d/my-jsvc-daemon start you will see the
actual failure reason, rather than just inspecting $? and then having to
trawl through the logs.


Cheers,
Nick

On Sat, Oct 16, 2010 at 11:05 PM, Nick Griffiths <nicobrevin@gmail.com>wrote:

> Ah crap. Will fix tomo.
> On 16 Oct 2010 16:34, "sebb" <sebbaz@gmail.com> wrote:
> > On 16 October 2010 15:58, <mturk@apache.org> wrote:
> >> Author: mturk
> >> Date: Sat Oct 16 14:58:39 2010
> >> New Revision: 1023303
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1023303&view=rev
> >> Log:
> >> DAEMON-177: Allow fail during init. Patch provided by Nick Griffiths
> >>
> >> Added:
> >>
>  commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/DaemonInitException.java
>   (with props)
> >> Modified:
> >>    commons/proper/daemon/trunk/RELEASE-NOTES.txt
> >>
>  commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/Daemon.java
> >>
>  commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonLoader.java
> >>
> >
> >> Modified:
> commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonLoader.java
> >> URL:
> http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonLoader.java?rev=1023303&r1=1023302&r2=1023303&view=diff
> >>
> ==============================================================================
> >> ---
> commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonLoader.java
> (original)
> >> +++
> commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonLoader.java
> Sat Oct 16 14:58:39 2010
> >> @@ -19,7 +19,9 @@ package org.apache.commons.daemon.suppor
> >>
> >>  import org.apache.commons.daemon.DaemonContext;
> >>  import org.apache.commons.daemon.DaemonController;
> >> +import org.apache.commons.daemon.DaemonInitException;
> >>
> >> +import java.lang.reflect.InvocationTargetException;
> >>  import java.lang.reflect.Method;
> >>
> >>  /*
> >> @@ -169,6 +171,15 @@ public final class DaemonLoader
> >>                 init.invoke(daemon, arg);
> >>             }
> >>
> >> +        } catch (InvocationTargetException e) {
> >> +          Throwable thrown = e.getCause();
> >
> > That's not available in 1.3.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message