2010/6/7 <[email protected]>:
> Author: markt
> Date: Sun Jun 6 21:50:11 2010
> New Revision: 952000
>
> URL: http://svn.apache.org/viewvc?rev=952000&view=rev
> Log:
> Make syncs consistent
> Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49372
> Avoid invalid Lifecycle transitions on failed start due to already bound
> shutdown port
>
> Modified:
> tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java
>
> +++ tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java Sun Jun 6
> 21:50:11 2010
> @@ -134,7 +134,12 @@ public abstract class LifecycleBase impl
>
> setState(LifecycleState.STARTING_PREP);
>
> - startInternal();
> + try {
> + startInternal();
> + } catch (LifecycleException e) {
> + setState(LifecycleState.FAILED);
> + throw e;
> + }
>
> if (state.equals(LifecycleState.FAILED) ||
> state.equals(LifecycleState.MUST_STOP)) {
Probably RuntimeException and Error should also move it into the
FAILED state? E.g.
boolean startDone = false;
try {
startInternal();
startDone = true;
} finally {
if (!startDone) {
setState(LifecycleState.FAILED);
}
}
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]