Author: ningjiang
Date: Tue Feb  3 01:49:05 2009
New Revision: 740186

URL: http://svn.apache.org/viewvc?rev=740186&view=rev
Log:
CXF-2019 try to fix the ClientServerSessionTest server start error on *nix boxes

Added:
    
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
   (with props)
Modified:
    
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/SessionServer.java
    
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml

Modified: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/SessionServer.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/SessionServer.java?rev=740186&r1=740185&r2=740186&view=diff
==============================================================================
--- 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/SessionServer.java 
(original)
+++ 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/SessionServer.java 
Tue Feb  3 01:49:05 2009
@@ -33,8 +33,12 @@
     protected void run() {
         Object implementor;
         String address;
+        String configurationFile = "resources/SessionServer.xml";
+        if (System.getProperty("os.name").startsWith("Windows")) {
+            configurationFile = "resources/SessionServer_Windows.xml";
+        }
         URL configure =
-            SessionServer.class.getResource("resources/SessionServer.xml");
+            SessionServer.class.getResource(configurationFile);
         System.out.println("the configure is " + configure);
         Bus bus = new SpringBusFactory().createBus(configure, true);
         SpringBusFactory.setDefaultBus(bus);

Modified: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml?rev=740186&r1=740185&r2=740186&view=diff
==============================================================================
--- 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
 (original)
+++ 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
 Tue Feb  3 01:49:05 2009
@@ -35,10 +35,7 @@
               
   <httpj:engine-factory bus="cxf">
         <httpj:engine port="9020">
-            <httpj:sessionSupport>true</httpj:sessionSupport>
-            <!-- If the reuseAddress is true and running in a Windows box, 
-            Jetty will not throw the java.net.BindException even the port is 
already used  -->
-            <httpj:reuseAddress>false</httpj:reuseAddress>
+            <httpj:sessionSupport>true</httpj:sessionSupport>      
          </httpj:engine>
    </httpj:engine-factory>  
 </beans>
\ No newline at end of file

Added: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml?rev=740186&view=auto
==============================================================================
--- 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
 (added)
+++ 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
 Tue Feb  3 01:49:05 2009
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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: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://java.sun.com/xml/ns/jaxws";
+  xsi:schemaLocation="
+                  http://cxf.apache.org/configuration/security
+                     http://cxf.apache.org/schemas/configuration/security.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-2.0.xsd";>
+              
+  <httpj:engine-factory bus="cxf">
+        <httpj:engine port="9020">
+            <httpj:sessionSupport>true</httpj:sessionSupport>
+            <!-- If the reuseAddress is true and running in a Windows box, 
+            Jetty will not throw the java.net.BindException even the port is 
already used  -->
+            <httpj:reuseAddress>false</httpj:reuseAddress>
+         </httpj:engine>
+   </httpj:engine-factory>  
+</beans>
\ No newline at end of file

Propchange: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml


Reply via email to