synchronized (connectors) {
for (Connector connector: connectors) {
try {
- connector.start();
+ // If it has already failed, don't try and start it
+ if (connector.getState() != LifecycleState.FAILED) {
+ connector.start();
+ }
} catch (Exception e) {
log.error(sm.getString(
"standardService.connector.startFailed",
}
setState(LifecycleState.INITIALIZING);
- initInternal();
+ try {
+ initInternal();
+ } catch (LifecycleException e) {
+ setState(LifecycleState.FAILED);
+ throw e;
+ }
setState(LifecycleState.INITIALIZED);
}
setState(LifecycleState.STOPPING_PREP);
- stopInternal();
+ try {
+ stopInternal();
+ } catch (LifecycleException e) {
+ setState(LifecycleState.FAILED);
+ throw e;
+ }
if (state.equals(LifecycleState.MUST_DESTROY)) {
// Complete stop process first
destroy();
} else {
- // Shouldn't be necessary but acts as a check that sub-classes are doing
- // what they are supposed to.
+ // Shouldn't be necessary but acts as a check that sub-classes are
+ // doing what they are supposed to.
if (!state.equals(LifecycleState.STOPPING)) {
invalidTransition(Lifecycle.AFTER_STOP_EVENT);
}
setState(LifecycleState.DESTROYING);
- destroyInternal();
+ try {
+ destroyInternal();
+ } catch (LifecycleException e) {
+ setState(LifecycleState.FAILED);
+ throw e;
+ }
setState(LifecycleState.DESTROYED);
}
the pool when a web application is stopped. (slaurent)
</add>
<fix>
+ <bug>49372</bug>: Re-fix after connector re-factoring. If connector
+ initialisation fails (e.g. if a port is alreasy in use) do not trigger
+ an <code>LifecycleException</code> for an invalid state transition.
+ (markt)
+ </fix>
+ <fix>
<bug>49650</bug>: Remove unnecessary entries package.access property
defined in catalina.properties. Patch provided by Owen Farrell. (markt)
</fix>