From 9dfe6017761b0a680355d9e4d39e3823b636f3cf Mon Sep 17 00:00:00 2001 From: Hugues Malphettes Date: Tue, 3 May 2011 03:57:24 +0000 Subject: [PATCH] bug 341736 Use a lifecyclelistener instead of extending the Connector itself git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3062 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../jetty/osgi/nested/NestedConnectorListener.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/nested/NestedConnectorListener.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/nested/NestedConnectorListener.java index db181a8a9ee..60cb4bec3ad 100644 --- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/nested/NestedConnectorListener.java +++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/nested/NestedConnectorListener.java @@ -24,8 +24,10 @@ import org.osgi.framework.FrameworkUtil; /** * Listens to the start and stop of the NestedConnector to register and unregister the NestedConnector * with the BridgeServlet. + *

* All interactions with the BridgeServlet are done via introspection to avoid depending on it directly. * The BridgeServlet lives in the bootstrap-webapp; not inside equinox. + *

*/ public class NestedConnectorListener extends AbstractLifeCycleListener { @@ -113,7 +115,11 @@ public class NestedConnectorListener extends AbstractLifeCycleListener } catch (Exception e) { - //Logger.getLogger("org.eclipse.jetty.osgi.nested").; + if (e instanceof RuntimeException) + { + throw (RuntimeException)e; + } + throw new RuntimeException("Unable to register the servlet delegate into the BridgeServlet.", e); } } @@ -126,7 +132,11 @@ public class NestedConnectorListener extends AbstractLifeCycleListener } catch (Exception e) { - e.printStackTrace(); + if (e instanceof RuntimeException) + { + throw (RuntimeException)e; + } + throw new RuntimeException("Unable to unregister the servlet delegate into the BridgeServlet.", e); } }