axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: svn commit: r479513 - /webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Date Mon, 27 Nov 2006 05:09:04 GMT
Just after that point, the input stream is closed by tomcat, so the
xmlstreamreader is useless anyways. It just hangs around to be gc'ed
and holds onto internal memory buffers in woodstox which otherwise can
get reused for the next request...Does this help in deciding to keep
the code as-is?

thanks,
dims

On 11/26/06, Sanjiva Weerawarana <sanjiva@opensource.lk> wrote:
> I'd rather keep the default the old way .. isn't that safer?? if someone
> wants the extra boost we can say to do this.
>
> Sanjiva.
>
> On Mon, 2006-11-27 at 04:28 +0000, dims@apache.org wrote:
> > Author: dims
> > Date: Sun Nov 26 20:28:34 2006
> > New Revision: 479513
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=479513
> > Log:
> > Part of fix for  AXIS2-1769 - close the xmlstreamreader, add a servlet init param
option to switch it off if someone runs into trouble (to get back old behavior). "
> >
> > Modified:
> >     webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
> >
> > Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
> > URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java?view=diff&rev=479513&r1=479512&r2=479513
> > ==============================================================================
> > --- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
(original)
> > +++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Sun Nov 26 20:28:34 2006
> > @@ -39,6 +39,7 @@
> >  import org.apache.axis2.util.UUIDGenerator;
> >  import org.apache.commons.logging.Log;
> >  import org.apache.commons.logging.LogFactory;
> > +import org.apache.axiom.om.impl.builder.StAXBuilder;
> >
> >  import javax.servlet.ServletConfig;
> >  import javax.servlet.ServletException;
> > @@ -291,6 +292,19 @@
> >                  } else {
> >                      throw new ServletException(t);
> >                  }
> > +            }
> > +        }
> > +        boolean closeReader = true;
> > +        String closeReaderParameter = servletConfig.getInitParameter("axis2.close.reader");
> > +        if (closeReaderParameter != null) {
> > +            closeReaderParameter = closeReaderParameter.trim();
> > +            closeReader = JavaUtils.isTrue(closeReaderParameter);
> > +        }
> > +        if(closeReader){
> > +            try {
> > +                ((StAXBuilder)msgContext.getEnvelope().getBuilder()).close();
> > +            } catch (Exception e){
> > +                log.debug(e);
> >              }
> >          }
> >      }
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-cvs-help@ws.apache.org
> >
> --
> Sanjiva Weerawarana, Ph.D.
> Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> Director; Open Source Initiative; http://www.opensource.org/
> Member; Apache Software Foundation; http://www.apache.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message