import org.apache.catalina.LifecycleState;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.res.StringManager;
try {
initInternal();
- } catch (LifecycleException e) {
+ } catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
setStateInternal(LifecycleState.FAILED, null, false);
- throw e;
+ throw new LifecycleException(
+ sm.getString("lifecycleBase.initFail",toString()), t);
}
setStateInternal(LifecycleState.INITIALIZED, null, false);
try {
startInternal();
- } catch (LifecycleException e) {
+ } catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
setStateInternal(LifecycleState.FAILED, null, false);
- throw e;
+ throw new LifecycleException(
+ sm.getString("lifecycleBase.startFail",toString()), t);
}
if (state.equals(LifecycleState.FAILED) ||
try {
stopInternal();
- } catch (LifecycleException e) {
+ } catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
setStateInternal(LifecycleState.FAILED, null, false);
- throw e;
+ throw new LifecycleException(
+ sm.getString("lifecycleBase.stopFail",toString()), t);
}
if (state.equals(LifecycleState.MUST_DESTROY)) {
try {
destroyInternal();
- } catch (LifecycleException e) {
+ } catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
setStateInternal(LifecycleState.FAILED, null, false);
- throw e;
+ throw new LifecycleException(
+ sm.getString("lifecycleBase.destroyFail",toString()), t);
}
setStateInternal(LifecycleState.DESTROYED, null, false);
extensionValidator.extension-not-found-error=ExtensionValidator[{0}][{1}]: Required extension [{2}] not found.
extensionValidator.extension-validation-error=ExtensionValidator[{0}]: Failure to find [{1}] required extension(s).
extensionValidator.failload=Failure loading extension [{0}]
-lifecycleBase.initMBeanFail=Failed to register component [{0}] with MBean name [{1}]
+lifecycleBase.alreadyDestroyed=The destroy() method was called on component [{0}] after destroy() had already been called. The second call will be ignored.
lifecycleBase.alreadyStarted=The start() method was called on component [{0}] after start() had already been called. The second call will be ignored.
lifecycleBase.alreadyStopped=The stop() method was called on component [{0}] after stop() had already been called. The second call will be ignored.
-lifecycleBase.alreadyDestroyed=The destroy() method was called on component [{0}] after destroy() had already been called. The second call will be ignored.
+lifecycleBase.destroyFail=Failed to destroy component [{0}]
+lifecycleBase.initFail=Failed to initialize component [{0}]
+lifecycleBase.initMBeanFail=Failed to register component [{0}] with MBean name [{1}]
lifecycleBase.invalidTransition=An invalid Lifecycle transition was attempted ([{0}]) for component [{1}] in state [{2}]
lifecycleBase.setState=Setting state for [{0}] to [{1}]
+lifecycleBase.startFail=Failed to start component [{0}]
+lifecycleBase.stopFail=Failed to stop component [{0}]
lifecycleMBeanBase.registerFail=Failed to register object [{0}] with name [{0}] during component initialisation
lifecycleMBeanBase.unregisterFail=Failed to unregister MBean with name [{0}] during component destruction
lifecycleMBeanBase.unregisterNoServer=No MBean server was available to unregister the MBean [{0}]