You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/06/09 17:08:27 UTC
svn commit: r1133913 [10/13] - in /cxf/trunk:
rt/core/src/test/java/org/apache/cxf/endpoint/
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/search/client/
rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/ext/search/client/
rt/frontend/jax...
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java Thu Jun 9 15:08:22 2011
@@ -1,100 +1,100 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class HelloWorldContinuationsClientServerTest extends AbstractBusClientServerTestBase {
- static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
- static final String PORT = Server2.PORT;
-
- private static boolean serversStarted;
- private static final String CONFIG_FILE =
- "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
-
- @Before
- public void startServers() throws Exception {
- if (serversStarted) {
- return;
- }
- Map<String, String> props = new HashMap<String, String>();
- if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
- props.put("org.apache.activemq.default.directory.prefix",
- System.getProperty("org.apache.activemq.default.directory.prefix"));
- }
- props.put("java.util.logging.config.file",
- System.getProperty("java.util.logging.config.file"));
-
- assertTrue("server did not launch correctly",
- launchServer(org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher.class, props, null));
-
- assertTrue("server did not launch correctly",
- launchServer(Server2.class, true));
- serversStarted = true;
- }
-
- @Test
- public void testHttpWrappedContinuatuions() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- Bus bus = bf.createBus(CONFIG_FILE);
- BusFactory.setDefaultBus(bus);
-
- QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
-
- URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test.wsdl");
-
- HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
- assertNotNull(service);
- final HelloContinuation helloPort = service.getHelloContinuationPort();
-
- ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
- new ArrayBlockingQueue<Runnable>(10));
- CountDownLatch startSignal = new CountDownLatch(1);
- CountDownLatch helloDoneSignal = new CountDownLatch(5);
-
- executor.execute(new HelloWorker(helloPort, "Fred", "", startSignal, helloDoneSignal));
- executor.execute(new HelloWorker(helloPort, "Barry", "Jameson", startSignal, helloDoneSignal));
- executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
- executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
- executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
-
- startSignal.countDown();
- helloDoneSignal.await(60, TimeUnit.SECONDS);
- executor.shutdownNow();
- assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class HelloWorldContinuationsClientServerTest extends AbstractBusClientServerTestBase {
+ static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+ static final String PORT = Server2.PORT;
+
+ private static boolean serversStarted;
+ private static final String CONFIG_FILE =
+ "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
+
+ @Before
+ public void startServers() throws Exception {
+ if (serversStarted) {
+ return;
+ }
+ Map<String, String> props = new HashMap<String, String>();
+ if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+ props.put("org.apache.activemq.default.directory.prefix",
+ System.getProperty("org.apache.activemq.default.directory.prefix"));
+ }
+ props.put("java.util.logging.config.file",
+ System.getProperty("java.util.logging.config.file"));
+
+ assertTrue("server did not launch correctly",
+ launchServer(org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher.class, props, null));
+
+ assertTrue("server did not launch correctly",
+ launchServer(Server2.class, true));
+ serversStarted = true;
+ }
+
+ @Test
+ public void testHttpWrappedContinuatuions() throws Exception {
+ SpringBusFactory bf = new SpringBusFactory();
+ Bus bus = bf.createBus(CONFIG_FILE);
+ BusFactory.setDefaultBus(bus);
+
+ QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
+
+ URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test.wsdl");
+
+ HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
+ assertNotNull(service);
+ final HelloContinuation helloPort = service.getHelloContinuationPort();
+
+ ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+ new ArrayBlockingQueue<Runnable>(10));
+ CountDownLatch startSignal = new CountDownLatch(1);
+ CountDownLatch helloDoneSignal = new CountDownLatch(5);
+
+ executor.execute(new HelloWorker(helloPort, "Fred", "", startSignal, helloDoneSignal));
+ executor.execute(new HelloWorker(helloPort, "Barry", "Jameson", startSignal, helloDoneSignal));
+ executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
+ executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
+ executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
+
+ startSignal.countDown();
+ helloDoneSignal.await(60, TimeUnit.SECONDS);
+ executor.shutdownNow();
+ assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
+ }
+
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java Thu Jun 9 15:08:22 2011
@@ -1,105 +1,105 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class HelloWorldContinuationsThrottleTest extends AbstractBusClientServerTestBase {
- static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
-
- private static boolean serversStarted;
- private static final String CONFIG_FILE =
- "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
-
- @Before
- public void startServers() throws Exception {
- if (serversStarted) {
- return;
- }
- Map<String, String> props = new HashMap<String, String>();
- if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
- props.put("org.apache.activemq.default.directory.prefix",
- System.getProperty("org.apache.activemq.default.directory.prefix"));
- }
- props.put("java.util.logging.config.file",
- System.getProperty("java.util.logging.config.file"));
-
- assertTrue("server did not launch correctly",
- launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
- assertTrue("server did not launch correctly",
- launchServer(Server3.class));
- serversStarted = true;
- }
-
- @Test
- public void testHttpWrappedContinuatuions() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- Bus bus = bf.createBus(CONFIG_FILE);
- BusFactory.setDefaultBus(bus);
-
- QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
-
- URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test2.wsdl");
- String wsdlString = wsdlURL.toString().intern();
- EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
- HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
- assertNotNull(service);
- final HelloContinuation helloPort = service.getHelloContinuationPort();
-
- ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
- new ArrayBlockingQueue<Runnable>(10));
- CountDownLatch startSignal = new CountDownLatch(1);
- CountDownLatch helloDoneSignal = new CountDownLatch(5);
-
- executor.execute(new HelloWorker(helloPort, "Fred", "", startSignal, helloDoneSignal));
- startSignal.countDown();
-
- Thread.sleep(10000);
-
- executor.execute(new HelloWorker(helloPort, "Barry", "Jameson", startSignal, helloDoneSignal));
- executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
- executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
- executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
-
-
- helloDoneSignal.await(60, TimeUnit.SECONDS);
- executor.shutdownNow();
- System.out.println("Completed : " + (5 - helloDoneSignal.getCount()));
- assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class HelloWorldContinuationsThrottleTest extends AbstractBusClientServerTestBase {
+ static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+
+ private static boolean serversStarted;
+ private static final String CONFIG_FILE =
+ "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
+
+ @Before
+ public void startServers() throws Exception {
+ if (serversStarted) {
+ return;
+ }
+ Map<String, String> props = new HashMap<String, String>();
+ if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+ props.put("org.apache.activemq.default.directory.prefix",
+ System.getProperty("org.apache.activemq.default.directory.prefix"));
+ }
+ props.put("java.util.logging.config.file",
+ System.getProperty("java.util.logging.config.file"));
+
+ assertTrue("server did not launch correctly",
+ launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+
+ assertTrue("server did not launch correctly",
+ launchServer(Server3.class));
+ serversStarted = true;
+ }
+
+ @Test
+ public void testHttpWrappedContinuatuions() throws Exception {
+ SpringBusFactory bf = new SpringBusFactory();
+ Bus bus = bf.createBus(CONFIG_FILE);
+ BusFactory.setDefaultBus(bus);
+
+ QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
+
+ URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test2.wsdl");
+ String wsdlString = wsdlURL.toString().intern();
+ EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+ HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
+ assertNotNull(service);
+ final HelloContinuation helloPort = service.getHelloContinuationPort();
+
+ ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+ new ArrayBlockingQueue<Runnable>(10));
+ CountDownLatch startSignal = new CountDownLatch(1);
+ CountDownLatch helloDoneSignal = new CountDownLatch(5);
+
+ executor.execute(new HelloWorker(helloPort, "Fred", "", startSignal, helloDoneSignal));
+ startSignal.countDown();
+
+ Thread.sleep(10000);
+
+ executor.execute(new HelloWorker(helloPort, "Barry", "Jameson", startSignal, helloDoneSignal));
+ executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
+ executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
+ executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
+
+
+ helloDoneSignal.await(60, TimeUnit.SECONDS);
+ executor.shutdownNow();
+ System.out.println("Completed : " + (5 - helloDoneSignal.getCount()));
+ assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
+ }
+
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java Thu Jun 9 15:08:22 2011
@@ -1,153 +1,153 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.Resource;
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceContext;
-
-import org.apache.cxf.continuations.Continuation;
-import org.apache.cxf.continuations.ContinuationProvider;
-
-
-
-@WebService(name = "HelloContinuation",
- serviceName = "HelloContinuationService",
- portName = "HelloContinuationPort",
- targetNamespace = "http://cxf.apache.org/systest/jaxws",
- endpointInterface = "org.apache.cxf.systest.jms.continuations.HelloContinuation",
- wsdlLocation = "org/apache/cxf/systest/jms/continuations/test.wsdl")
-public class HelloWorldWithContinuationsJMS implements HelloContinuation {
-
- private Map<String, Continuation> suspended =
- new HashMap<String, Continuation>();
- private Executor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
- new ArrayBlockingQueue<Runnable>(10));
-
- @Resource
- private WebServiceContext context;
-
- public String sayHi(String firstName, String secondName) {
-
- Continuation continuation = getContinuation(firstName);
- if (continuation == null) {
- throw new RuntimeException("Failed to get continuation");
- }
- synchronized (continuation) {
- if (continuation.isNew()) {
- Object userObject = secondName != null && secondName.length() > 0
- ? secondName : null;
- continuation.setObject(userObject);
- suspendInvocation(firstName, continuation);
- } else {
- if (!continuation.isResumed()) {
- throw new RuntimeException("No timeout expected");
- }
- StringBuilder sb = new StringBuilder();
- sb.append(firstName);
-
- // if the actual parameter is not null
- if (secondName != null && secondName.length() > 0) {
- String surname = continuation.getObject().toString();
- sb.append(' ').append(surname);
- }
- //System.out.println("Saying hi to " + sb.toString());
- return "Hi " + sb.toString();
- }
- }
- // unreachable
- return null;
- }
-
- public boolean isRequestSuspended(String name) {
- synchronized (suspended) {
- while (!suspended.containsKey(name)) {
- try {
- suspended.wait(1000);
- } catch (InterruptedException ex) {
- return false;
- }
- }
- }
- //System.out.println("Invocation for " + name + " has been suspended");
-
- return true;
- }
-
- public void resumeRequest(final String name) {
-
- Continuation suspendedCont = null;
- synchronized (suspended) {
- suspendedCont = suspended.get(name);
- }
-
- if (suspendedCont != null) {
- synchronized (suspendedCont) {
- suspendedCont.resume();
- }
- }
- }
-
- private void suspendInvocation(final String name, Continuation cont) {
-
- //System.out.println("Suspending invocation for " + name);
-
- try {
- cont.suspend(500000);
- } finally {
- synchronized (suspended) {
- suspended.put(name, cont);
- }
- executor.execute(new Runnable() {
- public void run() {
- try {
- Thread.sleep(2000);
- } catch (InterruptedException ex) {
- // ignore
- }
- resumeRequest(name);
- }
- });
- }
- }
-
- private Continuation getContinuation(String name) {
-
- //System.out.println("Getting continuation for " + name);
-
- synchronized (suspended) {
- Continuation suspendedCont = suspended.remove(name);
- if (suspendedCont != null) {
- return suspendedCont;
- }
- }
-
- ContinuationProvider provider =
- (ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());
- return provider.getContinuation();
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.cxf.continuations.Continuation;
+import org.apache.cxf.continuations.ContinuationProvider;
+
+
+
+@WebService(name = "HelloContinuation",
+ serviceName = "HelloContinuationService",
+ portName = "HelloContinuationPort",
+ targetNamespace = "http://cxf.apache.org/systest/jaxws",
+ endpointInterface = "org.apache.cxf.systest.jms.continuations.HelloContinuation",
+ wsdlLocation = "org/apache/cxf/systest/jms/continuations/test.wsdl")
+public class HelloWorldWithContinuationsJMS implements HelloContinuation {
+
+ private Map<String, Continuation> suspended =
+ new HashMap<String, Continuation>();
+ private Executor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+ new ArrayBlockingQueue<Runnable>(10));
+
+ @Resource
+ private WebServiceContext context;
+
+ public String sayHi(String firstName, String secondName) {
+
+ Continuation continuation = getContinuation(firstName);
+ if (continuation == null) {
+ throw new RuntimeException("Failed to get continuation");
+ }
+ synchronized (continuation) {
+ if (continuation.isNew()) {
+ Object userObject = secondName != null && secondName.length() > 0
+ ? secondName : null;
+ continuation.setObject(userObject);
+ suspendInvocation(firstName, continuation);
+ } else {
+ if (!continuation.isResumed()) {
+ throw new RuntimeException("No timeout expected");
+ }
+ StringBuilder sb = new StringBuilder();
+ sb.append(firstName);
+
+ // if the actual parameter is not null
+ if (secondName != null && secondName.length() > 0) {
+ String surname = continuation.getObject().toString();
+ sb.append(' ').append(surname);
+ }
+ //System.out.println("Saying hi to " + sb.toString());
+ return "Hi " + sb.toString();
+ }
+ }
+ // unreachable
+ return null;
+ }
+
+ public boolean isRequestSuspended(String name) {
+ synchronized (suspended) {
+ while (!suspended.containsKey(name)) {
+ try {
+ suspended.wait(1000);
+ } catch (InterruptedException ex) {
+ return false;
+ }
+ }
+ }
+ //System.out.println("Invocation for " + name + " has been suspended");
+
+ return true;
+ }
+
+ public void resumeRequest(final String name) {
+
+ Continuation suspendedCont = null;
+ synchronized (suspended) {
+ suspendedCont = suspended.get(name);
+ }
+
+ if (suspendedCont != null) {
+ synchronized (suspendedCont) {
+ suspendedCont.resume();
+ }
+ }
+ }
+
+ private void suspendInvocation(final String name, Continuation cont) {
+
+ //System.out.println("Suspending invocation for " + name);
+
+ try {
+ cont.suspend(500000);
+ } finally {
+ synchronized (suspended) {
+ suspended.put(name, cont);
+ }
+ executor.execute(new Runnable() {
+ public void run() {
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
+ resumeRequest(name);
+ }
+ });
+ }
+ }
+
+ private Continuation getContinuation(String name) {
+
+ //System.out.println("Getting continuation for " + name);
+
+ synchronized (suspended) {
+ Continuation suspendedCont = suspended.remove(name);
+ if (suspendedCont != null) {
+ return suspendedCont;
+ }
+ }
+
+ ContinuationProvider provider =
+ (ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());
+ return provider.getContinuation();
+ }
+
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java Thu Jun 9 15:08:22 2011
@@ -1,156 +1,156 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.Resource;
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceContext;
-
-import org.apache.cxf.continuations.Continuation;
-import org.apache.cxf.continuations.ContinuationProvider;
-
-
-
-@WebService(name = "HelloContinuation",
- serviceName = "HelloContinuationService",
- portName = "HelloContinuationPort",
- targetNamespace = "http://cxf.apache.org/systest/jaxws",
- endpointInterface = "org.apache.cxf.systest.jms.continuations.HelloContinuation",
- wsdlLocation = "org/apache/cxf/systest/jms/continuations/test2.wsdl")
-public class HelloWorldWithContinuationsJMS2 implements HelloContinuation {
-
- private Map<String, Continuation> suspended =
- new HashMap<String, Continuation>();
- private Executor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
- new ArrayBlockingQueue<Runnable>(10));
-
- @Resource
- private WebServiceContext context;
-
- public String sayHi(String firstName, String secondName) {
-
- Continuation continuation = getContinuation(firstName);
- if (continuation == null) {
- throw new RuntimeException("Failed to get continuation");
- }
- synchronized (continuation) {
- if (continuation.isNew()) {
- Object userObject = secondName != null && secondName.length() > 0
- ? secondName : null;
- continuation.setObject(userObject);
- suspendInvocation(firstName, continuation);
- } else {
- if (!continuation.isResumed() && !"Fred".equals(firstName)) {
- throw new RuntimeException("No timeout expected");
- }
- StringBuilder sb = new StringBuilder();
- sb.append(firstName);
-
- // if the actual parameter is not null
- if (secondName != null && secondName.length() > 0) {
- String surname = continuation.getObject().toString();
- sb.append(' ').append(surname);
- }
- //System.out.println("Saying hi to " + sb.toString());
- return "Hi " + sb.toString();
- }
- }
- // unreachable
- return null;
- }
-
- public boolean isRequestSuspended(String name) {
- synchronized (suspended) {
- while (!suspended.containsKey(name)) {
- try {
- suspended.wait(1000);
- } catch (InterruptedException ex) {
- return false;
- }
- }
- }
- //System.out.println("Invocation for " + name + " has been suspended");
-
- return true;
- }
-
- public void resumeRequest(final String name) {
-
- Continuation suspendedCont = null;
- synchronized (suspended) {
- suspendedCont = suspended.get(name);
- }
-
- if (suspendedCont != null) {
- synchronized (suspendedCont) {
- suspendedCont.resume();
- }
- }
- }
-
- private void suspendInvocation(final String name, Continuation cont) {
-
- //System.out.println("Suspending invocation for " + name);
-
- try {
- long timeout = "Fred".equals(name) ? 8000 : 4000;
- cont.suspend(timeout);
- } finally {
- synchronized (suspended) {
- suspended.put(name, cont);
- }
- if (!"Fred".equals(name)) {
- executor.execute(new Runnable() {
- public void run() {
- try {
- Thread.sleep(2000);
- } catch (InterruptedException ex) {
- // ignore
- }
- resumeRequest(name);
- }
- });
- }
- }
- }
-
- private Continuation getContinuation(String name) {
-
- //System.out.println("Getting continuation for " + name);
-
- synchronized (suspended) {
- Continuation suspendedCont = suspended.remove(name);
- if (suspendedCont != null) {
- return suspendedCont;
- }
- }
-
- ContinuationProvider provider =
- (ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());
- return provider.getContinuation();
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.cxf.continuations.Continuation;
+import org.apache.cxf.continuations.ContinuationProvider;
+
+
+
+@WebService(name = "HelloContinuation",
+ serviceName = "HelloContinuationService",
+ portName = "HelloContinuationPort",
+ targetNamespace = "http://cxf.apache.org/systest/jaxws",
+ endpointInterface = "org.apache.cxf.systest.jms.continuations.HelloContinuation",
+ wsdlLocation = "org/apache/cxf/systest/jms/continuations/test2.wsdl")
+public class HelloWorldWithContinuationsJMS2 implements HelloContinuation {
+
+ private Map<String, Continuation> suspended =
+ new HashMap<String, Continuation>();
+ private Executor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+ new ArrayBlockingQueue<Runnable>(10));
+
+ @Resource
+ private WebServiceContext context;
+
+ public String sayHi(String firstName, String secondName) {
+
+ Continuation continuation = getContinuation(firstName);
+ if (continuation == null) {
+ throw new RuntimeException("Failed to get continuation");
+ }
+ synchronized (continuation) {
+ if (continuation.isNew()) {
+ Object userObject = secondName != null && secondName.length() > 0
+ ? secondName : null;
+ continuation.setObject(userObject);
+ suspendInvocation(firstName, continuation);
+ } else {
+ if (!continuation.isResumed() && !"Fred".equals(firstName)) {
+ throw new RuntimeException("No timeout expected");
+ }
+ StringBuilder sb = new StringBuilder();
+ sb.append(firstName);
+
+ // if the actual parameter is not null
+ if (secondName != null && secondName.length() > 0) {
+ String surname = continuation.getObject().toString();
+ sb.append(' ').append(surname);
+ }
+ //System.out.println("Saying hi to " + sb.toString());
+ return "Hi " + sb.toString();
+ }
+ }
+ // unreachable
+ return null;
+ }
+
+ public boolean isRequestSuspended(String name) {
+ synchronized (suspended) {
+ while (!suspended.containsKey(name)) {
+ try {
+ suspended.wait(1000);
+ } catch (InterruptedException ex) {
+ return false;
+ }
+ }
+ }
+ //System.out.println("Invocation for " + name + " has been suspended");
+
+ return true;
+ }
+
+ public void resumeRequest(final String name) {
+
+ Continuation suspendedCont = null;
+ synchronized (suspended) {
+ suspendedCont = suspended.get(name);
+ }
+
+ if (suspendedCont != null) {
+ synchronized (suspendedCont) {
+ suspendedCont.resume();
+ }
+ }
+ }
+
+ private void suspendInvocation(final String name, Continuation cont) {
+
+ //System.out.println("Suspending invocation for " + name);
+
+ try {
+ long timeout = "Fred".equals(name) ? 8000 : 4000;
+ cont.suspend(timeout);
+ } finally {
+ synchronized (suspended) {
+ suspended.put(name, cont);
+ }
+ if (!"Fred".equals(name)) {
+ executor.execute(new Runnable() {
+ public void run() {
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
+ resumeRequest(name);
+ }
+ });
+ }
+ }
+ }
+
+ private Continuation getContinuation(String name) {
+
+ //System.out.println("Getting continuation for " + name);
+
+ synchronized (suspended) {
+ Continuation suspendedCont = suspended.remove(name);
+ if (suspendedCont != null) {
+ return suspendedCont;
+ }
+ }
+
+ ContinuationProvider provider =
+ (ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());
+ return provider.getContinuation();
+ }
+
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java Thu Jun 9 15:08:22 2011
@@ -1,44 +1,44 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import org.apache.cxf.interceptor.AttachmentInInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-
-public class IncomingMessageCounterInterceptor extends AbstractPhaseInterceptor<Message> {
-
- private static int messageCount;
-
- public IncomingMessageCounterInterceptor() {
- super(Phase.RECEIVE);
- getBefore().add(AttachmentInInterceptor.class.getName());
- }
-
-
- public void handleMessage(Message message) throws Fault {
- messageCount++;
- }
-
- public static int getMessageCount() {
- return messageCount;
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import org.apache.cxf.interceptor.AttachmentInInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+public class IncomingMessageCounterInterceptor extends AbstractPhaseInterceptor<Message> {
+
+ private static int messageCount;
+
+ public IncomingMessageCounterInterceptor() {
+ super(Phase.RECEIVE);
+ getBefore().add(AttachmentInInterceptor.class.getName());
+ }
+
+
+ public void handleMessage(Message message) throws Fault {
+ messageCount++;
+ }
+
+ public static int getMessageCount() {
+ return messageCount;
+ }
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java Thu Jun 9 15:08:22 2011
@@ -1,90 +1,90 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.hello_world_jms.HelloWorldPortType;
-import org.apache.cxf.hello_world_jms.HelloWorldService;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class JMSContinuationsClientServerTest extends AbstractBusClientServerTestBase {
- protected static boolean serversStarted;
- static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
- static final String PORT = Server.PORT;
-
-
- @Before
- public void startServers() throws Exception {
- if (serversStarted) {
- return;
- }
- Map<String, String> props = new HashMap<String, String>();
- if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
- props.put("org.apache.activemq.default.directory.prefix",
- System.getProperty("org.apache.activemq.default.directory.prefix"));
- }
- props.put("java.util.logging.config.file",
- System.getProperty("java.util.logging.config.file"));
-
- assertTrue("server did not launch correctly",
- launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
- assertTrue("server did not launch correctly",
- launchServer(Server.class, false));
- serversStarted = true;
- }
-
- public URL getWSDLURL(String s) throws Exception {
- return getClass().getResource(s);
- }
- public QName getServiceName(QName q) {
- return q;
- }
- public QName getPortName(QName q) {
- return q;
- }
-
-
- @Test
- public void testContinuationWithTimeout() throws Exception {
- QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms",
- "HelloWorldService"));
- QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
- URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
- assertNotNull(wsdl);
- String wsdlString = wsdl.toString();
- EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
-
- HelloWorldService service = new HelloWorldService(wsdl, serviceName);
- assertNotNull(service);
-
- HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
- assertEquals("Hi Fred Ruby", greeter.greetMe("Fred"));
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.hello_world_jms.HelloWorldPortType;
+import org.apache.cxf.hello_world_jms.HelloWorldService;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class JMSContinuationsClientServerTest extends AbstractBusClientServerTestBase {
+ protected static boolean serversStarted;
+ static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+ static final String PORT = Server.PORT;
+
+
+ @Before
+ public void startServers() throws Exception {
+ if (serversStarted) {
+ return;
+ }
+ Map<String, String> props = new HashMap<String, String>();
+ if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+ props.put("org.apache.activemq.default.directory.prefix",
+ System.getProperty("org.apache.activemq.default.directory.prefix"));
+ }
+ props.put("java.util.logging.config.file",
+ System.getProperty("java.util.logging.config.file"));
+
+ assertTrue("server did not launch correctly",
+ launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+
+ assertTrue("server did not launch correctly",
+ launchServer(Server.class, false));
+ serversStarted = true;
+ }
+
+ public URL getWSDLURL(String s) throws Exception {
+ return getClass().getResource(s);
+ }
+ public QName getServiceName(QName q) {
+ return q;
+ }
+ public QName getPortName(QName q) {
+ return q;
+ }
+
+
+ @Test
+ public void testContinuationWithTimeout() throws Exception {
+ QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms",
+ "HelloWorldService"));
+ QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
+ URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+ assertNotNull(wsdl);
+ String wsdlString = wsdl.toString();
+ EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+
+ HelloWorldService service = new HelloWorldService(wsdl, serviceName);
+ assertNotNull(service);
+
+ HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
+ assertEquals("Hi Fred Ruby", greeter.greetMe("Fred"));
+ }
+
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java Thu Jun 9 15:08:22 2011
@@ -1,96 +1,96 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.hello_world_jms.HelloWorldPortType;
-import org.apache.cxf.hello_world_jms.HelloWorldService;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class ProviderJMSContinuationTest extends AbstractBusClientServerTestBase {
- protected static boolean serversStarted;
- static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
- static final String PORT = ProviderServer.PORT;
-
-
- @Before
- public void startServers() throws Exception {
- if (serversStarted) {
- return;
- }
- Map<String, String> props = new HashMap<String, String>();
- if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
- props.put("org.apache.activemq.default.directory.prefix",
- System.getProperty("org.apache.activemq.default.directory.prefix"));
- }
- props.put("java.util.logging.config.file",
- System.getProperty("java.util.logging.config.file"));
-
- assertTrue("server did not launch correctly",
- launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
- assertTrue("server did not launch correctly",
- launchServer(ProviderServer.class, false));
- serversStarted = true;
- }
-
- public URL getWSDLURL(String s) throws Exception {
- return getClass().getResource(s);
- }
- public QName getServiceName(QName q) {
- return q;
- }
- public QName getPortName(QName q) {
- return q;
- }
-
-
- @Test
- public void testProviderContinuation() throws Exception {
- try {
- QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms",
- "HelloWorldService"));
- QName portName = getPortName(
- new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
- URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
- assertNotNull(wsdl);
- String wsdlString = wsdl.toString();
- EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
-
- HelloWorldService service = new HelloWorldService(wsdl, serviceName);
- assertNotNull(service);
- HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
- greeter.greetMe("ffang");
- } catch (Exception ex) {
- fail("shouldn't get exception here, which is caused by "
- + ex.getMessage());
- }
- }
-
-}
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.hello_world_jms.HelloWorldPortType;
+import org.apache.cxf.hello_world_jms.HelloWorldService;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ProviderJMSContinuationTest extends AbstractBusClientServerTestBase {
+ protected static boolean serversStarted;
+ static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+ static final String PORT = ProviderServer.PORT;
+
+
+ @Before
+ public void startServers() throws Exception {
+ if (serversStarted) {
+ return;
+ }
+ Map<String, String> props = new HashMap<String, String>();
+ if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+ props.put("org.apache.activemq.default.directory.prefix",
+ System.getProperty("org.apache.activemq.default.directory.prefix"));
+ }
+ props.put("java.util.logging.config.file",
+ System.getProperty("java.util.logging.config.file"));
+
+ assertTrue("server did not launch correctly",
+ launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+
+ assertTrue("server did not launch correctly",
+ launchServer(ProviderServer.class, false));
+ serversStarted = true;
+ }
+
+ public URL getWSDLURL(String s) throws Exception {
+ return getClass().getResource(s);
+ }
+ public QName getServiceName(QName q) {
+ return q;
+ }
+ public QName getPortName(QName q) {
+ return q;
+ }
+
+
+ @Test
+ public void testProviderContinuation() throws Exception {
+ try {
+ QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms",
+ "HelloWorldService"));
+ QName portName = getPortName(
+ new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
+ URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+ assertNotNull(wsdl);
+ String wsdlString = wsdl.toString();
+ EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+
+ HelloWorldService service = new HelloWorldService(wsdl, serviceName);
+ assertNotNull(service);
+ HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
+ greeter.greetMe("ffang");
+ } catch (Exception ex) {
+ fail("shouldn't get exception here, which is caused by "
+ + ex.getMessage());
+ }
+ }
+
+}
+
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java Thu Jun 9 15:08:22 2011
@@ -1,54 +1,54 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import javax.xml.ws.Endpoint;
-
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-public class ProviderServer extends AbstractBusTestServerBase {
- public static final String PORT = allocatePort(ProviderServer.class);
-
-
- protected void run() {
- EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
- "/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
-
- Object implementor = new HWSoapMessageDocProvider();
- String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
- Endpoint endpoint = Endpoint.publish(address, implementor);
- ((EndpointImpl)endpoint).getInInterceptors().add(new IncomingMessageCounterInterceptor());
- }
-
-
- public static void main(String[] args) {
- try {
- ProviderServer s = new ProviderServer();
- s.start();
- } catch (Exception ex) {
- ex.printStackTrace();
- System.exit(-1);
- } finally {
- System.out.println("done!");
- }
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class ProviderServer extends AbstractBusTestServerBase {
+ public static final String PORT = allocatePort(ProviderServer.class);
+
+
+ protected void run() {
+ EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+ "/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+
+ Object implementor = new HWSoapMessageDocProvider();
+ String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+ Endpoint endpoint = Endpoint.publish(address, implementor);
+ ((EndpointImpl)endpoint).getInInterceptors().add(new IncomingMessageCounterInterceptor());
+ }
+
+
+ public static void main(String[] args) {
+ try {
+ ProviderServer s = new ProviderServer();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java Thu Jun 9 15:08:22 2011
@@ -1,51 +1,51 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import javax.xml.ws.Endpoint;
-
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-public class Server extends AbstractBusTestServerBase {
- public static final String PORT = allocatePort(Server.class);
-
- protected void run() {
- EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
- "testutils/jms_test.wsdl");
-
- Object implementor = new GreeterImplWithContinuationsJMS();
- String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
- }
-
-
- public static void main(String[] args) {
- try {
- Server s = new Server();
- s.start();
- } catch (Exception ex) {
- ex.printStackTrace();
- System.exit(-1);
- } finally {
- System.out.println("done!");
- }
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class Server extends AbstractBusTestServerBase {
+ public static final String PORT = allocatePort(Server.class);
+
+ protected void run() {
+ EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+ "testutils/jms_test.wsdl");
+
+ Object implementor = new GreeterImplWithContinuationsJMS();
+ String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+ Endpoint.publish(address, implementor);
+ }
+
+
+ public static void main(String[] args) {
+ try {
+ Server s = new Server();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java Thu Jun 9 15:08:22 2011
@@ -1,50 +1,50 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import javax.xml.ws.Endpoint;
-
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-public class Server2 extends AbstractBusTestServerBase {
- public static final String PORT = allocatePort(Server2.class);
-
- protected void run() {
- EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
- "org/apache/cxf/systest/jms/continuations/test.wsdl");
- Object implementor = new HelloWorldWithContinuationsJMS();
- String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
- }
-
-
- public static void main(String[] args) {
- try {
- Server2 s = new Server2();
- s.start();
- } catch (Exception ex) {
- ex.printStackTrace();
- System.exit(-1);
- } finally {
- System.out.println("done!");
- }
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class Server2 extends AbstractBusTestServerBase {
+ public static final String PORT = allocatePort(Server2.class);
+
+ protected void run() {
+ EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+ "org/apache/cxf/systest/jms/continuations/test.wsdl");
+ Object implementor = new HelloWorldWithContinuationsJMS();
+ String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+ Endpoint.publish(address, implementor);
+ }
+
+
+ public static void main(String[] args) {
+ try {
+ Server2 s = new Server2();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java?rev=1133913&r1=1133912&r2=1133913&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java (original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java Thu Jun 9 15:08:22 2011
@@ -1,58 +1,58 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms.continuations;
-
-import javax.xml.ws.Endpoint;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-
-public class Server3 extends AbstractBusTestServerBase {
- public static final String PORT = allocatePort(Server3.class);
-
- private static final String CONFIG_FILE =
- "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
-
- protected void run() {
- SpringBusFactory bf = new SpringBusFactory();
- Bus bus = bf.createBus(CONFIG_FILE);
- BusFactory.setDefaultBus(bus);
- EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus,
- "org/apache/cxf/systest/jms/continuations/test2.wsdl");
- Object implementor = new HelloWorldWithContinuationsJMS2();
- String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
- }
-
-
- public static void main(String[] args) {
- try {
- Server3 s = new Server3();
- s.start();
- } catch (Exception ex) {
- ex.printStackTrace();
- System.exit(-1);
- } finally {
- System.out.println("done!");
- }
- }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.continuations;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class Server3 extends AbstractBusTestServerBase {
+ public static final String PORT = allocatePort(Server3.class);
+
+ private static final String CONFIG_FILE =
+ "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
+
+ protected void run() {
+ SpringBusFactory bf = new SpringBusFactory();
+ Bus bus = bf.createBus(CONFIG_FILE);
+ BusFactory.setDefaultBus(bus);
+ EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus,
+ "org/apache/cxf/systest/jms/continuations/test2.wsdl");
+ Object implementor = new HelloWorldWithContinuationsJMS2();
+ String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+ Endpoint.publish(address, implementor);
+ }
+
+
+ public static void main(String[] args) {
+ try {
+ Server3 s = new Server3();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java
------------------------------------------------------------------------------
svn:keywords = Rev Date