axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/server AxisServer.java
Date Fri, 19 Apr 2002 17:44:54 GMT
dug         02/04/19 10:44:53

  Modified:    java/src/org/apache/axis/server AxisServer.java
  Log:
  Make sure we set the msgContext during the generation of WSDL.
  This becomes a problem when people try to get to the msgContext
  during the contructor of their service.
  
  Revision  Changes    Path
  1.65      +9 -0      xml-axis/java/src/org/apache/axis/server/AxisServer.java
  
  Index: AxisServer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/AxisServer.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- AxisServer.java	11 Mar 2002 22:15:55 -0000	1.64
  +++ AxisServer.java	19 Apr 2002 17:44:53 -0000	1.65
  @@ -335,7 +335,13 @@
           String  hName = null ;
           Handler h     = null ;
   
  +        // save previous context
  +        MessageContext previousContext = getCurrentMessageContext();
  +
           try {
  +            // set active context
  +            setCurrentMessageContext(msgContext);
  +
               hName = msgContext.getStrProp( MessageContext.ENGINE_HANDLER );
               if ( hName != null ) {
                   if ( (h = getHandler(hName)) == null ) {
  @@ -457,6 +463,9 @@
           } catch(Exception e) {
               // Should we even bother catching it ?
               throw AxisFault.makeFault(e);
  +        } finally {
  +            // restore previous state
  +            setCurrentMessageContext(previousContext);
           }
   
           if (log.isDebugEnabled()) {
  
  
  

Mime
View raw message