You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/04/03 12:11:38 UTC

[1/2] cxf git commit: Adding WebClient Failover test

Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes d5a9d4cf4 -> 48c7e42bc


Adding WebClient Failover test


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/40ffec36
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/40ffec36
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/40ffec36

Branch: refs/heads/3.1.x-fixes
Commit: 40ffec36812a804ab87142153bcc5d3fa0c7d841
Parents: d5a9d4c
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Mar 31 12:52:41 2017 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Mon Apr 3 13:11:21 2017 +0100

----------------------------------------------------------------------
 .../jaxrs/failover/FailoverBookServer.java      | 43 ++++++++++
 .../jaxrs/failover/FailoverBookStore.java       | 47 +++++++++++
 .../jaxrs/failover/FailoverWebClientTest.java   | 83 ++++++++++++++++++++
 .../cxf/systest/jaxrs/failover/cxf-service.xml  | 75 ++++++++++++++++++
 4 files changed, 248 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/40ffec36/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookServer.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookServer.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookServer.java
new file mode 100644
index 0000000..34e99b3
--- /dev/null
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookServer.java
@@ -0,0 +1,43 @@
+/**
+ * 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.jaxrs.failover;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class FailoverBookServer extends AbstractBusTestServerBase {
+    protected void run()  {
+        URL busFile = Server.class.getResource("cxf-service.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new Server();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/40ffec36/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookStore.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookStore.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookStore.java
new file mode 100644
index 0000000..29b5432
--- /dev/null
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverBookStore.java
@@ -0,0 +1,47 @@
+/**
+ * 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.jaxrs.failover;
+
+
+import javax.ws.rs.GET;
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.Path;
+
+import org.apache.cxf.systest.jaxrs.Book;
+
+/**
+ * Just allow one invocation + then return 404
+ */
+@Path("/bookstore")
+public class FailoverBookStore {
+
+    private int counter;
+
+    @GET
+    @Path("/")
+    public Book getBookRoot() {
+        if (counter != 0) {
+            throw new NotFoundException();
+        }
+        counter++;
+        return new Book("root", 124L);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/40ffec36/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java
new file mode 100644
index 0000000..eb7269f
--- /dev/null
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java
@@ -0,0 +1,83 @@
+/**
+ * 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.jaxrs.failover;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.cxf.clustering.FailoverFeature;
+import org.apache.cxf.clustering.SequentialStrategy;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
+import org.apache.cxf.systest.jaxrs.Book;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * A test for failover using a WebClient object
+ */
+public class FailoverWebClientTest extends AbstractBusClientServerTestBase {
+    static final String PORT1 = allocatePort(FailoverBookServer.class);
+    static final String PORT2 = allocatePort(FailoverBookServer.class, 2);
+    static final String PORT3 = allocatePort(FailoverBookServer.class, 3);
+
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        AbstractResourceInfo.clearAllMaps();
+        assertTrue("server did not launch correctly",
+                   launchServer(FailoverBookServer.class, true));
+        createStaticBus();
+    }
+
+    @Test
+    public void testEchoXmlBookQuery() throws Exception {
+        String address = "http://localhost:" + PORT1 + "/bookstore";
+
+        FailoverFeature failoverFeature = new FailoverFeature();
+        SequentialStrategy strategy = new SequentialStrategy();
+        List<String> addresses = new ArrayList<>();
+        addresses.add("http://localhost:" + PORT2 + "/bookstore");
+        addresses.add("http://localhost:" + PORT3 + "/bookstore");
+        strategy.setAlternateAddresses(addresses);
+        failoverFeature.setStrategy(strategy);
+
+        WebClient webClient = WebClient.create(address, null,
+                                               Collections.singletonList(failoverFeature),
+                                               null).accept("application/xml");
+        // Should hit PORT1
+        Book b = webClient.get(Book.class);
+        assertEquals(124L, b.getId());
+        assertEquals("root", b.getName());
+
+        // Should failover to PORT2
+        webClient.get(Book.class);
+        assertEquals(124L, b.getId());
+        assertEquals("root", b.getName());
+
+        // Should failover to PORT3
+        webClient.get(Book.class);
+        assertEquals(124L, b.getId());
+        assertEquals("root", b.getName());
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/40ffec36/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-service.xml
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-service.xml b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-service.xml
new file mode 100644
index 0000000..f0f5747
--- /dev/null
+++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-service.xml
@@ -0,0 +1,75 @@
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:cxf="http://cxf.apache.org/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:sec="http://cxf.apache.org/configuration/security"
+  xmlns:http="http://cxf.apache.org/transports/http/configuration"
+  xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+  xmlns:jaxws="http://cxf.apache.org/jaxws"
+  xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+  xsi:schemaLocation="
+            http://cxf.apache.org/core
+            http://cxf.apache.org/schemas/core.xsd
+            http://cxf.apache.org/configuration/security
+            http://cxf.apache.org/schemas/configuration/security.xsd
+            http://cxf.apache.org/jaxws
+            http://cxf.apache.org/schemas/jaxws.xsd
+            http://cxf.apache.org/jaxrs
+            http://cxf.apache.org/schemas/jaxrs.xsd
+            http://cxf.apache.org/transports/http/configuration
+            http://cxf.apache.org/schemas/configuration/http-conf.xsd
+            http://cxf.apache.org/transports/http-jetty/configuration
+            http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+            http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+   
+   <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+   </cxf:bus>
+   
+   <bean id="serviceBean1" class="org.apache.cxf.systest.jaxrs.failover.FailoverBookStore"/>
+   
+   <jaxrs:server address="http://localhost:${testutil.ports.FailoverBookServer}/">
+       <jaxrs:serviceBeans>
+          <ref bean="serviceBean1"/>
+       </jaxrs:serviceBeans>
+   </jaxrs:server>
+   
+   <bean id="serviceBean2" class="org.apache.cxf.systest.jaxrs.failover.FailoverBookStore"/>
+   
+   <jaxrs:server address="http://localhost:${testutil.ports.FailoverBookServer.2}/">
+       <jaxrs:serviceBeans>
+          <ref bean="serviceBean2"/>
+       </jaxrs:serviceBeans>
+   </jaxrs:server>
+   
+   <bean id="serviceBean3" class="org.apache.cxf.systest.jaxrs.failover.FailoverBookStore"/>
+   
+   <jaxrs:server address="http://localhost:${testutil.ports.FailoverBookServer.3}/">
+       <jaxrs:serviceBeans>
+          <ref bean="serviceBean3"/>
+       </jaxrs:serviceBeans>
+   </jaxrs:server>
+  
+</beans>


[2/2] cxf git commit: Adding JAX-RS LB test

Posted by se...@apache.org.
Adding JAX-RS LB test


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/48c7e42b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/48c7e42b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/48c7e42b

Branch: refs/heads/3.1.x-fixes
Commit: 48c7e42bcb066d37a8de3fe698593528cf5938a3
Parents: 40ffec3
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Mar 31 15:07:09 2017 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Mon Apr 3 13:11:22 2017 +0100

----------------------------------------------------------------------
 .../jaxrs/failover/FailoverWebClientTest.java   |  2 +-
 .../jaxrs/failover/LoadDistributorServer.java   | 43 +++++++++++
 .../failover/LoadDistributorWebClientTest.java  | 80 ++++++++++++++++++++
 .../cxf/systest/jaxrs/failover/cxf-client.xml   | 43 +++++++++++
 .../systest/jaxrs/failover/cxf-lb-service.xml   | 65 ++++++++++++++++
 5 files changed, 232 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/48c7e42b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java
index eb7269f..f77a429 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverWebClientTest.java
@@ -50,7 +50,7 @@ public class FailoverWebClientTest extends AbstractBusClientServerTestBase {
     }
 
     @Test
-    public void testEchoXmlBookQuery() throws Exception {
+    public void testFailover() throws Exception {
         String address = "http://localhost:" + PORT1 + "/bookstore";
 
         FailoverFeature failoverFeature = new FailoverFeature();

http://git-wip-us.apache.org/repos/asf/cxf/blob/48c7e42b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorServer.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorServer.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorServer.java
new file mode 100644
index 0000000..99a7436
--- /dev/null
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorServer.java
@@ -0,0 +1,43 @@
+/**
+ * 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.jaxrs.failover;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class LoadDistributorServer extends AbstractBusTestServerBase {
+    protected void run()  {
+        URL busFile = Server.class.getResource("cxf-lb-service.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new Server();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/48c7e42b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorWebClientTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorWebClientTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorWebClientTest.java
new file mode 100644
index 0000000..03ce218
--- /dev/null
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/LoadDistributorWebClientTest.java
@@ -0,0 +1,80 @@
+/**
+ * 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.jaxrs.failover;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.cxf.clustering.LoadDistributorFeature;
+import org.apache.cxf.clustering.SequentialStrategy;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
+import org.apache.cxf.systest.jaxrs.Book;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * A test for the load distributor using a WebClient object
+ */
+public class LoadDistributorWebClientTest extends AbstractBusClientServerTestBase {
+    static final String PORT1 = allocatePort(LoadDistributorServer.class);
+    static final String PORT2 = allocatePort(LoadDistributorServer.class, 2);
+
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        AbstractResourceInfo.clearAllMaps();
+        assertTrue("server did not launch correctly",
+                   launchServer(LoadDistributorServer.class, true));
+        createStaticBus();
+    }
+
+    @Test
+    public void testLoadDistributor() throws Exception {
+        URL busFile = LoadDistributorWebClientTest.class.getResource("cxf-client.xml");
+
+        String address = "http://localhost:" + PORT1 + "/bookstore";
+
+        LoadDistributorFeature feature = new LoadDistributorFeature();
+        SequentialStrategy strategy = new SequentialStrategy();
+        List<String> addresses = new ArrayList<>();
+        addresses.add(address);
+        addresses.add("http://localhost:" + PORT2 + "/bookstore");
+        strategy.setAlternateAddresses(addresses);
+        feature.setStrategy(strategy);
+
+        WebClient webClient = WebClient.create(address, null,
+                                               Collections.singletonList(feature),
+                                               busFile.toString()).accept("application/xml");
+
+        Book b = webClient.get(Book.class);
+        assertEquals(124L, b.getId());
+        assertEquals("root", b.getName());
+
+        b = webClient.get(Book.class);
+        assertEquals(124L, b.getId());
+        assertEquals("root", b.getName());
+
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/48c7e42b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-client.xml
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-client.xml b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-client.xml
new file mode 100644
index 0000000..89d1245
--- /dev/null
+++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-client.xml
@@ -0,0 +1,43 @@
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xmlns:jaxrs="http://cxf.apache.org/jaxrs-client"
+   xmlns:cxf="http://cxf.apache.org/core"
+   xmlns:http="http://cxf.apache.org/transports/http/configuration"
+   xmlns:sec="http://cxf.apache.org/configuration/security"
+   xmlns:clustering="http://cxf.apache.org/clustering"
+   xmlns:util="http://www.springframework.org/schema/util"
+   xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/jaxrs-client http://cxf.apache.org/schemas/jaxrs-client.xsd
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
+http://cxf.apache.org/clustering http://cxf.apache.org/schemas/clustering.xsd
+http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    
+</beans>
+

http://git-wip-us.apache.org/repos/asf/cxf/blob/48c7e42b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-lb-service.xml
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-lb-service.xml b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-lb-service.xml
new file mode 100644
index 0000000..f16dd36
--- /dev/null
+++ b/systests/jaxrs/src/test/resources/org/apache/cxf/systest/jaxrs/failover/cxf-lb-service.xml
@@ -0,0 +1,65 @@
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:cxf="http://cxf.apache.org/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:sec="http://cxf.apache.org/configuration/security"
+  xmlns:http="http://cxf.apache.org/transports/http/configuration"
+  xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+  xmlns:jaxws="http://cxf.apache.org/jaxws"
+  xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+  xsi:schemaLocation="
+            http://cxf.apache.org/core
+            http://cxf.apache.org/schemas/core.xsd
+            http://cxf.apache.org/configuration/security
+            http://cxf.apache.org/schemas/configuration/security.xsd
+            http://cxf.apache.org/jaxws
+            http://cxf.apache.org/schemas/jaxws.xsd
+            http://cxf.apache.org/jaxrs
+            http://cxf.apache.org/schemas/jaxrs.xsd
+            http://cxf.apache.org/transports/http/configuration
+            http://cxf.apache.org/schemas/configuration/http-conf.xsd
+            http://cxf.apache.org/transports/http-jetty/configuration
+            http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+            http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+   
+   <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+   </cxf:bus>
+   
+   <bean id="serviceBean" class="org.apache.cxf.systest.jaxrs.BookStore"/>
+   
+   <jaxrs:server address="http://localhost:${testutil.ports.LoadDistributorServer}/">
+       <jaxrs:serviceBeans>
+          <ref bean="serviceBean"/>
+       </jaxrs:serviceBeans>
+   </jaxrs:server>
+   
+   <jaxrs:server address="http://localhost:${testutil.ports.LoadDistributorServer.2}/">
+       <jaxrs:serviceBeans>
+          <ref bean="serviceBean"/>
+       </jaxrs:serviceBeans>
+   </jaxrs:server>
+   
+</beans>