Author: alessio.soldano(a)jboss.com
Date: 2010-03-19 10:21:16 -0400 (Fri, 19 Mar 2010)
New Revision: 11825
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2966] Provide different queue configurations when using HornetQ on AS trunk
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2010-03-19
14:16:49 UTC (rev 11824)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2010-03-19
14:21:16 UTC (rev 11825)
@@ -37,6 +37,14 @@
<include name="jboss-service.xml"/>
</metainf>
</jar>
+ <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport-as6.sar">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-samples-jmstransport.war"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
+ <include name="hornetq-jms.xml"/>
+ </metainf>
+ </jar>
<!-- jaxws-fromjava-jmstransport -->
<war
@@ -59,6 +67,14 @@
<include name="jboss-service.xml"/>
</metainf>
</jar>
+ <jar
jarfile="${tests.output.dir}/test-libs/jaxws-fromjava-jmstransport-as6.sar">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-fromjava-jmstransport.war"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
+ <include name="hornetq-jms.xml"/>
+ </metainf>
+ </jar>
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java 2010-03-19
14:16:49 UTC (rev 11824)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java 2010-03-19
14:21:16 UTC (rev 11825)
@@ -31,12 +31,15 @@
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 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;
/**
@@ -50,8 +53,22 @@
public static Test suite() throws Exception
{
- return new JBossWSTestSetup(FromJavaJMSTransportTestCase.class,
"jaxws-fromjava-jmstransport.sar");
+ return new JBossWSTestSetup(FromJavaJMSTransportTestCase.class,
isHornetQAvailable() ? "jaxws-fromjava-jmstransport-as6.sar" :
"jaxws-fromjava-jmstransport.sar");
}
+
+ private 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
{
@@ -104,6 +121,8 @@
assertNotNull("Expected response message", responseListener.resMessage);
assertEquals(DOMUtils.parse(resMessage),
DOMUtils.parse(responseListener.resMessage));
+ sender.close();
+ receiver.close();
con.stop();
session.close();
con.close();
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2010-03-19
14:16:49 UTC (rev 11824)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2010-03-19
14:21:16 UTC (rev 11825)
@@ -33,6 +33,7 @@
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.jms.TextMessage;
+import javax.management.ObjectName;
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -40,7 +41,9 @@
import junit.framework.Test;
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;
/**
@@ -54,9 +57,22 @@
public static Test suite() throws Exception
{
- return new JBossWSTestSetup(JMSTransportTestCase.class,
"jaxws-samples-jmstransport.sar");
+ return new JBossWSTestSetup(JMSTransportTestCase.class, isHornetQAvailable() ?
"jaxws-samples-jmstransport-as6.sar" :
"jaxws-samples-jmstransport.sar");
}
+ private 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 testJMSEndpointPort() throws Exception
{
@@ -136,6 +152,8 @@
assertNotNull("Expected response message", responseListener.resMessage);
assertEquals(DOMUtils.parse(resMessage),
DOMUtils.parse(responseListener.resMessage));
+ sender.close();
+ receiver.close();
con.stop();
session.close();
con.close();
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2010-03-19 14:16:49 UTC (rev 11824)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2010-03-19 14:21:16 UTC (rev 11825)
@@ -26,6 +26,7 @@
<wsdl.publish.location>${project.build.directory}/wsdl-publish</wsdl.publish.location>
<hibernate.version>3.2.4.sp1</hibernate.version>
<asm.version>2.2.3</asm.version>
+ <hornetq.version>2.1.0.r8931</hornetq.version>
<jboss.javaee.version>5.0.0.GA</jboss.javaee.version>
</properties>
@@ -550,6 +551,16 @@
<artifactId>jboss-as-system</artifactId>
<version>${jboss.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-transports</artifactId>
+ <version>${hornetq.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms-client</artifactId>
+ <version>${hornetq.version}</version>
+ </dependency>
</dependencies>
<build>
<plugins>
Show replies by date