dims        2002/06/25 06:55:59

  Modified:    java/src/org/apache/axis/utils axisNLS.properties
               java/src/org/apache/axis/transport/http
                        SimpleAxisServer.java
  Log:
  Gump fails in the Security portion of the test as it fails to bind to port. Add a 
re-try mechanism (5 times at 3 seconds interval).
  
  Revision  Changes    Path
  1.15      +2 -1      xml-axis/java/src/org/apache/axis/utils/axisNLS.properties
  
  Index: axisNLS.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- axisNLS.properties        25 Jun 2002 00:13:00 -0000      1.14
  +++ axisNLS.properties        25 Jun 2002 13:55:58 -0000      1.15
  @@ -225,7 +225,7 @@
   gotResponse00=Got response message
   gotType00={0} got type {1}
   gotValue00={0} got value {1}
  -handlerRegistryConfig=Service does not support configuration of a HandlerRegistry 
  +handlerRegistryConfig=Service does not support configuration of a HandlerRegistry
   headers00=headers
   headerPresent=Header already present
   
  @@ -509,6 +509,7 @@
   
   # NOTE:  in reachedServer00, do not translate "SimpleAxisServer"
   reachedServer00=You have reached the SimpleAxisServer.
  +unableToStartServer00=Unable to bind to port {0}. Did not start SimpleAxisServer.
   
   # NOTE:  in reachedServlet00, do not translate "AXIS HTTP Servlet", "URL", "SOAP"
   reachedServlet00=Hi, you have reached the AXIS HTTP Servlet.  Normally you would be 
hitting this URL with a SOAP client rather than a browser.
  
  
  
  1.62      +17 -3     
xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java
  
  Index: SimpleAxisServer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- SimpleAxisServer.java     7 Jun 2002 18:31:58 -0000       1.61
  +++ SimpleAxisServer.java     25 Jun 2002 13:55:58 -0000      1.62
  @@ -235,9 +235,23 @@
   
           try {
               int port = opts.getPort();
  -            ServerSocket ss = new ServerSocket(port);
  -            sas.setServerSocket(ss);
  -            sas.start();
  +            ServerSocket ss = null;
  +            // Try five times
  +            for (int i=0;i<5;i++) {
  +                try {
  +                    ss = new ServerSocket(port);
  +                    break;
  +                } catch (java.net.BindException be){
  +                    // At 3 second intervals.
  +                    Thread.sleep(3000);
  +                }
  +            }
  +            if (ss != null){
  +                sas.setServerSocket(ss);
  +                sas.start();
  +            } else {
  +                throw new 
Exception(JavaUtils.getMessage("unableToStartServer00",Integer.toString(port)));
  +            }
           } catch (Exception e) {
               log.error(JavaUtils.getMessage("exception00"), e);
               return;
  
  
  


Reply via email to