The NPE you are experiencing definitely qualifies as a bug and should be fixed.
IMO, the out-of-sessions error is a configuration problem for you. Apache SOAP always creates sessions. You can minimize the number of sessions created by re-using a single SOAPHTTPConnection across multiple calls, so that the session will remain active, and the server will not create a new session for every call. Your method of invalidating the session works for you, but it is not good in general for Apache SOAP users. For one thing, it is quite possible to make a mixture of application, session and request scope calls on a single SOAPHTTPConnection. Invalidating the session for each request scope call would cause a new session to be created for a subsequent session scope call. Additionally, it is still possible for a scope level service to use the session to store state. The scope merely controls the instantiation and synchronization of the service class. Sessions still exist within the servlet container, and the service class is free to use them. The timing of your e-mail is good, however, as I was noticing the overhead of session creation on various servlet containers, and have been thinking about a means to optionally suppress session creation for a service. I may post a change related to this within the next couple of days. Scott Nichol ----- Original Message ----- From: "Pradhan, Chirag" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 30, 2002 5:58 PM Subject: Request Scope does not invalidate the session at the end of the request, long-lived sessions hang until timeout causing out-of-sessions error. > We did a test using Apache SOAP and Tomcat server. > > We set the session timeout to 15 minutes. > We set number of sessions to 10 > We set the scope of the deployed service to "Request" > > We ran a client connecting 20 times and got "Null pointer" exceptions after > the 10th call. The log indicted that we had run out of sessions. > > When we looked in the code, we saw that the session is never invalidated > after the request completes (it should be invalidated in a finally block). > This gives the effect of "Request" scope hanging around until the session > times out. Since the apps set with "Request" scope can't be accesses, you > have dead sessions hanging around until the session times out. > > We have modified the RPCRouterServlet class to invalidate session if the > scope is "Request". When testing this by looking at the SOAP sessions from > the manager/list servlet, the sessions no longer consumes all available > sessions. > > Can a developer validate this assumption? Also, if it is an error, when > might the code be patched and released. Is anyone else having this problem? > And is this the right place to submit a bug/code change?? > > See attached code. > > <<RPCRouterServlet.java>> > > ---------------------------------------------------------------------------- ---- > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>