Author: richard.opalka(a)jboss.com
Date: 2008-06-26 07:42:44 -0400 (Thu, 26 Jun 2008)
New Revision: 7738
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
container/jboss50/trunk/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
Log:
[JBAS-5257] refactoring
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-06-25
15:55:22 UTC (rev 7737)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-06-26
11:42:44 UTC (rev 7738)
@@ -37,7 +37,11 @@
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.transport.*;
+import org.jboss.wsf.spi.transport.TransportManager;
+import org.jboss.wsf.spi.transport.ListenerRef;
+import org.jboss.wsf.spi.transport.TransportSpec;
+import org.jboss.wsf.spi.transport.HttpSpec;
+import org.jboss.wsf.spi.transport.HttpListenerRef;
import javax.xml.ws.WebServiceException;
import java.net.URI;
@@ -52,7 +56,6 @@
{
private static Logger log = Logger.getLogger(EndpointAPIHttpTransportManager.class);
private static final String PROCESSED_BY_DEPLOYMENT_FACTORY =
"processed.by.deployment.factory";
- private WebAppDeploymentFactory deploymentFactory;
private WebAppGenerator generator;
private DeploymentFactory factory = new DeploymentFactory();
@@ -74,15 +77,16 @@
// Create JBossWebMetaData and attach it to the DeploymentUnit
Deployment topLevelDeployment = endpoint.getService().getDeployment();
- // TODO: JBWS-2188
+ // Pass on to the main deployer
Boolean alreadyDeployed =
(Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
if ((alreadyDeployed == null) || (false == alreadyDeployed))
{
- JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);
- deploymentFactory.create(topLevelDeployment, jbwMetaData);
+ generator.create(topLevelDeployment);
+ deploy(topLevelDeployment);
topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
}
+
// Server config
SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
@@ -103,9 +107,6 @@
throw new RuntimeException("Failed to create ListenerRef", e);
}
- // Pass on to the main deployer
- deploy(topLevelDeployment);
-
// Map listenerRef for destroy phase
deploymentRegistry.put( listenerRef.getUUID(), topLevelDeployment );
@@ -129,25 +130,12 @@
{
log.error(e.getMessage(), e);
}
- try
- {
- deploymentFactory.destroy(dep);
- }
- catch (Exception e)
- {
- log.error(e.getMessage(), e);
- }
dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
}
}
deploymentRegistry.remove(ref.getUUID());
}
- public void setDeploymentFactory(WebAppDeploymentFactory deploymentFactory)
- {
- this.deploymentFactory = deploymentFactory;
- }
-
public void setGenerator(WebAppGenerator generator)
{
this.generator = generator;
@@ -173,7 +161,7 @@
{
webMetaDataModifier.modifyMetaData(dep);
- AbstractDeployment deployment = createSimpleDeployment(dep.getSimpleName());
+ final AbstractDeployment deployment =
createSimpleDeployment(dep.getService().getContextRoot());
MutableAttachments mutableAttachments =
(MutableAttachments)deployment.getPredeterminedManagedObjects();
mutableAttachments.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP,
Boolean.TRUE);
mutableAttachments.addAttachment(ClassLoaderFactory.class, new
ContextClassLoaderFactory());
@@ -190,7 +178,7 @@
{
try
{
- AbstractDeployment deployment = createSimpleDeployment(dep.getSimpleName());
+ AbstractDeployment deployment =
createSimpleDeployment(dep.getService().getContextRoot());
mainDeployer.undeploy(deployment);
}
catch (Exception ex)
Modified:
container/jboss50/trunk/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
===================================================================
---
container/jboss50/trunk/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-06-25
15:55:22 UTC (rev 7737)
+++
container/jboss50/trunk/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-06-26
11:42:44 UTC (rev 7738)
@@ -89,7 +89,6 @@
<bean name="EndpointAPIHttpTransport"
class="org.jboss.wsf.container.jboss50.transport.EndpointAPIHttpTransportManager">
<property name="generator"><inject
bean="WSWebAppGenerator"/></property>
- <property name="deploymentFactory"><inject
bean="WSWebAppDeploymentFactory"/></property>
<property name="mainDeployer"><inject
bean="MainDeployer"/></property>
<property name="webMetaDataModifier"><inject
bean="WSWebMetaDataModifier"/></property>
</bean>
Show replies by date