Author: richard.opalka(a)jboss.com
Date: 2008-11-04 00:54:16 -0500 (Tue, 04 Nov 2008)
New Revision: 8645
Removed:
common/trunk/src/main/java/org/jboss/wsf/common/concurrent/
Modified:
common/trunk/.classpath
common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java
Log:
[JBWS-2338] removing DAManagerLocator iface
Modified: common/trunk/.classpath
===================================================================
--- common/trunk/.classpath 2008-11-04 05:50:56 UTC (rev 8644)
+++ common/trunk/.classpath 2008-11-04 05:54:16 UTC (rev 8645)
@@ -4,5 +4,6 @@
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/jbossws-spi"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java
===================================================================
---
common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java 2008-11-04
05:50:56 UTC (rev 8644)
+++
common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java 2008-11-04
05:54:16 UTC (rev 8645)
@@ -31,13 +31,10 @@
import javax.servlet.http.HttpServletResponse;
import org.jboss.wsf.common.ObjectNameFactory;
-import org.jboss.wsf.spi.DeploymentAspectManagerLocator;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
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;
import org.jboss.wsf.spi.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
@@ -48,8 +45,6 @@
/**
* A cross stack webservice endpoint servlet.
- * Backward compatible mode is used on JBoss AS 4.2 series.
- * Not backward compatible mode is used on JBoss AS 5.0 series
* @author thomas.diesler(a)jboss.org
* @author heiko.braun(a)jboss.com
* @author richard.opalka(a)jboss.com
@@ -57,12 +52,9 @@
public abstract class AbstractEndpointServlet extends HttpServlet
{
- private static final String PROPERTY_NAME =
"org.jboss.ws.webapp.ServletAspectManagerName";
private final SPIProvider spiProvider =
SPIProviderResolver.getInstance().getProvider();
protected Endpoint endpoint;
private EndpointRegistry epRegistry;
- private DeploymentAspectManager aspectsManager;
- private boolean backwardCompatibilityMode;
/**
* Constructor
@@ -81,22 +73,6 @@
}
/**
- * Servlet lifecycle destroy method
- */
- public final void destroy()
- {
- try
- {
- this.stopAspectManager();
- this.stopEndpoint();
- }
- finally
- {
- super.destroy();
- }
- }
-
- /**
* Serves the requests
*/
public final void service(HttpServletRequest req, HttpServletResponse res)
@@ -124,100 +100,6 @@
}
/**
- * Initializes aspect manager if not backward compatible mode
- */
- private void initAspectManager()
- {
- final String managerName =
(String)this.endpoint.getService().getDeployment().getProperty(PROPERTY_NAME);
- if (managerName == null)
- {
- this.backwardCompatibilityMode = true;
- }
-
- if (!this.backwardCompatibilityMode)
- {
- final DeploymentAspectManagerLocator locator =
this.spiProvider.getSPI(DeploymentAspectManagerLocator.class);
- this.aspectsManager = locator.locateDeploymentAspectManager(managerName);
- }
- }
-
- /**
- * Starts servlet related aspects if not backward compatible mode
- */
- private void startAspectManager()
- {
- if (!this.backwardCompatibilityMode)
- {
- this.assertCorrectState();
-
- final Deployment dep = this.endpoint.getService().getDeployment();
-
- if (this.endpoint.getState() != EndpointState.STARTED) // [JBWS-2338] TODO fix
this hack preventing exceptions
- {
- this.aspectsManager.deploy(dep);
- }
- }
- }
-
- /**
- * Stops servlet related aspects if not backward compatible mode
- */
- private void stopAspectManager()
- {
- if (!this.backwardCompatibilityMode)
- {
- this.assertCorrectState();
-
- final Deployment dep = this.endpoint.getService().getDeployment();
-
- if (this.endpoint.getState() == EndpointState.STARTED) // [JBWS-2338] TODO fix
this hack preventing exceptions
- {
- try
- {
- this.aspectsManager.undeploy(dep);
- }
- finally
- {
- this.aspectsManager = null;
- }
- }
- }
- }
-
- /**
- * Fires endpoint start event if not backward compatible mode
- */
- private void startEndpoint()
- {
- if (!this.backwardCompatibilityMode)
- {
- Deployment dep = this.endpoint.getService().getDeployment();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- ep.getLifecycleHandler().start(ep); // [JBWS-2338] TODO fix this hack
preventing exceptions
- }
- }
- }
-
- /**
- * Fires endpoint stop event if not backward compatible mode
- */
- private void stopEndpoint()
- {
- if (!this.backwardCompatibilityMode)
- {
- if (this.endpoint.getState() == EndpointState.STARTED)
- {
- Deployment dep = this.endpoint.getService().getDeployment();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- ep.getLifecycleHandler().stop(ep); // [JBWS-2338] TODO fix this hack
preventing exceptions
- }
- }
- }
- }
-
- /**
* Abstract method that must be overriden by each stack servlet endpoint
* @param servletContext servlet context
* @param servletName servlet name
@@ -231,11 +113,8 @@
private void initServiceEndpoint(ServletConfig servletConfig)
{
this.initEndpoint(servletConfig.getServletContext().getContextPath(),
getServletName());
- this.initAspectManager();
this.setRuntimeLoader();
- this.startAspectManager();
this.postInit(servletConfig);
- this.startEndpoint();
}
/**
@@ -281,16 +160,4 @@
dep.setRuntimeClassLoader(classLoader);
}
}
-
- /**
- * Asserts this object correct state
- */
- private void assertCorrectState()
- {
- if (this.endpoint == null || this.aspectsManager == null)
- {
- throw new IllegalStateException();
- }
- }
-
}
Show replies by date