JBossWS SVN: r13791 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-02-23 12:35:27 -0500 (Wed, 23 Feb 2011)
New Revision: 13791
Added:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5976/
Log:
[JBPAPP-5976] create branch for one off patch
13 years, 10 months
JBossWS SVN: r13790 - in stack/cxf/trunk/modules/resources/src/main/resources: modules/org/jboss/ws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-23 05:54:31 -0500 (Wed, 23 Feb 2011)
New Revision: 13790
Added:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/main/module.xml
Removed:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/main/module.xml
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
Log:
[JBWS-3223] Moving org.jboss.ws.cxf.jbossws-cxf-client module to org.jboss.ws.jaxws-client to have a unique name without reference to any stack
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml 2011-02-23 10:47:34 UTC (rev 13789)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml 2011-02-23 10:54:31 UTC (rev 13790)
@@ -49,7 +49,7 @@
<module name="org.jboss.ws.api" />
<module name="org.jboss.ws.common" />
<module name="org.jboss.ws.cxf.jbossws-cxf-factories" services="import"/>
- <module name="org.jboss.ws.cxf.jbossws-cxf-client" services="import"/>
+ <module name="org.jboss.ws.jaxws-client" services="import"/>
<module name="org.jboss.ws.cxf.jbossws-cxf-server" services="import"/>
<module name="org.jboss.ws.spi" />
</dependencies>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2011-02-23 10:47:34 UTC (rev 13789)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2011-02-23 10:54:31 UTC (rev 13790)
@@ -38,7 +38,7 @@
<module name="org.jboss.ws.api" />
<module name="org.jboss.ws.spi" />
<module name="org.jboss.ws.common" />
- <module name="org.jboss.ws.cxf.jbossws-cxf-client" />
+ <module name="org.jboss.ws.jaxws-client" />
<module name="org.jboss.ws.cxf.jbossws-cxf-factories" services="import"/>
<module name="org.apache.cxf" services="import">
<imports>
Deleted: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2011-02-21 20:01:40 UTC (rev 13780)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/main/module.xml 2011-02-23 10:54:31 UTC (rev 13790)
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., 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.
- -->
-
-<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.cxf.jbossws-cxf-client">
-
- <resources>
- <!-- Insert resources here -->
- </resources>
-
- <dependencies>
- <module name="javax.api" />
- <module name="javax.xml.bind.api" />
- <module name="javax.xml.ws.api" />
- <module name="org.jboss.ws.spi" />
- <module name="org.jboss.ws.common" />
- <module name="org.jboss.ws.cxf.jbossws-cxf-factories" services="import"/>
- <module name="org.apache.cxf" services="import">
- <imports>
- <include path="META-INF/cxf"/> <!-- required to also pull in the bus extensions from META-INF -->
- <include path="META-INF/spring.*"/>
- </imports>
- </module>
- <module name="org.apache.neethi" />
- <module name="org.jboss.logging" />
- </dependencies>
-</module>
Copied: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/main/module.xml (from rev 13787, stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml)
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-client/main/module.xml 2011-02-23 10:54:31 UTC (rev 13790)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.jaxws-client">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.api" />
+ <module name="javax.xml.bind.api" />
+ <module name="com.sun.xml.bind" services="import"/>
+ <module name="javax.xml.ws.api" />
+ <module name="org.jboss.ws.spi" />
+ <module name="org.jboss.ws.common" />
+ <module name="org.jboss.ws.cxf.jbossws-cxf-factories" services="import"/>
+ <module name="org.apache.cxf" services="import">
+ <imports>
+ <include path="META-INF/cxf"/> <!-- required to also pull in the bus extensions from META-INF -->
+ <include path="META-INF/spring.*"/>
+ </imports>
+ </module>
+ <module name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver" services="import">
+ <imports>
+ <include path="META-INF/cxf"/> <!-- required to also pull in the bus extensions from META-INF -->
+ <include path="META-INF/spring.*"/>
+ </imports>
+ </module>
+ <module name="org.apache.neethi" />
+ <module name="org.jboss.logging" />
+ </dependencies>
+</module>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-02-23 10:47:34 UTC (rev 13789)
+++ stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-02-23 10:54:31 UTC (rev 13790)
@@ -326,7 +326,7 @@
<attribute name="targetdir"/>
<sequential>
<!-- libraries -->
- <copy todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-client/main" flatten="false" overwrite="true">
+ <copy todir="@{targetdir}/org/jboss/ws/jaxws-client/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-cxf-client.jar"/>
</fileset>
13 years, 10 months
JBossWS SVN: r13789 - in stack/cxf/trunk/modules/resources/src/main/resources: modules/org/jboss/ws/jaxws-httpserver-httpspi and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-23 05:47:34 -0500 (Wed, 23 Feb 2011)
New Revision: 13789
Added:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-httpserver-httpspi/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-httpserver-httpspi/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-httpserver-httpspi/main/module.xml
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf
Log:
[JBAS-8838][JBWS-3206] Adding jaxws-httpserver-httpspi module + fixing broken stack uninstall against AS7
Added: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-httpserver-httpspi/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-httpserver-httpspi/main/module.xml (rev 0)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/jaxws-httpserver-httpspi/main/module.xml 2011-02-23 10:47:34 UTC (rev 13789)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.jboss.ws.jaxws-httpserver-httpspi">
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.xml.ws.api" />
+ <module name="com.sun.httpserver"/>
+ </dependencies>
+</module>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-02-22 23:04:44 UTC (rev 13788)
+++ stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-02-23 10:47:34 UTC (rev 13789)
@@ -331,6 +331,11 @@
<include name="**/jbossws-cxf-client.jar"/>
</fileset>
</copy>
+ <copy todir="@{targetdir}/org/jboss/ws/jaxws-httpserver-httpspi/main" flatten="false" overwrite="true">
+ <fileset dir="@{thirdpartydir}/lib">
+ <include name="**/jaxws-httpserver-httpspi.jar"/>
+ </fileset>
+ </copy>
<copy todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-server/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-cxf-server.jar"/>
@@ -474,12 +479,12 @@
<delete includeemptydirs="true" verbose="true">
<fileset dir="${jboss.modules}">
- <include name="**/org/jboss/as/webservices/main/jbossws-cxf-resources-*"/>
+ <include name="**/org/jboss/as/webservices/main/jbossws-*-resources*"/>
</fileset>
</delete>
<!-- delete content of last deployment -->
- <delete verbose="true">
+ <delete includeemptydirs="true" verbose="true">
<fileset dir="${jboss.modules}" includes="${jbossws.modules.conf}"/>
</delete>
</sequential>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf 2011-02-22 23:04:44 UTC (rev 13788)
+++ stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf 2011-02-23 10:47:34 UTC (rev 13789)
@@ -1 +1 @@
-org/apache/cxf, org/apache/neethi, org/apache/ws/commons/xmlschema, org/jboss/ws
\ No newline at end of file
+org/apache/cxf/**, org/apache/neethi/**, org/apache/ws/commons/xmlschema/**, org/jboss/ws/cxf/**, org/jboss/ws/**
\ No newline at end of file
13 years, 10 months
JBossWS SVN: r13788 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-22 18:04:44 -0500 (Tue, 22 Feb 2011)
New Revision: 13788
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
Log:
[JBWS-3223] Setting proper TCCL also when calling endpoint.publish(..)
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2011-02-22 23:02:47 UTC (rev 13787)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2011-02-22 23:04:44 UTC (rev 13788)
@@ -29,10 +29,16 @@
import java.security.SecureClassLoader;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
import java.util.NoSuchElementException;
+import java.util.concurrent.Executor;
import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.Binding;
import javax.xml.ws.Endpoint;
+import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.spi.ServiceDelegate;
@@ -41,6 +47,7 @@
import org.apache.cxf.jaxws.ServiceImpl;
import org.jboss.logging.Logger;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
+import org.w3c.dom.Element;
/**
* A custom javax.xml.ws.spi.Provider implementation
@@ -76,7 +83,7 @@
try
{
origClassLoader = checkAndFixContextClassLoader();
- return super.createEndpoint(bindingId, implementor);
+ return new DelegateEndpointImpl(super.createEndpoint(bindingId, implementor));
}
finally
{
@@ -93,7 +100,7 @@
try
{
origClassLoader = checkAndFixContextClassLoader();
- return super.createEndpoint(bindingId, implementor, features);
+ return new DelegateEndpointImpl(super.createEndpoint(bindingId, implementor, features));
}
finally
{
@@ -101,7 +108,7 @@
setContextClassLoader(origClassLoader);
}
}
-
+
@SuppressWarnings("rawtypes")
@Override
public ServiceDelegate createServiceDelegate(URL url, QName qname, Class cls)
@@ -234,7 +241,126 @@
});
}
}
+
+ /**
+ * A javax.xml.ws.Endpoint implementation delegating to a provided one
+ * that sets the TCCL before doing publish.
+ *
+ */
+ private static final class DelegateEndpointImpl extends Endpoint
+ {
+ private Endpoint delegate;
+
+ public DelegateEndpointImpl(Endpoint delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public Binding getBinding()
+ {
+ return delegate.getBinding();
+ }
+ @Override
+ public Object getImplementor()
+ {
+ return delegate.getImplementor();
+ }
+
+ @Override
+ public void publish(String address)
+ {
+ ClassLoader origClassLoader = null;
+ try
+ {
+ origClassLoader = checkAndFixContextClassLoader();
+ delegate.publish(address);
+ }
+ finally
+ {
+ if (origClassLoader != null)
+ setContextClassLoader(origClassLoader);
+ }
+ }
+
+ @Override
+ public void publish(Object serverContext)
+ {
+ ClassLoader origClassLoader = null;
+ try
+ {
+ origClassLoader = checkAndFixContextClassLoader();
+ delegate.publish(serverContext);
+ }
+ finally
+ {
+ if (origClassLoader != null)
+ setContextClassLoader(origClassLoader);
+ }
+ }
+
+ @Override
+ public void stop()
+ {
+ delegate.stop();
+ }
+
+ @Override
+ public boolean isPublished()
+ {
+ return delegate.isPublished();
+ }
+
+ @Override
+ public List<Source> getMetadata()
+ {
+ return delegate.getMetadata();
+ }
+
+ @Override
+ public void setMetadata(List<Source> metadata)
+ {
+ delegate.setMetadata(metadata);
+ }
+
+ @Override
+ public Executor getExecutor()
+ {
+ return delegate.getExecutor();
+ }
+
+ @Override
+ public void setExecutor(Executor executor)
+ {
+ delegate.setExecutor(executor);
+ }
+
+ @Override
+ public Map<String, Object> getProperties()
+ {
+ return delegate.getProperties();
+ }
+
+ @Override
+ public void setProperties(Map<String, Object> properties)
+ {
+ delegate.setProperties(properties);
+ }
+
+ @Override
+ public EndpointReference getEndpointReference(Element... referenceParameters)
+ {
+ return delegate.getEndpointReference(referenceParameters);
+ }
+
+ @Override
+ public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element... referenceParameters)
+ {
+ return delegate.getEndpointReference(clazz, referenceParameters);
+ }
+ }
+
private static final class DelegateClassLoader extends SecureClassLoader
{
private ClassLoader delegate;
13 years, 10 months
JBossWS SVN: r13787 - in stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss: ws/cxf/jbossws-cxf-client/main and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-22 18:02:47 -0500 (Tue, 22 Feb 2011)
New Revision: 13787
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
Log:
[JBAS-8838] Further additions to jbossws-cxf-client module dependencies
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml 2011-02-22 13:34:11 UTC (rev 13786)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/as/webservices/main/module.xml 2011-02-22 23:02:47 UTC (rev 13787)
@@ -37,6 +37,7 @@
<module name="org.jboss.staxmapper"/>
<module name="org.jboss.as.controller"/>
<module name="org.jboss.as.managed-beans"/>
+ <module name="org.jboss.as.ee"/>
<module name="org.jboss.as.server"/>
<module name="org.jboss.as.web"/>
<module name="org.jboss.threads"/>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2011-02-22 13:34:11 UTC (rev 13786)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2011-02-22 23:02:47 UTC (rev 13787)
@@ -31,6 +31,7 @@
<dependencies>
<module name="javax.api" />
<module name="javax.xml.bind.api" />
+ <module name="com.sun.xml.bind" services="import"/>
<module name="javax.xml.ws.api" />
<module name="org.jboss.ws.spi" />
<module name="org.jboss.ws.common" />
13 years, 10 months
JBossWS SVN: r13786 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-22 08:34:11 -0500 (Tue, 22 Feb 2011)
New Revision: 13786
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
Log:
[JBWS-3223] Ensure proper default bus is set before Endpoint API client usage; remove useless duplicated check on context classloader
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2011-02-22 13:32:22 UTC (rev 13785)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2011-02-22 13:34:11 UTC (rev 13786)
@@ -40,6 +40,7 @@
import org.apache.cxf.BusFactory;
import org.apache.cxf.jaxws.ServiceImpl;
import org.jboss.logging.Logger;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
/**
* A custom javax.xml.ws.spi.Provider implementation
@@ -59,24 +60,14 @@
protected org.apache.cxf.jaxws.EndpointImpl createEndpointImpl(Bus bus, String bindingId, Object implementor,
WebServiceFeature... features)
{
- ClassLoader origClassLoader = null;
- try
+ Boolean db = (Boolean)bus.getProperty(Constants.DEPLOYMENT_BUS);
+ if (db != null && db)
{
- origClassLoader = checkAndFixContextClassLoader();
- Boolean db = (Boolean)bus.getProperty(Constants.DEPLOYMENT_BUS);
- if (db != null && db)
- {
- Logger.getLogger(ProviderImpl.class).info(
- "Cannot use the bus associated to the current deployment for starting a new endpoint, creating a new bus...");
- bus = BusFactory.newInstance().createBus();
- }
- return super.createEndpointImpl(bus, bindingId, implementor, features);
+ Logger.getLogger(ProviderImpl.class).info(
+ "Cannot use the bus associated to the current deployment for starting a new endpoint, creating a new bus...");
+ bus = BusFactory.newInstance().createBus();
}
- finally
- {
- if (origClassLoader != null)
- setContextClassLoader(origClassLoader);
- }
+ return super.createEndpointImpl(bus, bindingId, implementor, features);
}
@Override
@@ -176,7 +167,21 @@
}
catch (Exception e)
{
- setContextClassLoader(new DelegateClassLoader(ProviderImpl.class.getClassLoader(), origClassLoader));
+ //[JBWS-3223] On AS7 the TCCL that's set for basic (non-ws-endpoint) servlet/ejb3
+ //apps doesn't have visibility on any WS implementation class, so Apache CXF
+ //can't load its components through it - we need to change the TCCL using
+ //the classloader that has been used to load this javax.xml.ws.spi.Provider impl.
+ ClassLoader clientClassLoader = ProviderImpl.class.getClassLoader();
+
+ //first ensure the default bus is loaded through the client classloader only
+ //(no deployment classloader contribution)
+ if (BusFactory.getDefaultBus(false) == null)
+ {
+ JBossWSBusFactory.getDefaultBus(clientClassLoader);
+ }
+ //then setup a new TCCL having visibility over both the client path (JBossWS
+ //client module on AS7) and the the former TCCL (i.e. the deployment classloader)
+ setContextClassLoader(new DelegateClassLoader(clientClassLoader, origClassLoader));
return origClassLoader;
}
return null;
13 years, 10 months
JBossWS SVN: r13785 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-22 08:32:22 -0500 (Tue, 22 Feb 2011)
New Revision: 13785
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityActions.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
Log:
[JBAS-8838] Default CXF Bus needs to be set without any visibility over deployment classes
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java 2011-02-22 12:56:10 UTC (rev 13784)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java 2011-02-22 13:32:22 UTC (rev 13785)
@@ -130,4 +130,27 @@
}
return nonSpringBusFactory;
}
+
+ /**
+ * Gets (and internally sets) the default bus after having set the thread
+ * context class loader to the provided one (which affects the Bus
+ * construction if it's not been created yet). The former thread context
+ * class loader is restored before returning to the caller.
+ *
+ * @param contextClassLoader
+ * @return the default bus
+ */
+ public static Bus getDefaultBus(ClassLoader contextClassLoader)
+ {
+ ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
+ try
+ {
+ SecurityActions.setContextClassLoader(contextClassLoader);
+ return BusFactory.getDefaultBus();
+ }
+ finally
+ {
+ SecurityActions.setContextClassLoader(origClassLoader);
+ }
+ }
}
Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityActions.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityActions.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityActions.java 2011-02-22 13:32:22 UTC (rev 13785)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.stack.cxf.client.configuration;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Feb-2011
+ *
+ */
+class SecurityActions
+{
+ /**
+ * Get context classloader.
+ *
+ * @return the current context classloader
+ */
+ static ClassLoader getContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ /**
+ * Set context classloader.
+ *
+ * @param classLoader the classloader
+ */
+ static void setContextClassLoader(final ClassLoader classLoader)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ return null;
+ }
+ });
+ }
+ }
+
+}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2011-02-22 12:56:10 UTC (rev 13784)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2011-02-22 13:32:22 UTC (rev 13785)
@@ -25,6 +25,8 @@
import java.net.URL;
import java.util.Map;
+import javax.xml.ws.spi.Provider;
+
import org.apache.cxf.BusFactory;
import org.apache.cxf.configuration.Configurer;
import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
@@ -33,6 +35,7 @@
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.ResourceResolver;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
import org.jboss.wsf.stack.cxf.configuration.BusHolder;
import org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder;
import org.jboss.wsf.stack.cxf.configuration.SpringBusHolder;
@@ -114,8 +117,12 @@
@Override
public void start(Deployment dep)
{
- //Ask for the default bus to make sure it's created before the deployment classloader is set
- BusFactory.getDefaultBus();
+ //Make sure the default bus is created and set for client side usage
+ //(i.e. no server side integration contribution in it)
+ if (BusFactory.getDefaultBus(false) == null)
+ {
+ JBossWSBusFactory.getDefaultBus(Provider.provider().getClass().getClassLoader());
+ }
this.startDeploymentBus(dep);
}
13 years, 10 months
JBossWS SVN: r13784 - in stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf: jbossws-cxf-server/main and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-22 07:56:10 -0500 (Tue, 22 Feb 2011)
New Revision: 13784
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
Log:
[JBAS-8838] Adding dependency on jbossws-cxf-transports-httpserver to jbossws-cxf-client and jbossws-cxf-server modules
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2011-02-22 12:52:09 UTC (rev 13783)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2011-02-22 12:56:10 UTC (rev 13784)
@@ -41,6 +41,12 @@
<include path="META-INF/spring.*"/>
</imports>
</module>
+ <module name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver" services="import">
+ <imports>
+ <include path="META-INF/cxf"/> <!-- required to also pull in the bus extensions from META-INF -->
+ <include path="META-INF/spring.*"/>
+ </imports>
+ </module>
<module name="org.apache.neethi" />
<module name="org.jboss.logging" />
</dependencies>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2011-02-22 12:52:09 UTC (rev 13783)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2011-02-22 12:56:10 UTC (rev 13784)
@@ -46,6 +46,12 @@
<include path="META-INF/spring.*"/>
</imports>
</module>
+ <module name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver" services="import">
+ <imports>
+ <include path="META-INF/cxf"/> <!-- required to also pull in the bus extensions from META-INF -->
+ <include path="META-INF/spring.*"/>
+ </imports>
+ </module>
<module name="org.jboss.common-core" />
<module name="org.jboss.logging" />
<module name="wsdl4j.wsdl4j" />
13 years, 10 months
JBossWS SVN: r13783 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-02-22 07:52:09 -0500 (Tue, 22 Feb 2011)
New Revision: 13783
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SecurityActions.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SpringUtils.java
Log:
Adding missing security action class
Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SecurityActions.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SecurityActions.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SecurityActions.java 2011-02-22 12:52:09 UTC (rev 13783)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.stack.cxf.client.util;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Feb-2011
+ *
+ */
+class SecurityActions
+{
+ /**
+ * Get context classloader.
+ *
+ * @return the current context classloader
+ */
+ static ClassLoader getContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ /**
+ * Set context classloader.
+ *
+ * @param classLoader the classloader
+ */
+ static void setContextClassLoader(final ClassLoader classLoader)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ return null;
+ }
+ });
+ }
+ }
+
+}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SpringUtils.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SpringUtils.java 2011-02-22 11:56:06 UTC (rev 13782)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/util/SpringUtils.java 2011-02-22 12:52:09 UTC (rev 13783)
@@ -35,7 +35,7 @@
{
SPRING_AVAILABLE =
isSpringAvailable(SpringUtils.class.getClassLoader(),
- Thread.currentThread().getContextClassLoader());
+ SecurityActions.getContextClassLoader());
}
/**
* Check if Spring is available using the provided classloader
@@ -47,7 +47,7 @@
{
if (loaders == null || loaders.length == 0)
{
- loaders = new ClassLoader[]{Thread.currentThread().getContextClassLoader()};
+ loaders = new ClassLoader[]{SecurityActions.getContextClassLoader()};
}
for (ClassLoader cl : loaders)
{
13 years, 10 months
JBossWS SVN: r13782 - common/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-02-22 06:56:06 -0500 (Tue, 22 Feb 2011)
New Revision: 13782
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[JBWS-3221] initial fix - more refactorings comming soon
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2011-02-22 11:54:56 UTC (rev 13781)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2011-02-22 11:56:06 UTC (rev 13782)
@@ -22,6 +22,7 @@
package org.jboss.wsf.test;
import java.io.File;
+import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.MalformedURLException;
@@ -31,6 +32,8 @@
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.namespace.QName;
@@ -219,20 +222,44 @@
{
if (server == null)
{
- Hashtable jndiEnv = null;
- try
- {
- InitialContext iniCtx = new InitialContext();
- jndiEnv = iniCtx.getEnvironment();
- server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
- }
- catch (NamingException ex)
- {
- throw new RuntimeException("Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv, ex);
- }
+ if (getIntegrationTarget().startsWith("jboss7"))
+ {
+ server = getAS7ServerConnection();
+ }
+ else
+ {
+ server = getAS6ServerConnection();
+ }
}
return server;
}
+
+ private static MBeanServerConnection getAS7ServerConnection()
+ {
+ String host = getServerHost();
+ String urlString = System.getProperty("jmx.service.url", "service:jmx:rmi:///jndi/rmi://" + host + ":" + 1090 + "/jmxrmi");
+ try {
+ JMXServiceURL serviceURL = new JMXServiceURL(urlString);
+ return JMXConnectorFactory.connect(serviceURL, null).getMBeanServerConnection();
+ } catch (IOException ex) {
+ throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, ex);
+ }
+ }
+
+ private static MBeanServerConnection getAS6ServerConnection()
+ {
+ Hashtable jndiEnv = null;
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ jndiEnv = iniCtx.getEnvironment();
+ return (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ }
+ catch (NamingException ex)
+ {
+ throw new RuntimeException("Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv, ex);
+ }
+ }
public static String getIntegrationTarget()
{
13 years, 10 months