Author: heiko.braun(a)jboss.com
Date: 2007-08-07 15:17:32 -0400 (Tue, 07 Aug 2007)
New Revision: 4241
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/trunk/src/main/resources/jbossws-native-config.xml
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/JBWS1702TestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSBareSEI.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Bare.java
stack/native/trunk/version.properties
Log:
Update to container integration 2.0.1.CR1: Supports 2 phase JSE deployments. Cleanup
classloader juggling in within metdata builders
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -191,7 +191,7 @@
for (WrappedParameter param : wrappedParameters)
{
- Object value = (param.getIndex() < 0) ? returnValue :
holderValue(outParameters.get(param.getIndex()));
+ Object value = (param.getIndex() < 0) ? returnValue :
holderValue(outParameters.get(param.getIndex()));
param.accessor().set(resStruct, value);
}
return resStruct;
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -76,7 +76,10 @@
// For every webservice-description build the ServiceMetaData
UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
wsMetaData.setDeploymentName(dep.getCanonicalName());
- wsMetaData.setClassLoader(dep.getInitialClassLoader());
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if(null == runtimeClassLoader)
+ throw new IllegalArgumentException("Runtime loader cannot be
null");
+ wsMetaData.setClassLoader(runtimeClassLoader);
WebservicesMetaData jaxrpcMapping =
dep.getAttachment(WebservicesMetaData.class);
WebserviceDescriptionMetaData[] wsDescriptionArr =
jaxrpcMapping.getWebserviceDescriptions();
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -58,8 +58,12 @@
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
wsMetaData.setDeploymentName(dep.getCanonicalName());
- wsMetaData.setClassLoader(dep.getInitialClassLoader());
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if(null == runtimeClassLoader)
+ throw new IllegalArgumentException("Runtime loader cannot be
null");
+ wsMetaData.setClassLoader(runtimeClassLoader);
+
// The container objects below provide access to all of the ejb metadata
EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
Iterator<EJBMetaData> it = apMetaData.getEnterpriseBeans();
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -50,7 +50,10 @@
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
wsMetaData.setDeploymentName(dep.getCanonicalName());
- wsMetaData.setClassLoader(dep.getInitialClassLoader());
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if(null == runtimeClassLoader)
+ throw new IllegalArgumentException("Runtime classloader cannot be
null");
+ wsMetaData.setClassLoader(runtimeClassLoader);
// For every bean
for (Endpoint ep : dep.getService().getEndpoints())
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -108,7 +108,10 @@
EndpointResult result = processWebService(dep, wsMetaData, sepClass, linkName);
// Clear the java types, etc.
- resetMetaDataBuilder(dep.getInitialClassLoader());
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if(null == runtimeClassLoader)
+ throw new IllegalArgumentException("Runtime loader cannot be
null");
+ resetMetaDataBuilder(runtimeClassLoader);
ServerEndpointMetaData sepMetaData = result.sepMetaData;
ServiceMetaData serviceMetaData = result.serviceMetaData;
@@ -310,7 +313,10 @@
if (anWebService.endpointInterface().length() > 0)
{
seiName = anWebService.endpointInterface();
- seiClass = dep.getInitialClassLoader().loadClass(seiName);
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if(null == runtimeClassLoader)
+ throw new IllegalArgumentException("Runtime loader cannot be
null");
+ seiClass = runtimeClassLoader.loadClass(seiName);
WebService seiAnnotation = seiClass.getAnnotation(WebService.class);
if (seiAnnotation == null)
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -94,7 +94,7 @@
builder.setGenerateWsdl(generateWsdl);
builder.setToolMode(true);
builder.setWsdlDirectory(resourceDir);
- builder.setMessageStream(messageStream);
+ builder.setMessageStream(messageStream);
if (generateWsdl)
messageStream.println("Generating WSDL:");
@@ -102,6 +102,7 @@
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
DeploymentModelFactory factory = spiProvider.getSPI(DeploymentModelFactory.class);
Deployment dep = factory.newDeployment("wsprovide-deployment", loader);
+ dep.setRuntimeClassLoader(loader);
builder.buildWebServiceMetaData(dep, umd, endpointClass, null);
try
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -41,8 +41,12 @@
UnifiedMetaData umd = dep.getAttachment(UnifiedMetaData.class);
if (umd == null)
throw new IllegalStateException("Cannot obtain unified meta data");
+
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if(null == runtimeClassLoader)
+ throw new IllegalArgumentException("Runtime classloader may not be
null");
- umd.setClassLoader(dep.getRuntimeClassLoader());
+ umd.setClassLoader(runtimeClassLoader);
umd.eagerInitialize();
}
}
\ No newline at end of file
Modified: stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -94,7 +94,6 @@
protected void initServiceEndpoint(String contextPath)
{
initEndpoint(contextPath, getServletName());
- initClassLoader();
initEndpointConfig();
initializeAndStart();
}
@@ -106,10 +105,9 @@
{
// Initialize the meta data model
UnifiedMetaData umd = dep.getAttachment(UnifiedMetaData.class);
- if (umd.isEagerInitialized() == false)
+ if (umd.isEagerInitialized() == false) // TODO: remove this piece
{
- umd.setClassLoader(dep.getRuntimeClassLoader());
- umd.eagerInitialize();
+ throw new IllegalStateException("UMD should be initialized
already");
}
// Start the endpoint
@@ -133,19 +131,8 @@
log.debug("Updating service endpoint config\n config-name: " +
configName + "\n config-file: " + configFile);
epMetaData.setConfigName(configName, configFile);
}
- }
+ }
- private void initClassLoader()
- {
- // Set the runtime classloader for JSE endpoints, this should be the tomcat
classloader
- Deployment dep = endpoint.getService().getDeployment();
- if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() ==
DeploymentType.JAXWS_JSE)
- {
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- dep.setRuntimeClassLoader(classLoader);
- }
- }
-
private void initEndpoint(String contextPath, String servletName)
{
WebAppResolver resolver = new WebAppResolver(contextPath, servletName);
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -170,7 +170,7 @@
ServletInputStream in = req.getInputStream();
ServletOutputStream out = res.getOutputStream();
- ClassLoader classLoader =
endpoint.getService().getDeployment().getInitialClassLoader();
+ ClassLoader classLoader =
endpoint.getService().getDeployment().getRuntimeClassLoader();
if (classLoader == null)
throw new IllegalStateException("Deployment has no classloader
associated");
Modified: stack/native/trunk/src/main/resources/jbossws-native-config.xml
===================================================================
--- stack/native/trunk/src/main/resources/jbossws-native-config.xml 2007-08-07 19:16:05
UTC (rev 4240)
+++ stack/native/trunk/src/main/resources/jbossws-native-config.xml 2007-08-07 19:17:32
UTC (rev 4241)
@@ -70,26 +70,40 @@
</bean>
<bean name="WSNativeUnifiedMetaDataDeploymentAspect"
class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
- <property name="requires">ContainerMetaData, URLPattern,
VFSRoot</property>
- <property name="provides">UnifiedMetaDataModel,
StackDescriptor</property>
+ <property name="requires">RuntimeLoader, ContainerMetaData,
URLPattern, VFSRoot</property>
+ <property name="provides">UnifiedMetaDataModel</property>
</bean>
- <!-- Deployment aspect installers -->
+ <!-- Deployment aspect installers -->
+ <!-- Phase 1 -->
<bean name="WSNativeDeploymentAspectInstallerJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="sortAspectsOnCreate">true</property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSNativeContextPropertiesDeploymentAspect"/>
+ </set>
+ </property>
+ <depends>WSDeploymentAspectInstallerJSE</depends>
+ </bean>
+ <!-- Phase 2 -->
+ <bean name="WSNativeDeploymentAspectInstallerJSE2"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="parent"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerJSE2"/></property>
+ <property name="sortAspectsOnCreate">true</property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
<inject bean="WSNativeEventingDeploymentAspect"/>
<inject bean="WSNativePublishContractDeploymentAspect"/>
<inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
<inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/>
+ <inject bean="WSNativeEagerInitializeDeploymentAspect"/>
</set>
</property>
- <depends>WSDeploymentAspectInstallerJSE</depends>
+ <depends>WSDeploymentAspectInstallerJSE2</depends>
</bean>
+
<bean name="WSNativeDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="sortAspectsOnCreate">true</property>
@@ -106,6 +120,7 @@
</property>
<depends>WSDeploymentAspectInstallerEJB</depends>
</bean>
+
<bean name="WSNativeDeploymentAspectInstallerEndpointAPI"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerEndpointAPI"/></property>
<property name="sortAspectsOnCreate">true</property>
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/JBWS1702TestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/JBWS1702TestCase.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/JBWS1702TestCase.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -51,12 +51,6 @@
public void testInheritanceBare() throws Exception
{
- if (true)
- {
- System.out.println("FIXME: [JBWS-1702]: Type inheritance on
Doclit/Bare");
- return;
- }
-
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jbws1702/SampleWSWithDocument_Bare?wsdl");
QName serviceName = new
QName("http://jbws1702.jaxws.ws.test.jboss.org/",
"SampleWSWithDocument_BareService");
Service service = Service.create(wsdlURL, serviceName);
@@ -68,13 +62,7 @@
}
public void testInheritanceWrapped() throws Exception
- {
- if (true)
- {
- System.out.println("FIXME: [JBWS-1702]: Type inheritance on
Doclit/Bare");
- return;
- }
-
+ {
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jbws1702/SampleWSWithDocument_Wrapped?wsdl");
QName serviceName = new
QName("http://jbws1702.jaxws.ws.test.jboss.org/",
"SampleWSWithDocument_WrappedService");
Service service = Service.create(wsdlURL, serviceName);
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSBareSEI.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSBareSEI.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSBareSEI.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -26,17 +26,21 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
/**
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
*/
@WebService
+@SOAPBinding(
+ style = SOAPBinding.Style.DOCUMENT,
+ use = SOAPBinding.Use.LITERAL,
+ parameterStyle = SOAPBinding.ParameterStyle.BARE
+)
public interface SampleWSBareSEI
{
- @WebMethod()
ResponseWrapperB getClassCAsClassB();
- @WebMethod()
ResponseWrapperC getClassC();
}
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Bare.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Bare.java 2007-08-07
19:16:05 UTC (rev 4240)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1702/SampleWSWithDocument_Bare.java 2007-08-07
19:17:32 UTC (rev 4241)
@@ -38,11 +38,6 @@
* @version 1.0
*/
@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws1702.SampleWSBareSEI")
-@SOAPBinding(
- style = SOAPBinding.Style.DOCUMENT,
- use = SOAPBinding.Use.LITERAL,
- parameterStyle = SOAPBinding.ParameterStyle.BARE
-)
public class SampleWSWithDocument_Bare implements SampleWSBareSEI
{
@@ -55,7 +50,7 @@
/**
* In .NET Client (C#) only the content information of ClassB is being submitted.
(--> propC is unknown)
*/
- @WebMethod()
+ //@WebMethod()
public ResponseWrapperB getClassCAsClassB() {
ClassC classC= new ClassC();
classC.setPropA("propA");
@@ -70,7 +65,7 @@
/**
* Method that make ClassC available for all clients using this web service.
*/
- @WebMethod()
+ //@WebMethod()
public ResponseWrapperC getClassC() {
ClassC data = (ClassC) getClassCAsClassB().getData();
ResponseWrapperC resp = new ResponseWrapperC();
Modified: stack/native/trunk/version.properties
===================================================================
--- stack/native/trunk/version.properties 2007-08-07 19:16:05 UTC (rev 4240)
+++ stack/native/trunk/version.properties 2007-08-07 19:17:32 UTC (rev 4241)
@@ -6,7 +6,7 @@
specification.version=jbossws-2.0
version.id=2.1.0.DEV
-repository.id=snapshot
+repository.id=2.0.1.CR1
implementation.title=JBoss Web Services - Native
implementation.url=http://www.jboss.org/products/jbossws
@@ -26,11 +26,11 @@
# Dependend integration projects
jbossws-common=1.0.0.CR1
-jbossws-framework=1.0.0.CR1
+jbossws-framework=1.0.0.CR2
jbossws-spi=1.0.0.CR1
-jbossws-jboss50=snapshot
-jbossws-jboss42=snapshot
-jbossws-jboss40=snapshot
+jbossws-jboss50=2.0.1.CR1
+jbossws-jboss42=2.0.1.CR1
+jbossws-jboss40=2.0.1.CR1
# JBossAS-5.0
jboss-jbossxb-jboss50=2.0.0.CR2