axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/transport/local LocalDispatchHandler.java
Date Tue, 12 Jun 2001 11:07:38 GMT
rubys       01/06/12 04:07:38

  Modified:    java/src/org/apache/axis/transport/local
                        LocalDispatchHandler.java
  Log:
  Try to make this threadsafe...
  
  Revision  Changes    Path
  1.2       +6 -9      xml-axis/java/src/org/apache/axis/transport/local/LocalDispatchHandler.java
  
  Index: LocalDispatchHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/local/LocalDispatchHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalDispatchHandler.java	2001/06/11 20:23:48	1.1
  +++ LocalDispatchHandler.java	2001/06/12 11:07:35	1.2
  @@ -68,16 +68,15 @@
    */
   public class LocalDispatchHandler extends BasicHandler {
   
  -  private AxisServer server;
  -  private MessageContext serverContext;
  +  private volatile AxisServer server;
   
     /**
      * Allocate an embedded Axis server to process requests and initialize it.
      */
  -  public void init() {
  -    server = new AxisServer();
  +  public synchronized void init() {
  +    AxisServer server = new AxisServer();
       server.init();
  -    serverContext = new MessageContext(server);
  +    this.server=server;
     }
   
     public void invoke(MessageContext clientContext) throws AxisFault {
  @@ -87,10 +86,8 @@
       // something that can be relied on.  Oh, well...
       if (server == null) init();
       
  -    // reset the request
  -    serverContext.clearProperties();
  -    serverContext.setServiceDescription(null);
  -    serverContext.setTargetService(null);
  +    // Define a new messageContext per request
  +    MessageContext serverContext = new MessageContext(server);
   
       // copy the request, and force its format to String in order to
       // exercise the serializers.
  
  
  

Mime
View raw message