JBossWS SVN: r12625 - in stack/cxf: tags and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-07-10 05:58:40 -0400 (Sat, 10 Jul 2010)
New Revision: 12625
Added:
stack/cxf/tags/jbossws-cxf-3.4.0.Beta1/
Removed:
stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/
Log:
Tagging jbossws-cxf-3.4.0.Beta1
Copied: stack/cxf/tags/jbossws-cxf-3.4.0.Beta1 (from rev 12624, stack/cxf/branches/jbossws-cxf-3.4.0.Beta1)
15 years, 9 months
JBossWS SVN: r12624 - stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-07-10 05:51:26 -0400 (Sat, 10 Jul 2010)
New Revision: 12624
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss601.txt
Log:
Fixing excludes
Modified: stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss501.txt 2010-07-10 09:49:24 UTC (rev 12623)
+++ stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss501.txt 2010-07-10 09:51:26 UTC (rev 12624)
@@ -17,12 +17,6 @@
# [CXF-2006] RespectBinding feature and not understood required extensibility elements
org/jboss/test/ws/jaxws/jbws2449/**
-# [CXF-2852] JavaToWs requires Spring
-org/jboss/test/ws/jaxws/jbws2528/**
-org/jboss/test/ws/jaxws/jbws2529/**
-org/jboss/test/ws/jaxws/smoke/tools/WSProvideScriptTestCase.*
-org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.*
-
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
Modified: stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss510.txt 2010-07-10 09:49:24 UTC (rev 12623)
+++ stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss510.txt 2010-07-10 09:51:26 UTC (rev 12624)
@@ -17,12 +17,6 @@
# [CXF-2006] RespectBinding feature and not understood required extensibility elements
org/jboss/test/ws/jaxws/jbws2449/**
-# [CXF-2852] JavaToWs requires Spring
-org/jboss/test/ws/jaxws/jbws2528/**
-org/jboss/test/ws/jaxws/jbws2529/**
-org/jboss/test/ws/jaxws/smoke/tools/WSProvideScriptTestCase.*
-org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.*
-
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
Modified: stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss600.txt 2010-07-10 09:49:24 UTC (rev 12623)
+++ stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss600.txt 2010-07-10 09:51:26 UTC (rev 12624)
@@ -17,12 +17,6 @@
# [CXF-2006] RespectBinding feature and not understood required extensibility elements
org/jboss/test/ws/jaxws/jbws2449/**
-# [CXF-2852] JavaToWs requires Spring
-org/jboss/test/ws/jaxws/jbws2528/**
-org/jboss/test/ws/jaxws/jbws2529/**
-org/jboss/test/ws/jaxws/smoke/tools/WSProvideScriptTestCase.*
-org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.*
-
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
Modified: stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss601.txt 2010-07-10 09:49:24 UTC (rev 12623)
+++ stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/modules/testsuite/test-excludes-jboss601.txt 2010-07-10 09:51:26 UTC (rev 12624)
@@ -17,12 +17,6 @@
# [CXF-2006] RespectBinding feature and not understood required extensibility elements
org/jboss/test/ws/jaxws/jbws2449/**
-# [CXF-2852] JavaToWs requires Spring
-org/jboss/test/ws/jaxws/jbws2528/**
-org/jboss/test/ws/jaxws/jbws2529/**
-org/jboss/test/ws/jaxws/smoke/tools/WSProvideScriptTestCase.*
-org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.*
-
# [EJBTHREE-1152] service-ref in ejb-jar.xml is ignored
org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
15 years, 9 months
JBossWS SVN: r12623 - stack/cxf/branches/jbossws-cxf-3.4.0.Beta1.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-07-10 05:49:24 -0400 (Sat, 10 Jul 2010)
New Revision: 12623
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/pom.xml
Log:
Moving to patched version of CXF 2.2.9
Modified: stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/pom.xml 2010-07-09 14:19:37 UTC (rev 12622)
+++ stack/cxf/branches/jbossws-cxf-3.4.0.Beta1/pom.xml 2010-07-10 09:49:24 UTC (rev 12623)
@@ -57,7 +57,7 @@
<jbossws.jboss601.version>3.2.1.GA</jbossws.jboss601.version>
-->
<!-- END -->
- <cxf.version>2.2.9</cxf.version>
+ <cxf.version>2.2.9-patch-01</cxf.version>
<cxf.stax.version>1.0.1</cxf.stax.version>
<cxf.asm.version>2.2.3</cxf.asm.version>
<fastinfoset.api.version>1.2.7</fastinfoset.api.version>
15 years, 9 months
JBossWS SVN: r12622 - framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-07-09 10:19:37 -0400 (Fri, 09 Jul 2010)
New Revision: 12622
Modified:
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java
Log:
[JBPAPP-4566] do not rethrow exception - JNDI is not available in SAR environments
Modified: framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java 2010-07-09 11:59:05 UTC (rev 12621)
+++ framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java 2010-07-09 14:19:37 UTC (rev 12622)
@@ -328,8 +328,7 @@
}
catch (NamingException e)
{
- final String message = "Cannot get JNDI context";
- InjectionException.rethrow(message, e);
+ // Ignore, JNDI is not available in SAR archives
}
return retVal;
15 years, 9 months
JBossWS SVN: r12621 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-07-09 07:59:05 -0400 (Fri, 09 Jul 2010)
New Revision: 12621
Removed:
stack/cxf/branches/jms-integration/
Log:
[JBWS-3086] removing obsolete branch
15 years, 9 months
JBossWS SVN: r12620 - in stack/cxf/trunk: modules/server and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-07-09 07:54:11 -0400 (Fri, 09 Jul 2010)
New Revision: 12620
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/SecurityActions.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java
Modified:
stack/cxf/trunk/modules/server/pom.xml
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/DescriptorDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml
stack/cxf/trunk/pom.xml
Log:
[JBWS-3086] merging CXF JMS prototype upstream
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2010-07-09 11:39:54 UTC (rev 12619)
+++ stack/cxf/trunk/modules/server/pom.xml 2010-07-09 11:54:11 UTC (rev 12620)
@@ -249,6 +249,10 @@
<artifactId>jboss-saaj-api_1.3_spec</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.spec.javax.jms</groupId>
+ <artifactId>jboss-jms-api_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.jaxr</groupId>
<artifactId>juddi-service</artifactId>
<type>sar</type>
Copied: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/SecurityActions.java (from rev 12284, stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/SecurityActions.java)
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/SecurityActions.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/SecurityActions.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.deployment;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 17-Feb-2010
+ *
+ */
+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 2010-07-09 11:39:54 UTC (rev 12619)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -117,4 +117,4 @@
holder.close();
}
}
-}
+}
\ No newline at end of file
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java 2010-07-09 11:39:54 UTC (rev 12619)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -168,7 +168,6 @@
URL cxfURL = dd.createFileURL();
log.info("JBossWS-CXF configuration generated: " + cxfURL);
-
return cxfURL;
}
Copied: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java (from rev 12284, stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java)
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.deployment.aspect;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.endpoint.ServerRegistry;
+import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.apache.cxf.transport.jms.JMSDestination;
+import org.jboss.wsf.common.integration.JMSDeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
+import org.jboss.wsf.stack.cxf.configuration.BusHolder;
+import org.springframework.jms.connection.SingleConnectionFactory;
+
+/**
+ * To start the jms endpoints
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JMSEndpointDeploymentAspect extends JMSDeploymentAspect
+{
+ private BusHolder busHolder = null;
+
+ @Override
+ public void start(Deployment dep)
+ {
+ //TODO:handler JAXBIntro
+ if (dep.getAttachment(JMSEndpointsMetaData.class) != null)
+ {
+ JMSEndpointsMetaData jmsEndpoints = dep.getAttachment(JMSEndpointsMetaData.class);
+ URL url = jmsEndpoints.getDescriptorURL();
+
+ ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
+ try
+ {
+ SecurityActions.setContextClassLoader(dep.getRuntimeClassLoader());
+ SpringBusFactory bf = new SpringBusFactory();
+ Bus bus = bf.createBus(url);
+ dep.addAttachment(Bus.class, bus);
+ }
+ catch (Exception e)
+ {
+ log.error("Failed to deploy jms endpoints deployment " + url);
+ throw new RuntimeException(e);
+ }
+
+ finally
+ {
+ BusFactory.setDefaultBus(null);
+ SecurityActions.setContextClassLoader(origClassLoader);
+ }
+ }
+ }
+
+ @Override
+ public void stop(Deployment dep)
+ {
+ log.debug("Undeploying jms endpoints in " + dep.getSimpleName());
+ if (busHolder != null && busHolder.getBus() != null)
+ {
+ //CXF uses WrappedConnectionFactory to create "jmsListener". DefaultMessageListenerContainer.shutdown() can not colse all the jms connections.
+ //We need to explicitly call detroy() to close connection. This should be fixed in CXF side.
+ SingleConnectionFactory connectionFactory = null;
+ Server jmsServer = null;
+ ServerRegistry serRegistry = busHolder.getBus().getExtension(ServerRegistry.class);
+ for (Server server : serRegistry.getServers())
+ {
+ if (server.getDestination() != null && server.getDestination() instanceof JMSDestination)
+ {
+ JMSDestination jmsDestination = (JMSDestination) server.getDestination();
+ JMSConfiguration jmsConfig = jmsDestination.getJmsConfig();
+ if (jmsConfig.getWrappedConnectionFactory() != null
+ && jmsConfig.getWrappedConnectionFactory() instanceof SingleConnectionFactory)
+ {
+ connectionFactory = (SingleConnectionFactory) jmsConfig
+ .getWrappedConnectionFactory();
+ jmsServer = server;
+ }
+
+ }
+
+ }
+
+ if (jmsServer != null)
+ {
+ jmsServer.stop();
+ }
+
+ if (connectionFactory != null)
+ {
+ connectionFactory.destroy();
+ }
+ //TODO:Remove above code after fix CXF-2788
+ //close LifecycleListener if exists
+ busHolder.getBus().shutdown(false);
+ busHolder.close();
+ }
+ }
+}
+
Copied: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java (from rev 12284, stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java)
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.deployment.aspect;
+
+import java.lang.reflect.Method;
+import java.util.Map;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.endpoint.ServerRegistry;
+import org.apache.cxf.frontend.MethodDispatcher;
+import org.apache.cxf.frontend.SimpleMethodDispatcher;
+import org.apache.cxf.transport.Destination;
+import org.apache.cxf.transport.jms.JMSConfiguration;
+import org.apache.cxf.transport.jms.JMSDestination;
+import org.jboss.wsf.common.integration.JMSDeploymentAspect;
+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.JMSEndpoint;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+
+/**
+ * The DeploymentAspect to register the jms endpoints
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JMSEndpointRegistryDeploymentAspect extends JMSDeploymentAspect
+{
+ private EndpointRegistry registry = null;
+ @Override
+ public void start(Deployment dep)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ if (registry == null)
+ registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
+ Bus bus = dep.getAttachment(Bus.class);
+ Map<String, JMSConfiguration> jmsConfigMap = createEndpointJmsConfigMap(bus);
+ for (Endpoint endpoint : dep.getService().getEndpoints())
+ {
+ JMSEndpoint jmsEndpoint = (JMSEndpoint)endpoint;
+ String endpointImplClass = jmsEndpoint.getTargetBeanName();
+ JMSConfiguration jmsConfig = jmsConfigMap.get(endpointImplClass);
+ if (jmsConfig != null)
+ {
+ jmsEndpoint.setTargetDestination(jmsConfig.getTargetDestination());
+ jmsEndpoint.setReplyDestination(jmsConfig.getReplyDestination());
+ }
+
+ registry.register(jmsEndpoint);
+ }
+ }
+
+ public void stop(Deployment dep)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ if (registry == null)
+ registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ registry.unregister(ep);
+ }
+ }
+
+ private Map<String, JMSConfiguration> createEndpointJmsConfigMap(Bus bus)
+ {
+ Map<String, JMSConfiguration> endpointJmsConfigMap = new java.util.HashMap<String, JMSConfiguration>();
+ ServerRegistry serverRegsitry = bus.getExtension(ServerRegistry.class);
+ for (Server server : serverRegsitry.getServers())
+ {
+ Destination destination = server.getDestination();
+ if (destination instanceof JMSDestination)
+ {
+ JMSConfiguration jmsConfiguration = ((JMSDestination)destination).getJmsConfig();
+ String implClassName = getEndpointClassName(server);
+ if (implClassName != null)
+ {
+ endpointJmsConfigMap.put(implClassName, jmsConfiguration);
+ }
+ }
+ }
+ return endpointJmsConfigMap;
+ }
+
+ private String getEndpointClassName(Server server)
+ {
+ MethodDispatcher methodDispatcher = (SimpleMethodDispatcher) server.getEndpoint().getService().get(
+ MethodDispatcher.class.getName());
+ if (methodDispatcher != null && methodDispatcher instanceof SimpleMethodDispatcher)
+ {
+ Method method = ((SimpleMethodDispatcher)methodDispatcher).getPrimaryMethod(server.getEndpoint().getEndpointInfo().getInterface()
+ .getOperations().iterator().next());
+ return method != null ? method.getDeclaringClass().getName() : null;
+ }
+ return null;
+ }
+}
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.deployment.jms;
+
+import java.net.URL;
+
+import org.jboss.wsf.spi.metadata.jms.JMSDescriptorProcessor;
+import org.jboss.xb.binding.ObjectModelFactory;
+
+/**
+ * JMS descriptor processor implementation.
+ *
+ * @author <a href="ropalka(a)redhat.com">Richard Opalka</a>
+ */
+public final class JMSDescriptorProcessorImpl implements JMSDescriptorProcessor
+{
+ private String descriptorName;
+ private boolean isValidating;
+
+ /* (non-Javadoc)
+ * @see org.jboss.wsf.spi.metadata.DescriptorProcessor#getDescriptorName()
+ */
+ @Override
+ public String getDescriptorName()
+ {
+ return this.descriptorName;
+ }
+
+ /**
+ * Invoked via MC.
+ * @param descriptorName
+ */
+ public void setDescriptorName(final String descriptorName)
+ {
+ this.descriptorName = descriptorName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.wsf.spi.metadata.DescriptorProcessor#getFactory(java.net.URL)
+ */
+ @Override
+ public ObjectModelFactory getFactory(final URL url)
+ {
+ if (url == null)
+ throw new IllegalArgumentException("URL cannot be null");
+
+ return new JMSEndpointsFactory(url);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.wsf.spi.metadata.DescriptorProcessor#isValidating()
+ */
+ @Override
+ public boolean isValidating()
+ {
+ return this.isValidating;
+ }
+
+ /**
+ * Invoked via MC.
+ * @param isValidating
+ */
+ public void setValidating(final boolean isValidating)
+ {
+ this.isValidating = isValidating;
+ }
+}
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.deployment.jms;
+
+import java.net.URL;
+
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointMetaData;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * JMS Endpoints OjbectModelFactory
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JMSEndpointsFactory implements ObjectModelFactory
+{
+ private URL descriptorURL;
+
+ public JMSEndpointsFactory(URL descriptorURL)
+ {
+ this.descriptorURL = descriptorURL;
+ }
+
+ /**
+ * This method is called on the factory by the object model builder when the parsing starts.
+ *
+ * @return the root of the object model.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName,
+ Attributes attrs)
+ {
+ return new JMSEndpointsMetaData(descriptorURL);
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(JMSEndpointsMetaData endpoints, UnmarshallingContext navigator, String namespaceURI,
+ String localName, Attributes attrs)
+ {
+ if ("endpoint".equals(localName) && isJMSEndpoint(attrs))
+ {
+ JMSEndpointMetaData endpoint = new JMSEndpointMetaData(endpoints);
+ endpoint.setName(attrs.getValue("name"));
+ endpoint.setImplementor(attrs.getValue("implementor"));
+ endpoint.setEndpointName(attrs.getValue("endpointName"));
+ endpoint.setWsdlLocation(attrs.getValue("wsdlLocation"));
+ return endpoint;
+ }
+ else
+ return null;
+ }
+
+ private boolean isJMSEndpoint(final Attributes attrs)
+ {
+ if (attrs == null)
+ return false;
+ if (attrs.getValue("transportId") == null)
+ return false;
+
+ return attrs.getValue("transportId").equals("http://cxf.apache.org/transports/jms");
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JMSEndpointsMetaData endpoints, JMSEndpointMetaData endpointMetaData, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
+ {
+ endpoints.addEndpointMetaData(endpointMetaData);
+ }
+}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java 2010-07-09 11:39:54 UTC (rev 12619)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -45,6 +45,9 @@
private List<DDEndpoint> endpoints = new ArrayList<DDEndpoint>();
// Optional additional beans.
private List<DDBean> beans = new ArrayList<DDBean>();
+
+ private List<DDJmsAddressBean> addressBeans = new ArrayList<DDJmsAddressBean>();
+
// The derived temp file
private File tmpFile;
@@ -57,6 +60,11 @@
{
endpoints.add(service);
}
+
+ public void addAddress(DDJmsAddressBean addressBean)
+ {
+ addressBeans.add(addressBean);
+ }
public List<DDBean> getBeans()
{
@@ -104,9 +112,12 @@
"xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " +
"xmlns:beans='http://www.springframework.org/schema/beans' " +
"xmlns:jaxws='http://cxf.apache.org/jaxws' " +
+ "xmlns:jms='http://cxf.apache.org/transports/jms' " +
"xmlns:soap='http://cxf.apache.org/bindings/soap' " +
"xsi:schemaLocation='http://www.springframework.org/schema/beans " +
"http://www.springframework.org/schema/beans/spring-beans.xsd " +
+ "http://cxf.apache.org/transports/jms " +
+ "http://cxf.apache.org/schemas/configuration/jms.xsd " +
"http://cxf.apache.org/jaxws " +
"http://cxf.apache.org/schemas/jaxws.xsd'>");
@@ -118,6 +129,10 @@
{
bean.writeTo(writer);
}
+
+ for (DDJmsAddressBean bean : this.addressBeans) {
+ bean.writeTo(writer);
+ }
writer.write("</beans>");
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java 2010-07-09 11:39:54 UTC (rev 12619)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDEndpoint.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -37,9 +37,13 @@
{
//fields mapped to jboss-cxf.xml
private String id;
+
private String address;
+
private String implementor;
+
private String invoker;
+
private boolean mtomEnabled;
private String wsdlLocation;
private QName portName;
@@ -50,7 +54,6 @@
private int counter = 0;
-
public QName getPortName()
{
return portName;
@@ -135,7 +138,7 @@
{
this.invoker = invoker;
}
-
+
public void setMtomEnabled(boolean mtomEnabled)
{
this.mtomEnabled = mtomEnabled;
@@ -159,7 +162,7 @@
writer.write(" wsdlLocation='" + this.wsdlLocation + "'");
}
writer.write(">");
-
+
if (this.mtomEnabled)
{
writer.write("<jaxws:binding>");
@@ -171,7 +174,7 @@
{
writer.write("<jaxws:invoker><bean class='" + this.invoker + "'/></jaxws:invoker>");
}
-
+
writer.write("</jaxws:endpoint>");
}
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java 2010-07-09 11:54:11 UTC (rev 12620)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.metadata.services;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Properties;
+
+/**
+ * DDJmsAddressBean.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class DDJmsAddressBean
+{
+ private String portName;
+ private Properties properties;
+ private boolean isRequest = true;
+
+ public DDJmsAddressBean(String portName, boolean isRequest, Properties properties)
+ {
+ this.portName = portName;
+ this.isRequest = isRequest;
+ this.properties = properties;
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ if (isRequest)
+ {
+ writer.write("<jms:destination name='" + portName + ".jms-destination'>");
+ }
+ else
+ {
+ writer.write("<jms:conduit name='" + portName + ".jms-conduit'>");
+ }
+ writer.write("<jms:address");
+ for (String name : properties.stringPropertyNames())
+ {
+ writer.write(" " + name + "='" + properties.getProperty(name) + "'");
+ }
+ writer.write("/>");
+ if (isRequest)
+ {
+ writer.write("</jms:destination>");
+ }
+ else
+ {
+ writer.write("</jms:conduit>");
+ }
+ }
+
+ public String toString()
+ {
+ StringWriter strWriter = new StringWriter();
+ strWriter.write("JMSAddressing");
+ strWriter.write("\n portName=" + portName);
+ strWriter.write("\n isRequest=" + isRequest);
+ strWriter.write("\n");
+ properties.list(new java.io.PrintWriter(strWriter));
+ return strWriter.toString();
+ }
+
+
+}
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml 2010-07-09 11:39:54 UTC (rev 12619)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml 2010-07-09 11:54:11 UTC (rev 12620)
@@ -15,6 +15,11 @@
</list>
</property>
</bean>
+
+ <bean name="CXFJMSDescriptorProcessor" class="org.jboss.wsf.stack.cxf.deployment.jms.JMSDescriptorProcessorImpl">
+ <property name="validating">false</property>
+ <property name="descriptorName">jbossws-cxf.xml</property>
+ </bean>
<!-- Installed Record Processors-->
<bean name="WSMemoryBufferRecorder" class="org.jboss.wsf.framework.management.recording.MemoryBufferRecorder">
@@ -81,5 +86,16 @@
<property name="requires">ResourceResolver,StackDescriptor</property>
<property name="forJaxRpc">false</property>
</bean>
+
+ <!---JMSEndpoints Deployment Aspect-->
+ <bean name="JMSEndpointDeploymentAspect" class="org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointDeploymentAspect">
+ <property name="provides">BusHolder</property>
+ <property name="forJaxRpc">false</property>
+ </bean>
+
+ <bean name="JMSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointRegistryDeploymentAspect">
+ <property name="requires">BusHolder</property>
+ <property name="forJaxRpc">false</property>
+ </bean>
-</deployment>
+</deployment>
\ No newline at end of file
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2010-07-09 11:39:54 UTC (rev 12619)
+++ stack/cxf/trunk/pom.xml 2010-07-09 11:54:11 UTC (rev 12620)
@@ -81,6 +81,7 @@
<log4j.version>1.2.14</log4j.version>
<mail.version>1.4.2</mail.version>
<saaj.api.version>1.0.0.Beta1</saaj.api.version>
+ <jms.api.version>1.0.0.Beta1</jms.api.version>
<velocity.version>1.5</velocity.version>
<xerces.version>2.9.1</xerces.version>
<xmlsec.version>1.4.3</xmlsec.version>
@@ -1159,6 +1160,11 @@
<artifactId>jboss-logging-spi</artifactId>
<version>${jboss.logging.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.jms</groupId>
+ <artifactId>jboss-jms-api_1.1_spec</artifactId>
+ <version>${jms.api.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
15 years, 9 months
JBossWS SVN: r12619 - in stack/cxf/trunk/modules/testsuite: cxf-spring-tests/scripts and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-07-09 07:39:54 -0400 (Fri, 09 Jul 2010)
New Revision: 12619
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3086] merging CXF JMS prototype upstream - providing test case
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2010-07-09 11:11:37 UTC (rev 12618)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2010-07-09 11:39:54 UTC (rev 12619)
@@ -76,6 +76,19 @@
</metainf>
</jar>
+ <!-- jms endpoints sample-->
+ <!-- jms transport from java for as6 -->
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmsendpoints-as6.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
+ <include name="hornetq-jms.xml"/>
+ <include name="jbossws-cxf.xml"/>
+ </metainf>
+ </jar>
+
<!-- jaxws-samples-wsrm -->
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsrm.war"
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java 2010-07-09 11:39:54 UTC (rev 12619)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jmsendpoints.jmstransport;
+
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * The test for cxf jms transport packaged in a jar file and deployed with jbossws-cxf.xml
+ *
+ * @author <a href=mailto:ema@redhat.com> Jim Ma </a>
+ */
+public class JMSEndpointsTestCase extends JBossWSTest
+{
+ private static boolean waitForResponse;
+
+ public static Test suite() throws Exception
+ {
+ if (isHornetQAvailable()) {
+ return new JBossWSTestSetup(JMSEndpointsTestCase.class, "jaxws-samples-jmsendpoints-as6.jar");
+ } else {
+ return new TestSuite();
+ }
+ }
+
+ public static boolean isHornetQAvailable()
+ {
+ try
+ {
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=Server");
+ String jbossVersion = (String)getServer().getAttribute(oname, "VersionNumber");
+ return JBossWSTestHelper.isTargetJBoss6() && !jbossVersion.contains("M2");
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ public void testMessagingClient() throws Exception
+ {
+ String reqMessage =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<env:Body>" +
+ "<ns1:getContactInfo xmlns:ns1='http://org.jboss.ws/samples/jmstransport'>" +
+ "<arg0>mafia</arg0>" +
+ "</ns1:getContactInfo>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ String resMessage =
+ "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<soap:Body>" +
+ "<ns1:getContactInfoResponse xmlns:ns1='http://org.jboss.ws/samples/jmstransport'>" +
+ "<return>The 'mafia' boss is currently out of office, please call again.</return>" +
+ "</ns1:getContactInfoResponse>" +
+ "</soap:Body>" +
+ "</soap:Envelope>";
+
+ InitialContext context = new InitialContext();
+ QueueConnectionFactory connectionFactory = (QueueConnectionFactory)context.lookup("ConnectionFactory");
+ Queue reqQueue = (Queue)context.lookup("queue/RequestQueue");
+ Queue resQueue = (Queue)context.lookup("queue/ResponseQueue");
+
+ QueueConnection con = connectionFactory.createQueueConnection();
+ QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+ QueueReceiver receiver = session.createReceiver(resQueue);
+ ResponseListener responseListener = new ResponseListener();
+ receiver.setMessageListener(responseListener);
+ con.start();
+
+ TextMessage message = session.createTextMessage(reqMessage);
+ message.setJMSReplyTo(resQueue);
+
+ waitForResponse = true;
+
+ QueueSender sender = session.createSender(reqQueue);
+ sender.send(message);
+ sender.close();
+
+ int timeout = 5;
+ while (waitForResponse && timeout > 0)
+ {
+ Thread.sleep(1000);
+ timeout = timeout -1;
+ }
+
+ assertNotNull("Expected response message", responseListener.resMessage);
+ assertEquals(DOMUtils.parse(resMessage), DOMUtils.parse(responseListener.resMessage));
+
+ sender.close();
+ receiver.close();
+ con.stop();
+ session.close();
+ con.close();
+ }
+
+ public static class ResponseListener implements MessageListener
+ {
+ public String resMessage;
+
+ public void onMessage(Message msg)
+ {
+ TextMessage textMessage = (TextMessage)msg;
+ try
+ {
+ resMessage = textMessage.getText();
+ waitForResponse = false;
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ }
+ }
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java 2010-07-09 11:39:54 UTC (rev 12619)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jmsendpoints.jmstransport;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(targetNamespace = "http://org.jboss.ws/samples/jmstransport")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Organization
+{
+ String getContactInfo(String organization);
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java 2010-07-09 11:39:54 UTC (rev 12619)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.jmsendpoints.jmstransport;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService
+(
+ serviceName="OrganizationService",
+ portName="JmsPort",
+ targetNamespace = "http://org.jboss.ws/samples/jmstransport",
+ endpointInterface="org.jboss.test.ws.jaxws.samples.jmsendpoints.jmstransport.Organization"
+)
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class OrganizationJmsEndpoint implements Organization
+{
+ @WebMethod
+ public String getContactInfo(String organization)
+ {
+ return "The '" + organization + "' boss is currently out of office, please call again.";
+ }
+}
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml 2010-07-09 11:39:54 UTC (rev 12619)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration
+ xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+ <queue name="RequestQueue">
+ <entry name="/queue/RequestQueue"/>
+ </queue>
+ <queue name="ResponseQueue">
+ <entry name="/queue/ResponseQueue"/>
+ </queue>
+</configuration>
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml 2010-07-09 11:39:54 UTC (rev 12619)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans
+ xmlns='http://www.springframework.org/schema/beans'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xmlns:beans='http://www.springframework.org/schema/beans'
+ xmlns:jms="http://cxf.apache.org/transports/jms"
+ xmlns:jaxws='http://cxf.apache.org/jaxws'
+ xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/07/ws-policy.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/transports/jms http://cxf.apache.org/schemas/configuration/jms.xsd'>
+
+ <jaxws:endpoint
+ implementor='org.jboss.test.ws.jaxws.samples.jmsendpoints.jmstransport.OrganizationJmsEndpoint'
+ transportId="http://cxf.apache.org/transports/jms">
+ </jaxws:endpoint>
+
+ <jms:destination name="{http://org.jboss.ws/samples/jmstransport}JmsPort.jms-destination">
+ <jms:address
+ destinationStyle="queue"
+ jndiConnectionFactoryName="ConnectionFactory"
+ jndiDestinationName="queue/RequestQueue"
+ jndiReplyDestinationName="queue/ResponseQueue">
+ </jms:address>
+ </jms:destination>
+
+ <jms:conduit name="{http://org.jboss.ws/samples/jmstransport}JmsPort.jms-conduit">
+ <jms:address
+ destinationStyle="queue"
+ jndiConnectionFactoryName="ConnectionFactory"
+ jndiDestinationName="queue/RequestQueue"
+ jndiReplyDestinationName="queue/ResponseQueue">
+ </jms:address>
+ </jms:conduit>
+
+</beans>
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-07-09 11:11:37 UTC (rev 12618)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-07-09 11:39:54 UTC (rev 12619)
@@ -58,7 +58,9 @@
# [JBWS-3001] Verify @PostConstruct and @PreDestroy annotations support for POJO based endpoints
org/jboss/test/ws/jaxws/jbws2268/**
-# [JBWS-3028] Complete UsernameToken JAAS integration: PicketBox not available
-# on AS 5.x
+# [JBWS-3028] Complete UsernameToken JAAS integration: PicketBox not available on AS 5.x
org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.*
+# [JBWS-3086] This have been merged to AS 600M3 and upstream only
+org/jboss/test/ws/jaxws/samples/jmsendpoints/**
+
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-07-09 11:11:37 UTC (rev 12618)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-07-09 11:39:54 UTC (rev 12619)
@@ -58,7 +58,9 @@
# [JBWS-3001] Verify @PostConstruct and @PreDestroy annotations support for POJO based endpoints
org/jboss/test/ws/jaxws/jbws2268/**
-# [JBWS-3028] Complete UsernameToken JAAS integration: PicketBox not available
-# on AS 5.x
+# [JBWS-3028] Complete UsernameToken JAAS integration: PicketBox not available on AS 5.x
org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.*
+
+# [JBWS-3086] This have been merged to AS 600M3 and upstream only
+org/jboss/test/ws/jaxws/samples/jmsendpoints/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-07-09 11:11:37 UTC (rev 12618)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-07-09 11:39:54 UTC (rev 12619)
@@ -52,3 +52,6 @@
# [JBWS-3001] Verify @PostConstruct and @PreDestroy annotations support for POJO based endpoints
org/jboss/test/ws/jaxws/jbws2268/**
+# [JBWS-3086] TODO: merge to AS IL trunk once SPI, COMMON and FRAMEWORK are updated there
+org/jboss/test/ws/jaxws/samples/jmsendpoints/**
+
15 years, 9 months
JBossWS SVN: r12618 - container/jboss60/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-07-09 07:11:37 -0400 (Fri, 09 Jul 2010)
New Revision: 12618
Removed:
container/jboss60/branches/jbossws-jboss600M3-jms-integration/
Log:
[JBWS-3086] removing obsolete branch
15 years, 9 months
JBossWS SVN: r12617 - framework/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-07-09 07:09:55 -0400 (Fri, 09 Jul 2010)
New Revision: 12617
Removed:
framework/branches/jms-integration/
Log:
[JBWS-3086] removing obsolete branch
15 years, 9 months
JBossWS SVN: r12616 - common/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-07-09 07:09:21 -0400 (Fri, 09 Jul 2010)
New Revision: 12616
Removed:
common/branches/jms-integration/
Log:
[JBWS-3086] removing obsolete branch
15 years, 9 months