I have just checked in some code to address both the NPE and the need to be able to specify that sessions should not be created for a service. To suppress session creation for your service, add an element
<isd:option key="SessionRequired" value="false/> as a child to the <isd:provider> in your deployment descriptor. For example, the deployment descriptor for the addressbook sample would be <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:AddressFetcher"> <isd:provider type="java" scope="Application" methods="getAddressFromName addEntry getAllListings putListings"> <isd:java class="samples.addressbook.AddressBook" static="false"/> <isd:option key="SessionRequired" value="false"/> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListene r> <isd:mappings> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="urn:xml-soap-address-demo" qname="x:address" javaType="samples.addressbook.Address" java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer" xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:x="urn:xml-soap-address-demo" qname="x:phone" javaType="samples.addressbook.PhoneNumber" java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer" xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/> </isd:mappings> </isd:service> To use this capability, of course, you need to get the latest source from CVS or grab a new nightly build. 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]>