Author: veithen
Date: Sun May 11 09:37:58 2014
New Revision: 1593765
URL: http://svn.apache.org/r1593765
Log:
AXIS2-5646: Fixed some NPEs that occur when stopping the Axis2 OSGi bundle.
Modified:
axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
Modified:
axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java?rev=1593765&r1=1593764&r2=1593765&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
(original)
+++ axis/axis2/java/core/trunk/modules/osgi-tests/src/test/java/OSGiTest.java
Sun May 11 09:37:58 2014
@@ -107,8 +107,7 @@ public class OSGiTest {
OMElement result = serviceClient.sendReceive(payload);
assertEquals("getVersionResponse", result.getLocalName());
// Stop the Axis2 bundle explicitly here so that we can test that
it cleanly shuts down
- // TODO: doesn't work yet; see AXIS2-5646
-// getAxis2Bundle(container).stop();
+ getAxis2Bundle(container).stop();
} finally {
container.stop();
}
Modified:
axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java?rev=1593765&r1=1593764&r2=1593765&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
(original)
+++
axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
Sun May 11 09:37:58 2014
@@ -54,4 +54,11 @@ public class OSGiAxisServlet extends Axi
}
}
+
+ @Override
+ public void destroy() {
+ // Do nothing. This prevents AxisServlet from terminating the
configuration context.
+ // The configuration context is terminated by
OSGiConfigurationContextFactory, and
+ // invoking the terminate method twice (potentially concurrently)
causes problems.
+ }
}