Author: jim.ma
Date: 2010-05-20 02:04:26 -0400 (Thu, 20 May 2010)
New Revision: 12284
Added:
stack/cxf/branches/jms-integration/.gitignore
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/web.xml
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/index.html
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/styles.css
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml
Removed:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/web.xml
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/index.html
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/styles.css
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/CXFEndpointsDeployment.java
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/EndpointsDescriptorDeploymentAspect.java
Modified:
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
Log:
[JBWS-2791]:Add the JMS endpoint test case
Copied: stack/cxf/branches/jms-integration/.gitignore (from rev 12223,
stack/cxf/trunk/.gitignore)
===================================================================
--- stack/cxf/branches/jms-integration/.gitignore (rev 0)
+++ stack/cxf/branches/jms-integration/.gitignore 2010-05-20 06:04:26 UTC (rev 12284)
@@ -0,0 +1,40 @@
+
+# /
+/ant.properties
+/clipboard.*
+/target
+/.settings
+/profiles.xml
+/target.properties
+/transaction.log
+
+# /modules/
+/modules/target
+
+# /modules/client/
+/modules/client/target
+
+# /modules/management/
+/modules/management/target
+
+# /modules/resources/
+/modules/resources/target
+
+# /modules/server/
+/modules/server/target
+
+# /modules/testsuite/
+/modules/testsuite/target
+
+# /modules/testsuite/cxf-tests/
+/modules/testsuite/cxf-tests/target
+
+# /modules/testsuite/framework-tests/
+/modules/testsuite/framework-tests/target
+/modules/testsuite/framework-tests/org
+/modules/testsuite/framework-tests/transaction.log
+
+# /modules/testsuite/framework-tests/src/test/
+/modules/testsuite/framework-tests/src/test/ant-import
+/modules/testsuite/framework-tests/src/test/java
+/modules/testsuite/framework-tests/src/test/resources
Copied:
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
(from rev 12223,
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java)
===================================================================
---
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,59 @@
+/*
+ * 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.client.configuration;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.Configurer;
+
+
+/**
+ * A simple bean created through cxf-extension-jbossws.xml in order to
+ * install the JBossWS configurer.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 04-May-2010
+ */
+public class ConfigurerInstaller
+{
+ private Bus bus;
+
+ public ConfigurerInstaller()
+ {
+ //NOOP
+ }
+
+ public Bus getBus()
+ {
+ return bus;
+ }
+
+ public void setBus(Bus bus)
+ {
+ this.bus = bus;
+ updateConfigurer();
+ }
+
+ protected void updateConfigurer()
+ {
+ bus.setExtension(new JBossWSCXFConfigurer(bus.getExtension(Configurer.class)),
Configurer.class);
+ }
+}
Copied:
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
(from rev 12223,
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java)
===================================================================
---
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,72 @@
+/*
+ * 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.client.configuration;
+
+import org.apache.cxf.configuration.Configurer;
+
+/**
+ * A CXF configurer that allows for custom configuration before delegating to another
configurer;
+ * this is installed by JBossWS' {@see
org.jboss.wsf.stack.cxf.client.configuration.ConfigurerInstaller}
+ * (see cxf-extension-jbossws.xml) to allow for custom client side configuration while
leaving
+ * Apache CXF the freedom of setting the initial configurer.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 04-May-2010
+ */
+public abstract class DelegatingConfigurer implements Configurer
+{
+ protected Configurer delegate;
+
+ public DelegatingConfigurer(Configurer delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public void configureBean(Object beanInstance)
+ {
+ internalConfigure(beanInstance);
+ if (delegate != null)
+ {
+ delegate.configureBean(beanInstance);
+ }
+ }
+
+ @Override
+ public void configureBean(String name, Object beanInstance)
+ {
+ internalConfigure(beanInstance);
+ if (delegate != null)
+ {
+ delegate.configureBean(name, beanInstance);
+ }
+ }
+
+ /**
+ * Performs custom configurations on the provided bean instance
+ * before delegating to the other configurer.
+ *
+ * @param beanInstance
+ */
+ protected abstract void internalConfigure(Object beanInstance);
+
+}
Copied: stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp (from rev
12223, stack/cxf/trunk/modules/management/src/main/pclwebapp)
Copied: stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF
(from rev 12223, stack/cxf/trunk/modules/management/src/main/pclwebapp/WEB-INF)
Deleted:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml
===================================================================
--- stack/cxf/trunk/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml 2010-05-13
08:24:12 UTC (rev 12223)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml 2010-05-20
06:04:26 UTC (rev 12284)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!DOCTYPE jboss-web
- PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
-
-<jboss-web>
-
- <!-- A security domain that restricts access
- <security-domain>java:/jaas/JBossWS</security-domain>
- -->
-
- <context-root>jbossws</context-root>
-
-</jboss-web>
Copied:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml
(from rev 12223,
stack/cxf/trunk/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml)
===================================================================
---
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/jboss-web.xml 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE jboss-web
+ PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+
+ <!-- A security domain that restricts access
+ <security-domain>java:/jaas/JBossWS</security-domain>
+ -->
+
+ <context-root>jbossws</context-root>
+
+</jboss-web>
Deleted:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/management/src/main/pclwebapp/WEB-INF/web.xml 2010-05-13
08:24:12 UTC (rev 12223)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/web.xml 2010-05-20
06:04:26 UTC (rev 12284)
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>JBossWS</display-name>
-
- <servlet>
- <servlet-name>ContextServlet</servlet-name>
-
<servlet-class>org.jboss.wsf.framework.management.ContextServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>PortComponentLinkServlet</servlet-name>
-
<servlet-class>org.jboss.ws.core.server.PortComponentLinkServlet</servlet-class>
- </servlet>
-
- <!-- now the mappings -->
-
- <servlet-mapping>
- <servlet-name>ContextServlet</servlet-name>
- <url-pattern>/services/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>PortComponentLinkServlet</servlet-name>
- <url-pattern>/pclink</url-pattern>
- </servlet-mapping>
-
- <!--
- currently the W3C haven't settled on a media type for WSDL;
-
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
- for now we go with the basic 'it's XML' response
- -->
- <mime-mapping>
- <extension>wsdl</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
- <mime-mapping>
- <extension>xsd</extension>
- <mime-type>text/xml</mime-type>
- </mime-mapping>
-
-</web-app>
Copied:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/web.xml
(from rev 12223, stack/cxf/trunk/modules/management/src/main/pclwebapp/WEB-INF/web.xml)
===================================================================
---
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/web.xml
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/WEB-INF/web.xml 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>JBossWS</display-name>
+
+ <servlet>
+ <servlet-name>ContextServlet</servlet-name>
+
<servlet-class>org.jboss.wsf.framework.management.ContextServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>PortComponentLinkServlet</servlet-name>
+
<servlet-class>org.jboss.ws.core.server.PortComponentLinkServlet</servlet-class>
+ </servlet>
+
+ <!-- now the mappings -->
+
+ <servlet-mapping>
+ <servlet-name>ContextServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>PortComponentLinkServlet</servlet-name>
+ <url-pattern>/pclink</url-pattern>
+ </servlet-mapping>
+
+ <!--
+ currently the W3C haven't settled on a media type for WSDL;
+
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+ for now we go with the basic 'it's XML' response
+ -->
+ <mime-mapping>
+ <extension>wsdl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <mime-mapping>
+ <extension>xsd</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+</web-app>
Deleted:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/index.html
===================================================================
--- stack/cxf/trunk/modules/management/src/main/pclwebapp/index.html 2010-05-13 08:24:12
UTC (rev 12223)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/index.html 2010-05-20
06:04:26 UTC (rev 12284)
@@ -1,75 +0,0 @@
-<html><head>
-<meta http-equiv='Content-Type content='text/html;
charset=iso-8859-1'>
-<title>JBossWS (@implementation.version@)</title>
-<link rel='stylesheet' href='./styles.css'>
-</head>
-<body>
-
-<div class='pageHeader'>JBossWS</div>
-
-<div class="pageSection">
-<h2>Welcome to JBoss Web Services</h2>
-JBossWS is a Web Service Framework contributing to the JBoss' JavaEE5 offering. It
integrates supported JAX-WS
-compliant web service stacks in JBoss AS while adding simplified management,
configuration, tooling, etc.
-</div>
-
-<div class="pageSection">
-<h3>Administration</h3>
-
-<fieldset>
- <legend><b>Runtime information</b></legend>
-<ul>
- <li><b>Version: jbossws-cxf-@version@</b></li>
- <li><b>Build: @buildNumber@</b></li>
- <li><a href="services">View a list of deployed
services</a></li>
- <li><a href="/jmx-console/">Access JMX
console</a></li>
-</ul>
-</fieldset>
-</div>
-
-<div class="pageSection">
-<h3>Project information</h3>
-
-<fieldset>
- <legend><b>Main resources</b></legend>
-
-<ul>
- <li><a
href="http://jboss.org/jbossws">Project home
page</a></li>
- <li><a
href="http://jboss.org/jbossws/downloads/">Latest download
and samples</a></li>
-</ul>
-</fieldset>
-<br/>
-
-<fieldset>
- <legend><b>Documentation</b></legend>
-
-<ul>
- <li><a
href="http://www.jboss.org/community/wiki/JBossWS">Documenta... home
page</a></li>
- <li><a
href="http://www.jboss.org/community/wiki/JBossWS-UserGuide">...
guide</a></li>
- <li><a
href="http://www.jboss.org/community/wiki/JBossWS-FAQ">FAQ&l...
- <li><a
href="http://www.jboss.org/community/wiki/JBossWS-Recordsmanagement&...
management</a></li>
-</ul>
-</fieldset>
-
-</br>
-<fieldset>
- <legend><b>Community</b></legend>
-<ul>
- <li><a
href="http://www.jboss.org/index.html?module=bb&op=viewforum&...
forum</a></li>
- <li><a
href="http://www.jboss.org/index.html?module=bb&op=viewforum&...
forum</a></li>
- <li><a
href="https://lists.jboss.org/mailman/listinfo/jbossws-cxf-users&quo...
list</a></li>
-</ul>
-</fieldset>
-
-</br>
-<fieldset>
- <legend><b>Source repository</b></legend>
-<ul>
- <li><a
href="http://www.jboss.org/community/wiki/JBossWS-Subversion"&g...
repository</a></li>
- <li><a
href="http://fisheye.jboss.com/viewrep/JBossWS">Browse
sources online</a></li>
-</ul>
-</fieldset>
-</div>
-
-</body>
-</html>
Copied:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/index.html (from
rev 12223, stack/cxf/trunk/modules/management/src/main/pclwebapp/index.html)
===================================================================
--- stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/index.html
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/index.html 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,75 @@
+<html><head>
+<meta http-equiv='Content-Type content='text/html;
charset=iso-8859-1'>
+<title>JBossWS (@implementation.version@)</title>
+<link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class='pageHeader'>JBossWS</div>
+
+<div class="pageSection">
+<h2>Welcome to JBoss Web Services</h2>
+JBossWS is a Web Service Framework contributing to the JBoss' JavaEE5 offering. It
integrates supported JAX-WS
+compliant web service stacks in JBoss AS while adding simplified management,
configuration, tooling, etc.
+</div>
+
+<div class="pageSection">
+<h3>Administration</h3>
+
+<fieldset>
+ <legend><b>Runtime information</b></legend>
+<ul>
+ <li><b>Version: jbossws-cxf-@version@</b></li>
+ <li><b>Build: @buildNumber@</b></li>
+ <li><a href="services">View a list of deployed
services</a></li>
+ <li><a href="/jmx-console/">Access JMX
console</a></li>
+</ul>
+</fieldset>
+</div>
+
+<div class="pageSection">
+<h3>Project information</h3>
+
+<fieldset>
+ <legend><b>Main resources</b></legend>
+
+<ul>
+ <li><a
href="http://jboss.org/jbossws">Project home
page</a></li>
+ <li><a
href="http://jboss.org/jbossws/downloads/">Latest download
and samples</a></li>
+</ul>
+</fieldset>
+<br/>
+
+<fieldset>
+ <legend><b>Documentation</b></legend>
+
+<ul>
+ <li><a
href="http://www.jboss.org/community/wiki/JBossWS">Documenta... home
page</a></li>
+ <li><a
href="http://www.jboss.org/community/wiki/JBossWS-UserGuide">...
guide</a></li>
+ <li><a
href="http://www.jboss.org/community/wiki/JBossWS-FAQ">FAQ&l...
+ <li><a
href="http://www.jboss.org/community/wiki/JBossWS-Recordsmanagement&...
management</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+ <legend><b>Community</b></legend>
+<ul>
+ <li><a
href="http://www.jboss.org/index.html?module=bb&op=viewforum&...
forum</a></li>
+ <li><a
href="http://www.jboss.org/index.html?module=bb&op=viewforum&...
forum</a></li>
+ <li><a
href="https://lists.jboss.org/mailman/listinfo/jbossws-cxf-users&quo...
list</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+ <legend><b>Source repository</b></legend>
+<ul>
+ <li><a
href="http://www.jboss.org/community/wiki/JBossWS-Subversion"&g...
repository</a></li>
+ <li><a
href="http://fisheye.jboss.com/viewrep/JBossWS">Browse
sources online</a></li>
+</ul>
+</fieldset>
+</div>
+
+</body>
+</html>
Deleted:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/styles.css
===================================================================
--- stack/cxf/trunk/modules/management/src/main/pclwebapp/styles.css 2010-05-13 08:24:12
UTC (rev 12223)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/styles.css 2010-05-20
06:04:26 UTC (rev 12284)
@@ -1,186 +0,0 @@
-
-/* table for list views */
-.table_list {
-}
-
-/* table for detail views */
-.table_form {
-}
-
-.pageHeader {
- font-size: 14pt;
- font-weight: BOLD;
- color: #ffffff;
- border-bottom-width:1px;
- border-bottom-style:solid;
- border-color:#000066;
- margin-bottom:15px;
- padding-left:15px;
- padding-top:5px;
- padding-bottom:5px;
- background-color: #3b4f66;
- max-width: 900px;
-}
-
-.pageSection {
- padding-left:15px;
- margin-bottom: 5px;
- max-width: 900px;
-}
-
-.metrics
-{
- font-size: 6pt;
- background-color: #dddddd;
- width: 100%;
-}
-
-/* table row header */
-.list_tr_head {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- font-weight: 600;
- text-align: center;
- background-color: #3b4f66;
-}
-
-/* table row list view */
-.list_tr {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- color: #000066;
- vertical-align: top;
- background-color: #ffffff;
-}
-
-/* table row list view odd lines */
-.list_tr_even {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- color: #000066;
- vertical-align: top;
- background-color: #ffffff;
-}
-
-/* table row list view even lines */
-.list_tr_odd {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- color: #000066;
- vertical-align: top;
- background-color: #dddddd;
-}
-
-/* form label */
-.form_label {
- font-family: Verdana, sans-serif;
- font-weight: 500;
- font-size: 8pt;
- color: #000066;
- vertical-align: top;
- background-color: #dddddd;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-/* form value */
-.form_value {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- color: #000066;
- vertical-align: baseline;
-}
-
-/* tiny writing */
-.tiny {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- color: #666666;
-}
-
-/* required input fields */
-.inputmust {
- background-color: #dddddd;
-}
-
-/* error message */
-.error {
- font-family: Courier New;
- color: #990000;
-}
-
-/* error message */
-.error_trace {
- font-family: Courier New;
-}
-
-/* active tree node */
-.tree_active_label {
- font-weight: bold;
-}
-
-body {
- font-family: Verdana,, sans-serif;
- font-size: 8pt;
- color: #000066;
- background-color: #ffffff;
-}
-
-/* title style */
-h1 {
- font-family: Verdana, sans-serif;
- font-size: 14pt;
- font-weight: 600;
- color: #000066;
-}
-
-h2 {
- font-family: Verdana, sans-serif;
- font-size: 12pt;
- font-weight: 600;
- color: #000066;
-}
-
-h3 {
- font-family: Verdana, sans-serif;
- font-size: 10pt;
- font-weight: 600;
- color: #000066;
-}
-
-h4 {
- font-family: Verdana, sans-serif;
- font-size: 10pt;
- font-weight: 500;
- color: #000066;
-}
-
-/* table desk */
-td {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- padding-left: 5px;
- padding-right: 5px;
-}
-
-input, textarea, select, option {
- font-family: Verdana, sans-serif;
- font-size: 8pt;
- color: #000066;
-}
-
-a {
- font-family: Verdana, sans-serif;
- color: #3b4f66;
- text-decoration: none;
-}
-
-a:hover{
- font-family: Verdana, sans-serif;
- color: #cc0000;
- text-decoration: none;
-}
-
-pre {
- background:#dddddd
-}
\ No newline at end of file
Copied:
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/styles.css (from
rev 12223, stack/cxf/trunk/modules/management/src/main/pclwebapp/styles.css)
===================================================================
--- stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/styles.css
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/management/src/main/pclwebapp/styles.css 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,186 @@
+
+/* table for list views */
+.table_list {
+}
+
+/* table for detail views */
+.table_form {
+}
+
+.pageHeader {
+ font-size: 14pt;
+ font-weight: BOLD;
+ color: #ffffff;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-color:#000066;
+ margin-bottom:15px;
+ padding-left:15px;
+ padding-top:5px;
+ padding-bottom:5px;
+ background-color: #3b4f66;
+ max-width: 900px;
+}
+
+.pageSection {
+ padding-left:15px;
+ margin-bottom: 5px;
+ max-width: 900px;
+}
+
+.metrics
+{
+ font-size: 6pt;
+ background-color: #dddddd;
+ width: 100%;
+}
+
+/* table row header */
+.list_tr_head {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ font-weight: 600;
+ text-align: center;
+ background-color: #3b4f66;
+}
+
+/* table row list view */
+.list_tr {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view odd lines */
+.list_tr_even {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view even lines */
+.list_tr_odd {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+}
+
+/* form label */
+.form_label {
+ font-family: Verdana, sans-serif;
+ font-weight: 500;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+/* form value */
+.form_value {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: baseline;
+}
+
+/* tiny writing */
+.tiny {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #666666;
+}
+
+/* required input fields */
+.inputmust {
+ background-color: #dddddd;
+}
+
+/* error message */
+.error {
+ font-family: Courier New;
+ color: #990000;
+}
+
+/* error message */
+.error_trace {
+ font-family: Courier New;
+}
+
+/* active tree node */
+.tree_active_label {
+ font-weight: bold;
+}
+
+body {
+ font-family: Verdana,, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ background-color: #ffffff;
+}
+
+/* title style */
+h1 {
+ font-family: Verdana, sans-serif;
+ font-size: 14pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h2 {
+ font-family: Verdana, sans-serif;
+ font-size: 12pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h3 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h4 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 500;
+ color: #000066;
+}
+
+/* table desk */
+td {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+input, textarea, select, option {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+}
+
+a {
+ font-family: Verdana, sans-serif;
+ color: #3b4f66;
+ text-decoration: none;
+}
+
+a:hover{
+ font-family: Verdana, sans-serif;
+ color: #cc0000;
+ text-decoration: none;
+}
+
+pre {
+ background:#dddddd
+}
\ No newline at end of file
Deleted:
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/CXFEndpointsDeployment.java
===================================================================
---
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/CXFEndpointsDeployment.java 2010-05-20
03:17:02 UTC (rev 12283)
+++
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/CXFEndpointsDeployment.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -1,190 +0,0 @@
-/*
- * 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.util.ArrayList;
-import java.util.List;
-
-import org.apache.cxf.BusFactory;
-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.WSHelper;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.metadata.endpoints.AbstractEndpointsDeployment;
-import org.jboss.wsf.spi.metadata.endpoints.EndpointMetaData;
-import org.jboss.wsf.spi.metadata.endpoints.EndpointsMetaData;
-import org.jboss.wsf.spi.metadata.endpoints.jms.JMSAddressMetaData;
-import org.jboss.wsf.spi.metadata.endpoints.jms.JMSDestinationMetaData;
-import org.jboss.wsf.stack.cxf.configuration.BusHolder;
-import org.springframework.jms.connection.SingleConnectionFactory;
-
-/**
- * The pojo bean to deploy the jbossws-endpoints.xml to cxf stack
- *
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class CXFEndpointsDeployment extends AbstractEndpointsDeployment
-{
-
- private EndpointRegistry registry;
-
- private BusHolder busHolder = null;
-
- private List<Endpoint> endpointsList = new ArrayList<Endpoint>();
-
- @Override
- public void start() throws Exception
- {
- log.debug("Deploying jbossws-endpoints.xml in " +
this.getDeployment().getSimpleName());
- if (this.getURL() != null)
- {
- ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
- try
- {
-
SecurityActions.setContextClassLoader(this.getDeployment().getRuntimeClassLoader());
- busHolder = BusHolder.create(this.getURL());
- }
- catch (Exception e)
- {
- log.error("Failed to create endpoints deployment");
- throw e;
- }
-
- finally
- {
- BusFactory.setDefaultBus(null);
- BusFactory.setThreadDefaultBus(null);
- SecurityActions.setContextClassLoader(origClassLoader);
- }
-
- registerEndpoints();
- }
- }
-
- @Override
- public void stop() throws Exception
- {
- log.debug("Undeploying jbossws-endpoints.xml in " +
this.getDeployment().getSimpleName());
- if (busHolder != null & busHolder.getBus() != null)
- {
- //CXF uses WrappedConnectionFactory to create "jmsLietener".
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();
- }
- unregisterEndpoints();
- }
-
- private void registerEndpoints()
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- if (registry == null)
- registry =
spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
- DeploymentModelFactory deploymentModelFactory =
spiProvider.getSPI(DeploymentModelFactory.class);
- EndpointsMetaData endpointsMD =
WSHelper.getRequiredAttachment(this.getDeployment(), EndpointsMetaData.class);
- for (EndpointMetaData endpointMD : endpointsMD.getEndpointsMetaData())
- {
- Endpoint endpoint =
deploymentModelFactory.newEndpoint(endpointMD.getImplementor());
- endpoint.setShortName(this.getDeployment().getSimpleName());
-
- if (endpointMD.getAddressMetaData() instanceof JMSAddressMetaData)
- {
- StringBuffer address = new StringBuffer("jms:");
- JMSAddressMetaData jmsAddressMetaData = (JMSAddressMetaData)
endpointMD.getAddressMetaData();
- JMSDestinationMetaData request = jmsAddressMetaData.getRequestDestination();
- if (request.getProperty("jndiDestinationName") != null)
- {
- address.append("jndi:" +
request.getProperty("jndiDestinationName"));
- }
- else if (request.getProperty("jmsDestinationName") != null)
- {
- address.append("jndi:" +
request.getProperty("jmsDestinationName"));
- }
-
- JMSDestinationMetaData reply = jmsAddressMetaData.getReplyDestination();
- if (reply.getProperty("jndiDestinationName") != null)
- {
- address.append("?replyToName =" +
reply.getProperty("jndiDestinationName"));
- }
- else if (reply.getProperty("jmsDestinationName") != null)
- {
- address.append("?replyToName =" +
reply.getProperty("jmsDestinationName"));
- }
-
- endpoint.setAddress(address.toString());
- registry.register(endpoint);
- endpointsList.add(endpoint);
- }
- }
- }
-
- public void unregisterEndpoints()
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- if (registry == null)
- registry =
spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
- for (Endpoint ep : this.endpointsList)
- {
- registry.unregister(ep);
- }
-
- }
-}
Deleted:
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/EndpointsDescriptorDeploymentAspect.java
===================================================================
---
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/EndpointsDescriptorDeploymentAspect.java 2010-05-20
03:17:02 UTC (rev 12283)
+++
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/EndpointsDescriptorDeploymentAspect.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -1,111 +0,0 @@
-/*
- * 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.jboss.wsf.common.integration.AbstractDeploymentAspect;
-import org.jboss.wsf.common.integration.WSHelper;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.endpoints.AbstractEndpointsDeployment;
-import org.jboss.wsf.spi.metadata.endpoints.EndpointMetaData;
-import org.jboss.wsf.spi.metadata.endpoints.EndpointsMetaData;
-import org.jboss.wsf.spi.metadata.endpoints.jms.JMSAddressMetaData;
-import org.jboss.wsf.stack.cxf.deployment.CXFEndpointsDeployment;
-import org.jboss.wsf.stack.cxf.metadata.services.DDBeans;
-import org.jboss.wsf.stack.cxf.metadata.services.DDEndpoint;
-import org.jboss.wsf.stack.cxf.metadata.services.DDJmsAddressBean;
-
-/**
- * To convert the EndpointsMetaData to cxf deployment spring style xml
- *
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class EndpointsDescriptorDeploymentAspect extends AbstractDeploymentAspect
-{
-
-
- @Override
- public void start(Deployment dep)
- {
- if (WSHelper.getOptionalAttachment(dep, EndpointsMetaData.class) != null)
- {
- URL url = this.generateCXFDeploymentDescriptor(dep);
- AbstractEndpointsDeployment endpointsDeployment = new CXFEndpointsDeployment();
- endpointsDeployment.setURL(url);
- endpointsDeployment.setDeployment(dep);
- endpointsDeployment.setEndpointsMetaData(WSHelper.getOptionalAttachment(dep,
EndpointsMetaData.class));
- dep.addAttachment(AbstractEndpointsDeployment.class, endpointsDeployment);
- }
- }
-
- @Override
- public void stop(Deployment dep)
- {
- dep.removeAttachment(AbstractEndpointsDeployment.class);
- }
-
- @Override
- public boolean canHandle(Deployment dep)
- {
- if (WSHelper.isJaxrpcDeployment(dep))
- {
- return false;
- }
- else
- {
- return WSHelper.getOptionalAttachment(dep, EndpointsMetaData.class) == null ?
false : true;
- }
- }
-
- private URL generateCXFDeploymentDescriptor(Deployment dep)
- {
- DDBeans ddBeans = new DDBeans();
- EndpointsMetaData endpoints = WSHelper.getRequiredAttachment(dep,
EndpointsMetaData.class);
- for (EndpointMetaData endpointMD : endpoints.getEndpointsMetaData())
- {
- DDEndpoint endpointBean = new DDEndpoint(dep.getSimpleName(),
endpointMD.getImplementor());
- ddBeans.addEndpoint(endpointBean);
- if (endpointMD.getAddressMetaData() != null &&
endpointMD.getAddressMetaData() instanceof JMSAddressMetaData)
- {
- JMSAddressMetaData jmsMD = (JMSAddressMetaData)
endpointMD.getAddressMetaData();
-
endpointBean.setTransportId("http://cxf.apache.org/transports/jms&qu...;
- if (jmsMD.getRequestDestination() != null)
- {
- DDJmsAddressBean addressBean = new DDJmsAddressBean(jmsMD.getPortName(),
true, jmsMD
- .getRequestDestination().getProperties());
- ddBeans.addAddress(addressBean);
- }
-
- if (jmsMD.getReplyDestination() != null)
- {
- DDJmsAddressBean addressBean = new DDJmsAddressBean(jmsMD.getPortName(),
false, jmsMD
- .getReplyDestination().getProperties());
- ddBeans.addAddress(addressBean);
- }
- }
- }
- URL url = ddBeans.createFileURL();
- return url;
-
- }
-}
Added:
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java
===================================================================
---
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -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 "jmsLietener".
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();
+ }
+ }
+}
+
Added:
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java
===================================================================
---
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointRegistryDeploymentAspect.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -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;
+ }
+}
Copied:
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
(from rev 12223,
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java)
===================================================================
---
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,258 @@
+/*
+ * 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;
+
+import java.util.Stack;
+import java.util.StringTokenizer;
+
+import javax.jws.WebService;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.soap.MTOM;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.wsf.stack.cxf.metadata.services.DDBeans;
+import org.jboss.wsf.stack.cxf.metadata.services.DDEndpoint;
+
+/**
+ * Builds the DDBeans metadata used for generating the jboss-cxf.xml deployment
descriptor
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 15-Apr-2010
+ *
+ */
+public class MetadataBuilder
+{
+ private static final Logger log = Logger.getLogger(MetadataBuilder.class);
+
+ public MetadataBuilder()
+ {
+
+ }
+
+ public DDBeans build(Deployment dep, String invokerEJB3, String invokerJSE)
+ {
+ DeploymentType depType = dep.getType();
+ DDBeans dd = new DDBeans();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ DDEndpoint ddep = createDDEndpoint(ep.getTargetBeanClass(),
(ArchiveDeployment)dep, ep);
+
+ if (depType == DeploymentType.JAXWS_EJB3)
+ {
+ ddep.setInvoker(invokerEJB3);
+ }
+
+ if (depType == DeploymentType.JAXWS_JSE)
+ {
+ ddep.setInvoker(invokerJSE);
+ }
+
+ processWSDDContribution(ddep, (ArchiveDeployment)dep);
+
+ log.info("Add " + ddep);
+ dd.addEndpoint(ddep);
+ }
+ return dd;
+ }
+
+ protected boolean isMtomEnabled(Class<?> beanClass)
+ {
+ BindingType bindingType = (BindingType)beanClass.getAnnotation(BindingType.class);
+ MTOM mtom = (MTOM)beanClass.getAnnotation(MTOM.class);
+
+ boolean mtomEnabled = mtom != null;
+ if (!mtomEnabled && bindingType != null)
+ {
+ String binding = bindingType.value();
+ mtomEnabled = binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) ||
binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING);
+ }
+
+ return mtomEnabled;
+ }
+
+ private void processWSDDContribution(DDEndpoint endpoint, ArchiveDeployment dep)
+ {
+ WebservicesMetaData webservices =
WebservicesFactory.loadFromVFSRoot(dep.getRootFile());
+ if (webservices != null)
+ {
+ for (WebserviceDescriptionMetaData wsDesc :
webservices.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData portComp : wsDesc.getPortComponents())
+ {
+ // We match portComp's by SEI first and portQName second
+ // In the first case the portComp may override the portQName that derives
from the annotation
+ String portCompSEI = portComp.getServiceEndpointInterface();
+ boolean doesMatch = portCompSEI != null ?
portCompSEI.equals(endpoint.getEpClass().getName()) : false;
+ if (!doesMatch)
+ {
+ doesMatch = portComp.getWsdlPort().equals(endpoint.getPortName());
+ }
+
+ if (doesMatch)
+ {
+ // PortQName overrides
+ if (portComp.getWsdlPort() != null)
+ {
+ if (log.isDebugEnabled())
+ log.debug("Override portName " + endpoint.getPortName()
+ " with " + portComp.getWsdlPort());
+ endpoint.setPortName(portComp.getWsdlPort());
+ }
+ //ServiceQName overrides
+ if (portComp.getWsdlService() != null)
+ {
+ if (log.isDebugEnabled())
+ log.debug("Override serviceName " +
endpoint.getServiceName() + " with " + portComp.getWsdlService());
+ endpoint.setServiceName(portComp.getWsdlService());
+ }
+
+ //TODO implement handler chain override
+
+ // MTOM settings
+ if (portComp.isEnableMtom())
+ {
+ log.debug("Enabling MTOM");
+ endpoint.setMtomEnabled(true);
+ }
+
+ //wsdlLocation override
+ String wsdlFile = portComp.getWebserviceDescription().getWsdlFile();
+ if (wsdlFile != null)
+ {
+ if (log.isDebugEnabled())
+ log.debug("Override wsdlFile location with " +
wsdlFile);
+ endpoint.setWsdlLocation(wsdlFile);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ protected DDEndpoint createDDEndpoint(Class<?> sepClass, ArchiveDeployment dep,
Endpoint ep)
+ {
+ WebService anWebService = sepClass.getAnnotation(WebService.class);
+ WebServiceProvider anWebServiceProvider =
sepClass.getAnnotation(WebServiceProvider.class);
+
+ Class<?> seiClass = null;
+ String seiName;
+
+ String name = (anWebService != null) ? anWebService.name() : "";
+ if (name.length() == 0)
+ name = JavaUtils.getJustClassName(sepClass);
+
+ String serviceName = (anWebService != null) ? anWebService.serviceName() :
anWebServiceProvider.serviceName();
+ if (serviceName.length() == 0)
+ serviceName = JavaUtils.getJustClassName(sepClass) + "Service";
+
+ String serviceNS = (anWebService != null) ? anWebService.targetNamespace() :
anWebServiceProvider.targetNamespace();
+ if (serviceNS.length() == 0)
+ serviceNS = getTypeNamespace(JavaUtils.getPackageName(sepClass));
+
+ String portName = (anWebService != null) ? anWebService.portName() :
anWebServiceProvider.portName();
+ if (portName.length() == 0)
+ portName = name + "Port";
+
+ if (anWebService != null && anWebService.endpointInterface().length() >
0)
+ {
+ seiName = anWebService.endpointInterface();
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if(null == runtimeClassLoader)
+ throw new IllegalArgumentException("Runtime loader cannot be
null");
+
+ try
+ {
+ seiClass = runtimeClassLoader.loadClass(seiName);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new RuntimeException("Cannot load service endpoint interface
class!", cnfe);
+ }
+ WebService seiAnnotation = seiClass.getAnnotation(WebService.class);
+
+ if (seiAnnotation == null)
+ throw new RuntimeException("Interface does not have a @WebService
annotation: " + seiName);
+
+ if (seiAnnotation.portName().length() > 0 ||
seiAnnotation.serviceName().length() > 0 || seiAnnotation.endpointInterface().length()
> 0)
+ throw new RuntimeException("@WebService cannot have attribute
'portName', 'serviceName', 'endpointInterface' on: " +
seiName);
+
+ }
+
+ DDEndpoint result = new DDEndpoint();
+
+ result.setId(ep.getShortName());
+ result.setAddress(ep.getAddress());
+ result.setImplementor(ep.getTargetBeanName());
+ result.setMtomEnabled(isMtomEnabled(ep.getTargetBeanClass()));
+ result.setEpClass(seiClass != null ? seiClass : sepClass);
+ result.setPortName(new QName(serviceNS, portName));
+ result.setServiceName(new QName(serviceNS, serviceName));
+
+ return result;
+ }
+
+
+
+ /**
+ * Extracts the typeNS given the package name
+ * Algorithm is based on the one specified in JAWS v2.0 spec
+ */
+ private static String getTypeNamespace(String packageName)
+ {
+ StringBuilder sb = new StringBuilder("http://");
+
+ //Generate tokens with '.' as delimiter
+ StringTokenizer st = new StringTokenizer(packageName, ".");
+
+ //Have a LIFO queue for the tokens
+ Stack<String> stk = new Stack<String>();
+ while (st != null && st.hasMoreTokens())
+ {
+ stk.push(st.nextToken());
+ }
+
+ String next;
+ while (!stk.isEmpty() && (next = stk.pop()) != null)
+ {
+ if (sb.toString().equals("http://") == false)
+ sb.append('.');
+ sb.append(next);
+ }
+
+ // trailing slash
+ sb.append('/');
+
+ return sb.toString();
+ }
+
+}
Modified:
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
===================================================================
---
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2010-05-20
03:17:02 UTC (rev 12283)
+++
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2010-05-20
06:04:26 UTC (rev 12284)
@@ -16,95 +16,18 @@
<mkdir dir="${tests.output.dir}/test-libs"/>
- <!--jms transport endpoints deployment descriptor sample-->
-
- <!-- jms transport from wsdl for as5 -->
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-endpointsdd-fromwsdl-as5.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationEndpoint.class"/>
- </fileset>
-
- <fileset
dir="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/fromwsdl">
- <include name="wsdl/*"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/fromwsdl/META-INF">
- <include name="jboss-service.xml"/>
- <include name="jbossws-endpoints.xml"/>
- </metainf>
- </jar>
-
- <!-- jms transport from wsdl for as6 -->
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-endpointsdd-fromwsdl-as6.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationEndpoint.class"/>
- </fileset>
-
- <fileset
dir="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/fromwsdl">
- <include name="wsdl/*"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/fromwsdl/META-INF">
- <include name="hornetq-jms.xml"/>
- <include name="jbossws-endpoints.xml"/>
- </metainf>
- </jar>
-
- <!-- jms transport from java for as5 -->
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-endpointsdd-as5.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationJmsEndpoint.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/WEB-INF">
- <include name="jboss-service.xml"/>
- <include name="jbossws-endpoints.xml"/>
- </metainf>
- </jar>
-
+ <!-- jms endpoints sample-->
<!-- jms transport from java for as6 -->
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-endpointsdd-as6.jar">
+ <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/endpointsdd/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationJmsEndpoint.class"/>
+ <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/endpointsdd/WEB-INF">
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
<include name="hornetq-jms.xml"/>
- <include name="jbossws-endpoints.xml"/>
+ <include name="jbossws-cxf.xml"/>
</metainf>
</jar>
-
- <!-- jms transport deployed with http endpoint for as5 -->
- <war
- warfile="${tests.output.dir}/test-libs/jaxws-samples-jms-as5.war"
-
webxml="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationHttpEndpoint.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationJmsEndpoint.class"/>
- </classes>
- <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/WEB-INF">
- <include name="jboss-web.xml"/>
- <include name="jboss-service.xml"/>
- <include name="jbossws-endpoints.xml"/>
- </webinf>
- </war>
-
- <!-- jms transport deployed with http endpoint for as6 -->
- <war
- warfile="${tests.output.dir}/test-libs/jaxws-samples-jms-as6.war"
-
webxml="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationHttpEndpoint.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/endpointsdd/jmstransport/OrganizationJmsEndpoint.class"/>
- </classes>
- <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/endpointsdd/WEB-INF">
- <include name="jboss-web.xml"/>
- <include name="hornetq-jms.xml"/>
- <include name="jbossws-endpoints.xml"/>
- </webinf>
- </war>
<!-- jaxws-samples-jmstransport -->
<war
Added:
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
===================================================================
---
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -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/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java
===================================================================
---
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -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/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java
===================================================================
---
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.java 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,38 @@
+/*
+ * 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/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml
===================================================================
---
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/hornetq-jms.xml 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,10 @@
+<?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>
\ No newline at end of file
Added:
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml
===================================================================
---
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml
(rev 0)
+++
stack/cxf/branches/jms-integration/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/jmsendpoints/META-INF/jbossws-cxf.xml 2010-05-20
06:04:26 UTC (rev 12284)
@@ -0,0 +1,29 @@
+<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>
+
+