[jbossws-commits] JBossWS SVN: r8391 - framework/trunk/src/main/java/org/jboss/wsf/framework/deployment.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Oct 8 09:50:40 EDT 2008
Author: richard.opalka at jboss.com
Date: 2008-10-08 09:50:40 -0400 (Wed, 08 Oct 2008)
New Revision: 8391
Removed:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointServletLifecycleDeploymentAspect.java
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java
Log:
[JBWS-2246][JBWS-2264][JBAS-5732] endpoint lifecycle START and STOP events must be handled in servlet lifecycle methods
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-08 13:45:40 UTC (rev 8390)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/AbstractEndpointServlet.java 2008-10-08 13:50:40 UTC (rev 8391)
@@ -35,6 +35,7 @@
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;
@@ -71,6 +72,7 @@
this.initRegistry();
this.initServiceEndpoint(servletConfig.getServletContext().getContextPath());
this.postInit(servletConfig);
+ this.startEndpoint();
}
/**
@@ -80,6 +82,7 @@
{
try
{
+ this.stopEndpoint();
this.stopAspectManager();
}
finally
@@ -202,4 +205,20 @@
}
}
+ private void startEndpoint()
+ {
+ if (this.endpoint.getState() == EndpointState.CREATED)
+ {
+ this.endpoint.getLifecycleHandler().start(this.endpoint);
+ }
+ }
+
+ private void stopEndpoint()
+ {
+ if (this.endpoint.getState() == EndpointState.STARTED)
+ {
+ this.endpoint.getLifecycleHandler().stop(this.endpoint);
+ }
+ }
+
}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointServletLifecycleDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointServletLifecycleDeploymentAspect.java 2008-10-08 13:45:40 UTC (rev 8390)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointServletLifecycleDeploymentAspect.java 2008-10-08 13:50:40 UTC (rev 8391)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.deployment;
-
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * Lifecycle deployer handler dealing with START and STOP only
- * @author richard.opalka at jboss.com
- */
-public class EndpointServletLifecycleDeploymentAspect extends EndpointLifecycleDeploymentAspect
-{
- @Override
- public void create(Deployment dep, WSFRuntime runtime)
- {
- // do nothing in servlet
- }
-
- @Override
- public void destroy(Deployment dep, WSFRuntime runtime)
- {
- // do nothing in servlet
- }
-}
More information about the jbossws-commits
mailing list