Author: thomas.diesler(a)jboss.com
Date: 2007-08-09 03:58:53 -0400 (Thu, 09 Aug 2007)
New Revision: 4274
Modified:
framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java
Log:
log error instead of throwing ISE
Modified:
framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java
===================================================================
---
framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java 2007-08-09
07:48:33 UTC (rev 4273)
+++
framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java 2007-08-09
07:58:53 UTC (rev 4274)
@@ -59,12 +59,16 @@
EndpointState state = ep.getState();
if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
- throw new IllegalStateException("Cannot start endpoint in state: " +
state);
+ {
+ log.error("Cannot start endpoint in state: " + state);
+ }
+ else
+ {
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().start();
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().start();
-
- ep.setState(EndpointState.STARTED);
+ ep.setState(EndpointState.STARTED);
+ }
}
public void stop(Endpoint ep)
@@ -73,12 +77,16 @@
EndpointState state = ep.getState();
if (state != EndpointState.STARTED)
- throw new IllegalStateException("Cannot stop endpoint in state: " +
state);
+ {
+ log.error("Cannot stop endpoint in state: " + state);
+ }
+ else
+ {
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().stop();
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().stop();
-
- ep.setState(EndpointState.STOPPED);
+ ep.setState(EndpointState.STOPPED);
+ }
}
public void destroy(Endpoint ep)
Show replies by date