You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Scott Nichol <sn...@scottnichol.com> on 2004/01/06 15:03:38 UTC
Re: Request Scope does not invalidate the session at the end of therequest, long-lived sessions hang until timeout causing out-of-sessions error.
What you suggest is a reasonable option.
I will also recommend you consider grabbing a nightly build to use. =
That code supports an option in the deployment descriptor named =
SessionRequired that allows you to disable session creation.
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Max Poon" <ma...@graduate.hku.hk>
To: <sn...@scottnichol.com>; <so...@xml.apache.org>
Sent: Tuesday, January 06, 2004 5:10 AM
Subject: Re: Request Scope does not invalidate the session at the end of therequest, long-lived sessions hang until timeout causing out-of-sessions error.
> Hi Scott and all
>
> I am also deploying applications on top (routed by
> MessageRouterServlet). It seems that, during our stress test, the
> MessageRouterServlet is creating a lot of Session objects and exceeding
> the servlet container's limit.
>
> Since my 'application' can just run within the request and does not need
> to use Session, is it advisable to just use a 'customized'
> MessageRouterServlet (and called it some other name) for my application
> with the Session creation statements commented out in the doPost()
> method so that no more Session objects created (i.e. codes as follow),
> any side effects for this or is there better means?
>
> ..............
> ..............
>
> public void doPost (HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException
> {
> ServletConfig config = getServletConfig();
> ServletContext context = config.getServletContext ();
> // HttpSession session = req.getSession ();
> ServiceManager serviceManager =
> ServerHTTPUtils.getServiceManagerFromContext (context,
> configFilename);
> int status;
> DeploymentDescriptor dd = null;
> TransportMessage sres;
>
> SOAPContext reqCtx = new SOAPContext() ;
> SOAPContext resCtx = new SOAPContext() ;
>
> reqCtx.setClassLoader( ServerHTTPUtils.
> getServletClassLoaderFromContext(context) );
>
> try {
> try {
> reqCtx.setProperty( Constants.BAG_HTTPSERVLET, this );
> // reqCtx.setProperty( Constants.BAG_HTTPSESSION, session );
> reqCtx.setProperty( Constants.BAG_HTTPSERVLETREQUEST, req );
> reqCtx.setProperty( Constants.BAG_HTTPSERVLETRESPONSE, res );
> ..............
> ..............
>
>
> Thanks
> Max
>
>
>
>
>