Author: alessio.soldano(a)jboss.com
Date: 2011-07-26 06:46:49 -0400 (Tue, 26 Jul 2011)
New Revision: 14744
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/EndpointWithConfigImpl.java
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/CustomRecordProcessorTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java
Log:
[JBWS-3330] Merging testcase from 4.0.0.Beta3 tag
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2011-07-26
10:22:18 UTC (rev 14743)
+++
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2011-07-26
10:46:49 UTC (rev 14744)
@@ -494,20 +494,31 @@
<!-- management-recording.jar -->
<jar
destfile="${tests.output.dir}/test-libs/management-recording-native.jar">
<fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/management/recording/*.class"/>
- <exclude
name="org/jboss/test/ws/management/recording/EndpointWithHandlerImpl.class"/>
- <exclude
name="org/jboss/test/ws/management/recording/*TestCase.class"/>
+ <include
name="org/jboss/test/ws/management/recording/Endpoint.class"/>
+ <include
name="org/jboss/test/ws/management/recording/EndpointImpl.class"/>
+ <include
name="org/jboss/test/ws/management/recording/MyManaged*.class"/>
+ <include
name="org/jboss/test/ws/management/recording/ExtManaged*.class"/>
</fileset>
<manifest>
<attribute name="Dependencies"
value="org.jboss.logging"/>
</manifest>
</jar>
+ <jar
destfile="${tests.output.dir}/test-libs/management-recording-as7.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/management/recording/Endpoint.class"/>
+ <include
name="org/jboss/test/ws/management/recording/EndpointWithConfigImpl.class"/>
+ </fileset>
+ <manifest>
+ <attribute name="Dependencies"
value="org.jboss.logging"/>
+ </manifest>
+ </jar>
<jar
destfile="${tests.output.dir}/test-libs/management-recording.jar">
<fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/management/recording/*.class"/>
+ <include
name="org/jboss/test/ws/management/recording/Endpoint.class"/>
+ <include
name="org/jboss/test/ws/management/recording/EndpointWithHandlerImpl.class"/>
+ <include
name="org/jboss/test/ws/management/recording/MyManaged*.class"/>
+ <include
name="org/jboss/test/ws/management/recording/ExtManaged*.class"/>
<include name="org/jboss/test/ws/management/recording/*.xml"/>
- <exclude
name="org/jboss/test/ws/management/recording/EndpointImpl.class"/>
- <exclude
name="org/jboss/test/ws/management/recording/*TestCase.class"/>
</fileset>
<manifest>
<attribute name="Dependencies"
value="org.jboss.logging"/>
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/CustomRecordProcessorTestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/CustomRecordProcessorTestCase.java 2011-07-26
10:22:18 UTC (rev 14743)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/CustomRecordProcessorTestCase.java 2011-07-26
10:46:49 UTC (rev 14744)
@@ -22,6 +22,7 @@
package org.jboss.test.ws.management.recording;
import java.net.URL;
+import java.rmi.RMISecurityManager;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
@@ -47,16 +48,27 @@
protected void setUp() throws Exception
{
- //Native does not require us to set the recording handler on the deployed endpoint
- boolean isNative = isIntegrationNative();
- new JBossWSTestHelper().deploy(isNative ?
"management-recording-native.jar" : "management-recording.jar");
- endpointObjectName = isNative ?
"jboss.ws:context=management-recording,endpoint=EndpointImpl" :
"jboss.ws:context=management-recording,endpoint=EndpointWithHandlerImpl";
+ if (!isTargetJBoss6()) {
+ endpointObjectName =
"jboss.ws:context=management-recording,endpoint=EndpointWithConfigImpl";
+ JBossWSTestHelper.deploy("management-recording-as7.jar");
+ } else if (isIntegrationNative()) {
+ endpointObjectName =
"jboss.ws:context=management-recording,endpoint=EndpointImpl";
+ JBossWSTestHelper.deploy("management-recording-native.jar");
+ } else {
+ endpointObjectName =
"jboss.ws:context=management-recording,endpoint=EndpointWithHandlerImpl";
+ JBossWSTestHelper.deploy("management-recording.jar");
+ }
}
protected void tearDown() throws Exception
{
- boolean isNative = isIntegrationNative();
- new JBossWSTestHelper().undeploy(isNative ?
"management-recording-native.jar" : "management-recording.jar");
+ if (!isTargetJBoss6()) {
+ JBossWSTestHelper.undeploy("management-recording-as7.jar");
+ } else if (isIntegrationNative()) {
+ JBossWSTestHelper.undeploy("management-recording-native.jar");
+ } else {
+ JBossWSTestHelper.undeploy("management-recording.jar");
+ }
}
public void testAddCustomProcessor() throws Exception
Copied:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/EndpointWithConfigImpl.java
(from rev 14730,
shared-testsuite/branches/jbossws-shared-testsuite-4.0.0.Beta3/testsuite/src/test/java/org/jboss/test/ws/management/recording/EndpointWithConfigImpl.java)
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/EndpointWithConfigImpl.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/EndpointWithConfigImpl.java 2011-07-26
10:46:49 UTC (rev 14744)
@@ -0,0 +1,55 @@
+/*
+ * 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.management.recording;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.api.annotation.EndpointConfig;
+import org.jboss.ws.api.annotation.WebContext;
+
+/**
+ * author alessio.soldano(a)jboss.com
+ * @since 20-Jul-2011
+ */
+@Stateless
+@WebService(serviceName="EndpointService", endpointInterface =
"org.jboss.test.ws.management.recording.Endpoint")
+@WebContext(contextRoot="/management-recording",
urlPattern="/EndpointImpl")
+@EndpointConfig(configName="Recording-Endpoint-Config")
+public class EndpointWithConfigImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(EndpointWithConfigImpl.class);
+
+ public String echo1(String input)
+ {
+ log.info("echo1: " + input);
+ return input;
+ }
+
+ public String echo2(String input)
+ {
+ log.info("echo2: " + input);
+ return input;
+ }
+}
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java 2011-07-26
10:22:18 UTC (rev 14743)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/management/recording/MemoryBufferRecorderTestCase.java 2011-07-26
10:46:49 UTC (rev 14744)
@@ -55,16 +55,27 @@
protected void setUp() throws Exception
{
- //Native does not require us to set the recording handler on the deployed endpoint
- boolean isNative = isIntegrationNative();
- new JBossWSTestHelper().deploy(isNative ?
"management-recording-native.jar" : "management-recording.jar");
- endpointObjectName = isNative ?
"jboss.ws:context=management-recording,endpoint=EndpointImpl" :
"jboss.ws:context=management-recording,endpoint=EndpointWithHandlerImpl";
+ if (!isTargetJBoss6()) {
+ endpointObjectName =
"jboss.ws:context=management-recording,endpoint=EndpointWithConfigImpl";
+ JBossWSTestHelper.deploy("management-recording-as7.jar");
+ } else if (isIntegrationNative()) {
+ endpointObjectName =
"jboss.ws:context=management-recording,endpoint=EndpointImpl";
+ JBossWSTestHelper.deploy("management-recording-native.jar");
+ } else {
+ endpointObjectName =
"jboss.ws:context=management-recording,endpoint=EndpointWithHandlerImpl";
+ JBossWSTestHelper.deploy("management-recording.jar");
+ }
}
protected void tearDown() throws Exception
{
- boolean isNative = isIntegrationNative();
- new JBossWSTestHelper().undeploy(isNative ?
"management-recording-native.jar" : "management-recording.jar");
+ if (!isTargetJBoss6()) {
+ JBossWSTestHelper.undeploy("management-recording-as7.jar");
+ } else if (isIntegrationNative()) {
+ JBossWSTestHelper.undeploy("management-recording-native.jar");
+ } else {
+ JBossWSTestHelper.undeploy("management-recording.jar");
+ }
}
public void testRecording() throws Exception