[jbossws-commits] JBossWS SVN: r8412 - framework/trunk/src/main/java/org/jboss/wsf/framework/deployment.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Thu Oct 9 09:59:15 EDT 2008
Author: richard.opalka at jboss.com
Date: 2008-10-09 09:59:15 -0400 (Thu, 09 Oct 2008)
New Revision: 8412
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java
Log:
[JBWS-2246][JBWS-2264][JBAS-5732][JBWS-2339] implementing ugly hacks at the moment
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java 2008-10-09 13:52:24 UTC (rev 8411)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractAspectizedEndpointServlet.java 2008-10-09 13:59:15 UTC (rev 8412)
@@ -24,6 +24,7 @@
import org.jboss.wsf.spi.DeploymentAspectManagerLocator;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
/**
@@ -62,10 +63,14 @@
protected final void startAspectManager()
{
this.assertCorrectState();
+
final Deployment dep = this.endpoint.getService().getDeployment();
- this.aspectsManager.create(dep, null);
- this.aspectsManager.start(dep, null);
+ if (this.endpoint.getState() != EndpointState.STARTED) // [JBWS-2338] TODO fix this hack preventing exceptions
+ {
+ this.aspectsManager.create(dep, null);
+ this.aspectsManager.start(dep, null);
+ }
}
/**
@@ -75,18 +80,22 @@
protected final void stopAspectManager()
{
this.assertCorrectState();
+
final Deployment dep = this.endpoint.getService().getDeployment();
- try
+ if (this.endpoint.getState() == EndpointState.STARTED) // [JBWS-2338] TODO fix this hack preventing exceptions
{
- this.aspectsManager.stop(dep, null);
- this.aspectsManager.destroy(dep, null);
+ try
+ {
+ this.aspectsManager.stop(dep, null);
+ this.aspectsManager.destroy(dep, null);
+ }
+ finally
+ {
+ this.aspectsManager = null;
+ super.stopAspectManager();
+ }
}
- finally
- {
- this.aspectsManager = null;
- super.stopAspectManager();
- }
}
/**
@@ -95,9 +104,10 @@
@Override
protected final void startEndpoint()
{
- if (this.endpoint.getState() == EndpointState.CREATED)
+ Deployment dep = this.endpoint.getService().getDeployment();
+ for (Endpoint ep : dep.getService().getEndpoints())
{
- this.endpoint.getLifecycleHandler().start(this.endpoint);
+ ep.getLifecycleHandler().start(ep); // [JBWS-2338] TODO fix this hack preventing exceptions
}
}
@@ -109,7 +119,11 @@
{
if (this.endpoint.getState() == EndpointState.STARTED)
{
- this.endpoint.getLifecycleHandler().stop(this.endpoint);
+ Deployment dep = this.endpoint.getService().getDeployment();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ ep.getLifecycleHandler().stop(ep); // [JBWS-2338] TODO fix this hack preventing exceptions
+ }
}
}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java 2008-10-09 13:52:24 UTC (rev 8411)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java 2008-10-09 13:59:15 UTC (rev 8412)
@@ -35,7 +35,6 @@
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
import org.jboss.wsf.spi.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
@@ -70,9 +69,7 @@
{
super.init(servletConfig);
this.initRegistry();
- this.initServiceEndpoint(servletConfig.getServletContext().getContextPath());
- this.postInit(servletConfig);
- this.startEndpoint();
+ this.initServiceEndpoint(servletConfig);
}
/**
@@ -82,8 +79,8 @@
{
try
{
- this.stopEndpoint();
this.stopAspectManager();
+ this.stopEndpoint();
}
finally
{
@@ -169,12 +166,14 @@
/**
* Initialize the service endpoint
*/
- private void initServiceEndpoint(String contextPath)
+ private void initServiceEndpoint(ServletConfig servletConfig)
{
- this.initEndpoint(contextPath, getServletName());
+ this.initEndpoint(servletConfig.getServletContext().getContextPath(), getServletName());
this.initAspectManager();
this.setRuntimeLoader();
this.startAspectManager();
+ this.postInit(servletConfig);
+ this.startEndpoint();
}
/**
More information about the jbossws-commits
mailing list