Author: richard.opalka(a)jboss.com
Date: 2009-08-10 04:48:08 -0400 (Mon, 10 Aug 2009)
New Revision: 10509
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
Log:
[JBWS-2720] fixing issue
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2009-08-10
08:38:28 UTC (rev 10508)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2009-08-10
08:48:08 UTC (rev 10509)
@@ -32,6 +32,7 @@
import org.jboss.wsf.common.servlet.AbstractEndpointServlet;
import javax.servlet.ServletConfig;
+import javax.xml.rpc.server.ServiceLifecycle;
/**
* A Native endpoint servlet that is installed for every web service endpoint
@@ -80,11 +81,19 @@
{
synchronized(this.preDestroyRegistry)
{
- for (PreDestroyHolder holder : this.preDestroyRegistry)
+ for (final PreDestroyHolder holder : this.preDestroyRegistry)
{
try
{
- InjectionHelper.callPreDestroyMethod(holder.getObject());
+ final Object targetBean = holder.getObject();
+ final boolean isJaxrpcLifecycleBean = targetBean instanceof
ServiceLifecycle;
+
+ InjectionHelper.callPreDestroyMethod(targetBean);
+ if (isJaxrpcLifecycleBean)
+ {
+ ((ServiceLifecycle)targetBean).destroy();
+ }
+
}
catch (Exception exception)
{