Author: thomas.diesler(a)jboss.com
Date: 2007-07-25 08:48:59 -0400 (Wed, 25 Jul 2007)
New Revision: 3992
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityEncoder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SendUsernameOperation.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
Log:
Refactor UnifiedDeploymentInfo
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -54,7 +54,8 @@
public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep,
UnifiedDeploymentInfo udi)
{
- Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.getDeployedObject());
+ ObjectName deployedObject =
(ObjectName)dep.getContext().getProperty("DeployedObject");
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
ArrayList<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
for (Object container : ejb3Module.getContainers().values())
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ArchiveDeployerHook.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -76,7 +76,7 @@
public Deployment getDeployment(DeploymentInfo unit)
{
Deployment dep = (Deployment)unit.context.get(Deployment.class);
- return (dep != null && dep.getDeploymentType() == getDeploymentType() ? dep
: null);
+ return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
}
public void deploy(DeploymentInfo unit) throws DeploymentException
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -72,15 +72,16 @@
if (di.parent != null)
{
- udi.setParent(new UnifiedDeploymentInfo(null));
+ udi.setParent(new UnifiedDeploymentInfo());
buildDeploymentInfo(dep, udi.getParent(), di.parent);
}
udi.setVfRoot(new ResourceLoaderAdapter(di.localCl));
udi.setSimpleName(di.shortName);
udi.setUrl(getDeploymentURL(di));
- udi.setClassLoader(di.annotationsCl);
- udi.setDeployedObject(di.deployedObject);
+
+ if (di.deployedObject != null)
+ dep.getContext().setProperty("DeployedObject", di.deployedObject);
buildMetaData(dep, udi, di);
@@ -113,16 +114,16 @@
{
if (di.metaData instanceof WebMetaData)
{
- udi.setMetaData(webMetaDataAdapter.buildUnifiedWebMetaData(dep, udi, di));
+ webMetaDataAdapter.buildUnifiedWebMetaData(dep, udi, di);
udi.setWebappURL(udi.getUrl());
}
- else if (dep.getDeploymentType() == DeploymentType.JAXRPC_EJB3 ||
dep.getDeploymentType() == DeploymentType.JAXWS_EJB3)
+ else if (dep.getType() == DeploymentType.JAXRPC_EJB3 || dep.getType() ==
DeploymentType.JAXWS_EJB3)
{
-
udi.setMetaData(applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep,
udi));
+ applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep, udi);
}
else if (di.metaData instanceof ApplicationMetaData)
{
-
udi.setMetaData(applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, udi,
di));
+ applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, udi, di);
}
}
}
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -23,6 +23,15 @@
// $Id$
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.ws.WebServiceException;
+
import org.jboss.ejb.EjbModule;
import org.jboss.ejb.Interceptor;
import org.jboss.ejb.StatelessSessionContainer;
@@ -32,22 +41,18 @@
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.wsf.common.ObjectNameFactory;
+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.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.invocation.*;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.SPIProvider;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
-import javax.xml.ws.WebServiceException;
-import java.lang.reflect.Method;
-import java.security.Principal;
-
/**
* Handles invocations on EJB21 endpoints.
* Used with jboss40 and jboss42.
@@ -80,9 +85,9 @@
public void init(Endpoint ep)
{
String ejbName = ep.getShortName();
- UnifiedDeploymentInfo udi =
ep.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
- UnifiedApplicationMetaData applMetaData =
(UnifiedApplicationMetaData)udi.getMetaData();
- UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)applMetaData.getBeanByEjbName(ejbName);
+ Deployment dep = ep.getService().getDeployment();
+ UnifiedApplicationMetaData apMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WebServiceException("Cannot obtain ejb meta data for: " +
ejbName);
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -57,7 +57,7 @@
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
dep.setInitialClassLoader(unit.annotationsCl);
dep.setRuntimeClassLoader(unit.ucl);
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -63,7 +63,7 @@
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
dep.setInitialClassLoader(unit.annotationsCl);
dep.setRuntimeClassLoader(null);
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -58,7 +58,7 @@
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
dep.setInitialClassLoader(unit.annotationsCl);
dep.setRuntimeClassLoader(unit.ucl);
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -62,7 +62,7 @@
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
dep.setInitialClassLoader(unit.annotationsCl);
dep.setRuntimeClassLoader(null);
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -51,8 +51,8 @@
{
String securityDomain = null;
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.getDeployedObject());
+ ObjectName deployedObject =
(ObjectName)dep.getContext().getProperty("DeployedObject");
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
if (manager instanceof StatelessContainer)
@@ -82,8 +82,8 @@
public void addSecurityRoles(Element webApp, Deployment dep)
{
// The container objects below provide access to all of the ejb metadata
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.getDeployedObject());
+ ObjectName deployedObject =
(ObjectName)dep.getContext().getProperty("DeployedObject");
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
if (manager instanceof StatelessContainer)
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -57,7 +57,7 @@
if (unit == null)
throw new IllegalStateException("Cannot obtain deployment unit");
- DeploymentType type = dep.getDeploymentType();
+ DeploymentType type = dep.getType();
if (type.toString().startsWith("JAXWS"))
{
udi = new JAXWSDeployment(type);
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -56,7 +56,7 @@
public void create(Deployment dep)
{
- if (dep.getDeploymentType().toString().endsWith("EJB21") ||
dep.getDeploymentType().toString().endsWith("EJB3"))
+ if (dep.getType().toString().endsWith("EJB21") ||
dep.getType().toString().endsWith("EJB3"))
{
UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
if (udi == null)
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -73,7 +73,7 @@
public Deployment getDeployment(DeploymentUnit unit)
{
Deployment dep = unit.getAttachment(Deployment.class);
- return (dep != null && dep.getDeploymentType() == getDeploymentType() ? dep
: null);
+ return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
}
public void deploy(DeploymentUnit unit) throws DeploymentException
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -73,7 +73,7 @@
{
if (unit.getParent() != null)
{
- udi.setParent(new UnifiedDeploymentInfo(null));
+ udi.setParent(new UnifiedDeploymentInfo());
buildDeploymentInfo(dep, udi.getParent(), unit.getParent());
}
@@ -87,7 +87,7 @@
// Since we create temporary classes, we need to create a delegate loader
// This prevents CCE problems where the parent loader is available at deploy
time,
// and a child loader is available at start time.
- udi.setClassLoader(new URLClassLoader(new URL[] {}, unit.getClassLoader()));
+ // udi.setClassLoader(new URLClassLoader(new URL[] {}, unit.getClassLoader()));
log.debug("UnifiedDeploymentInfo:\n" + udi);
}
@@ -105,16 +105,16 @@
{
if (unit.getAttachment(WebMetaData.class) != null)
{
- udi.setMetaData(webMetaDataAdapter.buildUnifiedWebMetaData(dep, udi, unit));
+ webMetaDataAdapter.buildUnifiedWebMetaData(dep, udi, unit);
udi.setWebappURL(udi.getVfRoot().toURL());
}
else if (unit.getAttachment(Ejb3Deployment.class) != null)
{
-
udi.setMetaData(applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep, udi,
unit));
+ applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep, udi, unit);
}
else if (unit.getAttachment(ApplicationMetaData.class) != null)
{
-
udi.setMetaData(applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, udi,
unit));
+ applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, udi,
unit);
}
}
}
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -23,6 +23,15 @@
// $Id$
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.ws.WebServiceException;
+
import org.jboss.ejb.EjbModule;
import org.jboss.ejb.Interceptor;
import org.jboss.ejb.StatelessSessionContainer;
@@ -34,22 +43,18 @@
import org.jboss.security.SecurityContext;
import org.jboss.security.plugins.SecurityContextAssociation;
import org.jboss.wsf.common.ObjectNameFactory;
+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.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.invocation.*;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
-import javax.xml.ws.WebServiceException;
-import java.lang.reflect.Method;
-import java.security.Principal;
-
/**
* Handles invocations on EJB21 endpoints.
*
@@ -77,9 +82,9 @@
public void init(Endpoint ep)
{
String ejbName = ep.getShortName();
- UnifiedDeploymentInfo udi =
ep.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
- UnifiedApplicationMetaData applMetaData =
(UnifiedApplicationMetaData)udi.getMetaData();
- UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)applMetaData.getBeanByEjbName(ejbName);
+ Deployment dep = ep.getService().getDeployment();
+ UnifiedApplicationMetaData apMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WebServiceException("Cannot obtain ejb meta data for: " +
ejbName);
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -57,7 +57,7 @@
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
dep.setInitialClassLoader(unit.getClassLoader());
dep.setRuntimeClassLoader(unit.getClassLoader());
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -60,7 +60,7 @@
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
dep.setInitialClassLoader(unit.getClassLoader());
dep.setRuntimeClassLoader(null);
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -59,7 +59,7 @@
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
dep.setInitialClassLoader(unit.getClassLoader());
dep.setRuntimeClassLoader(unit.getClassLoader());
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -59,7 +59,7 @@
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
dep.setInitialClassLoader(unit.getClassLoader());
dep.setRuntimeClassLoader(null);
- dep.setDeploymentType(getDeploymentType());
+ dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -53,7 +53,7 @@
if (unit == null)
throw new IllegalStateException("Cannot obtain deployment unit");
- DeploymentType type = dep.getDeploymentType();
+ DeploymentType type = dep.getType();
if (type.toString().startsWith("JAXWS"))
{
udi = new JAXWSDeployment(type);
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -65,7 +65,7 @@
public void create(Deployment dep)
{
- if (dep.getDeploymentType().toString().endsWith("EJB21") ||
dep.getDeploymentType().toString().endsWith("EJB3"))
+ if (dep.getType().toString().endsWith("EJB21") ||
dep.getType().toString().endsWith("EJB3"))
{
UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
if (udi == null)
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -102,7 +102,7 @@
private void initializeAndStart()
{
Deployment dep = endpoint.getService().getDeployment();
- if (dep.getDeploymentType() == DeploymentType.JAXRPC_JSE || dep.getDeploymentType()
== DeploymentType.JAXWS_JSE)
+ if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() ==
DeploymentType.JAXWS_JSE)
{
// Initialize the meta data model
UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
@@ -139,7 +139,7 @@
{
// Set the runtime classloader for JSE endpoints, this should be the tomcat
classloader
Deployment dep = endpoint.getService().getDeployment();
- if (dep.getDeploymentType() == DeploymentType.JAXRPC_JSE || dep.getDeploymentType()
== DeploymentType.JAXWS_JSE)
+ if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() ==
DeploymentType.JAXWS_JSE)
{
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
dep.setRuntimeClassLoader(classLoader);
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -46,7 +46,7 @@
ServiceEndpointInvoker epInvoker =
ep.getAttachment(ServiceEndpointInvoker.class);
if (epInvoker == null)
{
- DeploymentType depType =
ep.getService().getDeployment().getDeploymentType();
+ DeploymentType depType = ep.getService().getDeployment().getType();
if (depType == DeploymentType.JAXRPC_EJB21)
{
epInvoker = new ServiceEndpointInvokerEJB21();
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -52,29 +52,29 @@
if (udi == null)
throw new IllegalStateException("Cannot obtain unified deployment
info");
- if (dep.getDeploymentType() == DeploymentType.JAXRPC_JSE)
+ if (dep.getType() == DeploymentType.JAXRPC_JSE)
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData(dep, (JAXRPCDeployment)udi);
}
- else if (dep.getDeploymentType() == DeploymentType.JAXRPC_EJB21)
+ else if (dep.getType() == DeploymentType.JAXRPC_EJB21)
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData(dep, (JAXRPCDeployment)udi);
}
- else if (dep.getDeploymentType() == DeploymentType.JAXWS_JSE)
+ else if (dep.getType() == DeploymentType.JAXWS_JSE)
{
JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
umd = builder.buildMetaData(dep, udi);
}
- else if (dep.getDeploymentType() == DeploymentType.JAXWS_EJB3)
+ else if (dep.getType() == DeploymentType.JAXWS_EJB3)
{
JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
umd = builder.buildMetaData(dep, udi);
}
else
{
- throw new IllegalStateException("Invalid type: " +
dep.getDeploymentType());
+ throw new IllegalStateException("Invalid type: " +
dep.getType());
}
dep.getContext().addAttachment(UnifiedMetaData.class, umd);
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -79,7 +79,7 @@
this.dep = dep;
this.udi = udi;
- if (dep.getDeploymentType().toString().endsWith("JSE"))
+ if (dep.getType().toString().endsWith("JSE"))
{
expLocation = "WEB-INF/wsdl/";
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -121,12 +121,12 @@
this.state = deploymentState;
}
- public DeploymentType getDeploymentType()
+ public DeploymentType getType()
{
return type;
}
- public void setDeploymentType(DeploymentType deploymentType)
+ public void setType(DeploymentType deploymentType)
{
this.type = deploymentType;
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -86,7 +86,7 @@
private InvocationHandler getInvocationHandler(Endpoint ep)
{
Deployment dep = ep.getService().getDeployment();
- String key = dep.getDeploymentType().toString();
+ String key = dep.getType().toString();
// Use a special key for MDB endpoints
UnifiedApplicationMetaData uapp =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -37,6 +37,6 @@
public JAXRPCClientDeployment(DeploymentType type)
{
- super(type);
+ super();
}
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -47,13 +47,13 @@
public JAXRPCDeployment(DeploymentType type, WebservicesMetaData wsMetaData)
{
- super(type);
+ super();
this.wsMetaData = wsMetaData;
}
public JAXRPCDeployment(DeploymentType type, UnifiedVirtualFile vfWebservices)
{
- super(type);
+ super();
try
{
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -36,6 +36,6 @@
{
public JAXWSDeployment(DeploymentType type)
{
- super(type);
+ super();
}
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -72,11 +72,11 @@
if (udi == null)
throw new IllegalStateException("Cannot obtain unified deployement
info");
- if (dep.getDeploymentType().toString().endsWith("EJB21"))
+ if (dep.getType().toString().endsWith("EJB21"))
{
udi.setWebappURL(generatWebDeployment(dep, securityHandlerEJB21));
}
- else if (dep.getDeploymentType().toString().endsWith("EJB3"))
+ else if (dep.getType().toString().endsWith("EJB3"))
{
udi.setWebappURL(generatWebDeployment(dep, securityHandlerEJB3));
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -72,10 +72,10 @@
void setContext(DeploymentContext context);
/** Get the deployment type */
- DeploymentType getDeploymentType();
+ DeploymentType getType();
/** Set the deployment type */
- void setDeploymentType(DeploymentType type);
+ void setType(DeploymentType type);
/** Get the current deployment state */
DeploymentState getState();
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -37,6 +37,6 @@
public JAXRPCClientDeployment(DeploymentType type)
{
- super(type);
+ super();
}
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -47,13 +47,13 @@
public JAXRPCDeployment(DeploymentType type, WebservicesMetaData wsMetaData)
{
- super(type);
+ super();
this.wsMetaData = wsMetaData;
}
public JAXRPCDeployment(DeploymentType type, UnifiedVirtualFile vfWebservices)
{
- super(type);
+ super();
try
{
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -36,6 +36,6 @@
{
public JAXWSDeployment(DeploymentType type)
{
- super(type);
+ super();
}
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -27,10 +27,7 @@
import java.net.MalformedURLException;
import java.net.URL;
-import javax.management.ObjectName;
-
import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
/**
* The container independent deployment info.
@@ -50,47 +47,7 @@
private UnifiedVirtualFile vfRoot;
/** The URL to the expanded webapp **/
private URL webappURL;
- /** We can hold "typed" metadata */
- private Object metaData;
- /** The deployment classloader **/
- private ClassLoader classLoader;
- /** An optional ObjectName of the deployed object */
- private ObjectName deployedObject;
- public UnifiedDeploymentInfo(DeploymentType type)
- {
- }
-
- public void setDeployedObject(ObjectName deployedObject)
- {
- this.deployedObject = deployedObject;
- }
-
- public ObjectName getDeployedObject()
- {
- return deployedObject;
- }
-
- public void setClassLoader(ClassLoader classLoader)
- {
- this.classLoader = classLoader;
- }
-
- public ClassLoader getClassLoader()
- {
- return classLoader;
- }
-
- public void setMetaData(Object metaData)
- {
- this.metaData = metaData;
- }
-
- public Object getMetaData()
- {
- return metaData;
- }
-
public void setWebappURL(URL webappURL)
{
this.webappURL = webappURL;
@@ -180,10 +137,10 @@
if (deploymentPath.startsWith("jar:") &&
deploymentPath.endsWith("!/") == false)
deploymentPath += "!/";
-
+
if (deploymentPath.startsWith("war:") &&
deploymentPath.endsWith("!/") == false)
deploymentPath += "!/";
-
+
if (deploymentPath.endsWith("/") == false)
deploymentPath += "/";
@@ -193,14 +150,4 @@
}
return resourceURL;
}
-
- public String toString()
- {
- StringBuilder builder = new StringBuilder();
- builder.append("[");
- builder.append(",simpleName=" + simpleName);
- builder.append(",url=" + url);
- builder.append("]");
- return builder.toString();
- }
}
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -94,7 +94,7 @@
// Set the runtime classloader for JSE endpoints, this should be the tomcat
classloader
Deployment dep = endpoint.getService().getDeployment();
- if (dep.getDeploymentType() == Deployment.DeploymentType.JAXRPC_JSE ||
dep.getDeploymentType() == Deployment.DeploymentType.JAXWS_JSE)
+ if (dep.getType() == Deployment.DeploymentType.JAXRPC_JSE || dep.getType() ==
Deployment.DeploymentType.JAXWS_JSE)
{
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
dep.setRuntimeClassLoader(classLoader);
Modified:
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java
===================================================================
---
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -63,7 +63,7 @@
@Override
public void create(Deployment dep)
{
- DeploymentType depType = dep.getDeploymentType();
+ DeploymentType depType = dep.getType();
if (depType != DeploymentType.JAXWS_EJB3 && depType !=
DeploymentType.JAXWS_JSE)
throw new IllegalStateException("Unsupported deployment type: " +
depType);
Modified:
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java
===================================================================
---
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -94,7 +94,7 @@
// Set the runtime classloader for JSE endpoints, this should be the tomcat
classloader
Deployment dep = endpoint.getService().getDeployment();
- if (dep.getDeploymentType() == Deployment.DeploymentType.JAXRPC_JSE ||
dep.getDeploymentType() == Deployment.DeploymentType.JAXWS_JSE)
+ if (dep.getType() == Deployment.DeploymentType.JAXRPC_JSE || dep.getType() ==
Deployment.DeploymentType.JAXWS_JSE)
{
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
dep.setRuntimeClassLoader(classLoader);
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -273,7 +273,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext instanceof SOAPMessageContextJAXWS)
{
- if (ep.getService().getDeployment().getDeploymentType() ==
DeploymentType.JAXWS_JSE)
+ if (ep.getService().getDeployment().getType() == DeploymentType.JAXWS_JSE)
{
WebServiceContext wsContext;
if (msgContext.get(MessageContext.SERVLET_REQUEST) != null)
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityEncoder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityEncoder.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityEncoder.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -65,21 +65,21 @@
public void encode(Document message) throws WSSecurityException
{
SecurityHeader header = new SecurityHeader(message);
- for (OperationDescription<EncodingOperation> o : operations)
+ for (OperationDescription<EncodingOperation> op : operations)
{
EncodingOperation operation;
try
{
- Constructor<? extends EncodingOperation> constructor =
o.getOperation().getConstructor(SecurityHeader.class, SecurityStore.class);
+ Constructor<? extends EncodingOperation> constructor =
op.getOperation().getConstructor(SecurityHeader.class, SecurityStore.class);
operation = constructor.newInstance(header, store);
}
catch (Exception e)
{
- throw new WSSecurityException("Error constructing operation: " +
o.getOperation());
+ throw new WSSecurityException("Error constructing operation: " +
op.getOperation());
}
- operation.process(message, o.getTargets(), o.getCertificateAlias(),
o.getCredential(), o.getAlgorithm());
+ operation.process(message, op.getTargets(), op.getCertificateAlias(),
op.getCredential(), op.getAlgorithm());
}
attachHeader(header, message);
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SendUsernameOperation.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SendUsernameOperation.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SendUsernameOperation.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -39,8 +39,8 @@
this.store = store;
}
- public void process(Document message, List<Target> targets, String alias, String
credential, String algorithm) throws WSSecurityException
+ public void process(Document message, List<Target> targets, String username,
String credential, String algorithm) throws WSSecurityException
{
- header.addToken(new UsernameToken(alias, credential, message));
+ header.addToken(new UsernameToken(username, credential, message));
}
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -24,7 +24,6 @@
// $Id: $
import java.io.IOException;
-import java.io.File;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -66,6 +65,9 @@
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.wsf.common.ObjectNameFactory;
+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.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
@@ -77,9 +79,6 @@
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
import
org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.common.ObjectNameFactory;
/** An abstract meta data builder.
*
@@ -172,7 +171,7 @@
sepMetaData.setEndpointAddress(getServiceEndpointAddress(null, servicePath));
}
- public static ObjectName createServiceEndpointID(UnifiedDeploymentInfo udi,
ServerEndpointMetaData sepMetaData)
+ public static ObjectName createServiceEndpointID(Deployment dep, UnifiedDeploymentInfo
udi, ServerEndpointMetaData sepMetaData)
{
String linkName = sepMetaData.getLinkName();
String context = sepMetaData.getContextRoot();
@@ -184,14 +183,14 @@
idstr.append("," + ServerEndpointMetaData.SEPID_PROPERTY_ENDPOINT +
"=" + linkName);
// Add JMS destination JNDI name for MDB endpoints
- if (udi.getMetaData() instanceof UnifiedApplicationMetaData)
+ UnifiedApplicationMetaData apMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ if (apMetaData != null)
{
String ejbName = sepMetaData.getLinkName();
if (ejbName == null)
throw new WSException("Cannot obtain ejb-link from port
component");
- UnifiedApplicationMetaData applMetaData =
(UnifiedApplicationMetaData)udi.getMetaData();
- UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)applMetaData.getBeanByEjbName(ejbName);
+ UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WSException("Cannot obtain ejb meta data for: " +
ejbName);
@@ -241,12 +240,12 @@
/**
* Read the transport guarantee from web.xml
*/
- protected void initTransportGuaranteeJSE(UnifiedDeploymentInfo udi,
ServerEndpointMetaData sepMetaData, String servletLink) throws IOException
+ protected void initTransportGuaranteeJSE(Deployment dep, UnifiedDeploymentInfo udi,
ServerEndpointMetaData sepMetaData, String servletLink) throws IOException
{
String transportGuarantee = null;
- if (udi.getMetaData() instanceof UnifiedWebMetaData)
+ UnifiedWebMetaData webMetaData =
dep.getContext().getAttachment(UnifiedWebMetaData.class);
+ if (webMetaData != null)
{
- UnifiedWebMetaData webMetaData = (UnifiedWebMetaData)udi.getMetaData();
Map<String, String> servletMappings = webMetaData.getServletMappings();
String urlPattern = servletMappings.get(servletLink);
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -75,7 +75,7 @@
// For every webservice-description build the ServiceMetaData
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.getVfRoot());
wsMetaData.setDeploymentName(udi.getCanonicalName());
- wsMetaData.setClassLoader(udi.getClassLoader());
+ wsMetaData.setClassLoader(dep.getInitialClassLoader());
WebserviceDescriptionMetaData[] wsDescriptionArr =
udi.getWebservicesMetaData().getWebserviceDescriptions();
for (WebserviceDescriptionMetaData wsdMetaData : wsDescriptionArr)
@@ -142,9 +142,10 @@
initEndpointAddress(dep, udi, sepMetaData);
- if (udi.getMetaData() instanceof UnifiedApplicationMetaData)
+ UnifiedApplicationMetaData apMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ UnifiedWebMetaData webMetaData =
dep.getContext().getAttachment(UnifiedWebMetaData.class);
+ if (apMetaData != null)
{
- UnifiedApplicationMetaData apMetaData =
(UnifiedApplicationMetaData)udi.getMetaData();
wsMetaData.setSecurityDomain(apMetaData.getSecurityDomain());
// Copy the wsdl publish location from jboss.xml
@@ -182,9 +183,8 @@
}
}
}
- else if (udi.getMetaData() instanceof UnifiedWebMetaData)
+ else if (webMetaData != null)
{
- UnifiedWebMetaData webMetaData =
(UnifiedWebMetaData)udi.getMetaData();
wsMetaData.setSecurityDomain(webMetaData.getSecurityDomain());
String targetBean = webMetaData.getServletClassNames().get(linkName);
@@ -200,11 +200,11 @@
if (configName != null || configFile != null)
sepMetaData.setConfigName(configName, configFile);
- initTransportGuaranteeJSE(udi, sepMetaData, linkName);
+ initTransportGuaranteeJSE(dep, udi, sepMetaData, linkName);
}
// init service endpoint id
- ObjectName sepID = createServiceEndpointID(udi, sepMetaData);
+ ObjectName sepID = createServiceEndpointID(dep, udi, sepMetaData);
sepMetaData.setServiceEndpointID(sepID);
replaceAddressLocation(sepMetaData);
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -59,19 +59,16 @@
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.getVfRoot());
wsMetaData.setDeploymentName(udi.getCanonicalName());
- wsMetaData.setClassLoader(udi.getClassLoader());
+ wsMetaData.setClassLoader(dep.getInitialClassLoader());
- if (udi.getClassLoader() == null)
- throw new WSException("Deployment class loader not initialized");
-
// The container objects below provide access to all of the ejb metadata
- UnifiedApplicationMetaData appMetaData =
(UnifiedApplicationMetaData)udi.getMetaData();
- Iterator<UnifiedBeanMetaData> it = appMetaData.getEnterpriseBeans();
+ UnifiedApplicationMetaData apMetaData =
dep.getContext().getAttachment(UnifiedApplicationMetaData.class);
+ Iterator<UnifiedBeanMetaData> it = apMetaData.getEnterpriseBeans();
while (it.hasNext())
{
UnifiedBeanMetaData beanMetaData = it.next();
String ejbClassName = beanMetaData.getEjbClass();
- Class<?> beanClass = udi.getClassLoader().loadClass(ejbClassName);
+ Class<?> beanClass =
wsMetaData.getClassLoader().loadClass(ejbClassName);
if (beanClass.isAnnotationPresent(WebService.class) ||
beanClass.isAnnotationPresent(WebServiceProvider.class))
{
String ejbLink = beanMetaData.getEjbName();
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -50,11 +50,8 @@
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.getVfRoot());
wsMetaData.setDeploymentName(udi.getCanonicalName());
- wsMetaData.setClassLoader(udi.getClassLoader());
+ wsMetaData.setClassLoader(dep.getInitialClassLoader());
- if (udi.getClassLoader() == null)
- throw new WSException("Deployment class loader not initialized");
-
// For every bean
for (Endpoint ep : dep.getService().getEndpoints())
{
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -145,7 +145,7 @@
MetaDataBuilder.replaceAddressLocation(sepMetaData);
// init service endpoint id
- ObjectName sepID = MetaDataBuilder.createServiceEndpointID(udi, sepMetaData);
+ ObjectName sepID = MetaDataBuilder.createServiceEndpointID(dep, udi, sepMetaData);
sepMetaData.setServiceEndpointID(sepID);
return sepMetaData;
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -83,7 +83,7 @@
if (anWebContext == null)
return;
- boolean isJSEEndpoint = (dep.getDeploymentType() == DeploymentType.JAXWS_JSE);
+ boolean isJSEEndpoint = (dep.getType() == DeploymentType.JAXWS_JSE);
// context-root
if (anWebContext.contextRoot().length() > 0)
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -57,6 +57,7 @@
import org.jboss.ws.tools.wsdl.WSDLGenerator;
import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.jboss.ws.tools.wsdl.WSDLWriterResolver;
+import org.jboss.wsf.common.IOUtils;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
@@ -67,7 +68,6 @@
import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.wsf.common.IOUtils;
/**
* An abstract annotation meta data builder.
@@ -104,10 +104,10 @@
{
try
{
- EndpointResult result = processWebService(wsMetaData, sepClass, udi);
+ EndpointResult result = processWebService(dep, wsMetaData, sepClass, udi);
// Clear the java types, etc.
- resetMetaDataBuilder(udi.getClassLoader());
+ resetMetaDataBuilder(dep.getInitialClassLoader());
ServerEndpointMetaData sepMetaData = result.sepMetaData;
ServiceMetaData serviceMetaData = result.serviceMetaData;
@@ -136,7 +136,7 @@
processWebMethods(sepMetaData, seiClass);
// Init the transport guarantee
- initTransportGuaranteeJSE(udi, sepMetaData, linkName);
+ initTransportGuaranteeJSE(dep, udi, sepMetaData, linkName);
// Initialize types
createJAXBContext(sepMetaData);
@@ -189,7 +189,7 @@
processEndpointMetaDataExtensions(sepMetaData, wsdlDefinitions);
// init service endpoint id
- ObjectName sepID = MetaDataBuilder.createServiceEndpointID(udi, sepMetaData);
+ ObjectName sepID = MetaDataBuilder.createServiceEndpointID(dep, udi,
sepMetaData);
sepMetaData.setServiceEndpointID(sepID);
return sepMetaData;
@@ -275,7 +275,8 @@
}
}
- private EndpointResult processWebService(UnifiedMetaData wsMetaData, Class<?>
sepClass, UnifiedDeploymentInfo udi) throws ClassNotFoundException, IOException
+ private EndpointResult processWebService(Deployment dep, UnifiedMetaData wsMetaData,
Class<?> sepClass, UnifiedDeploymentInfo udi) throws ClassNotFoundException,
+ IOException
{
WebService anWebService = sepClass.getAnnotation(WebService.class);
if (anWebService == null)
@@ -307,7 +308,7 @@
if (anWebService.endpointInterface().length() > 0)
{
seiName = anWebService.endpointInterface();
- seiClass = udi.getClassLoader().loadClass(seiName);
+ seiClass = dep.getInitialClassLoader().loadClass(seiName);
WebService seiAnnotation = seiClass.getAnnotation(WebService.class);
if (seiAnnotation == null)
@@ -404,8 +405,7 @@
message(wsdlFile.getName());
Writer writer = IOUtils.getCharsetFileWriter(wsdlFile,
Constants.DEFAULT_XML_CHARSET);
- new WSDLWriter(wsdlDefinitions).write(writer, Constants.DEFAULT_XML_CHARSET, new
WSDLWriterResolver()
- {
+ new WSDLWriter(wsdlDefinitions).write(writer, Constants.DEFAULT_XML_CHARSET, new
WSDLWriterResolver() {
public WSDLWriterResolver resolve(String suggestedFile) throws IOException
{
File file;
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-07-25
12:35:09 UTC (rev 3991)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-07-25
12:48:59 UTC (rev 3992)
@@ -25,7 +25,6 @@
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import static org.jboss.wsf.spi.deployment.Deployment.DeploymentType.JAXWS_JSE;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
@@ -72,7 +71,7 @@
private UnifiedDeploymentInfo createUDI(Class<?> endpointClass, ClassLoader
loader)
{
//DeploymentType type = (endpointClass.isAnnotationPresent(Stateless.class)) ?
JAXWS_EJB3 : JAXWS_JSE;
- UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(JAXWS_JSE)
+ UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo()
{
@Override
public URL getMetaDataFileURL(String resourcePath) throws IOException
@@ -80,7 +79,6 @@
return null;
}
};
- udi.setClassLoader(loader);
return udi;
}