I have not had the same experience as you. To make sure that I was not crazy I just built a simple test service. I deployed the service with application scope. I am using Tomcat 4.0.1. The service has 2 methods, sleep and sayHello. The sleep method calls Thread.sleep( 30000 ) so it is sleeping for 30 seconds. The sayHello method simply returns "Hello " + the parameter passed into it. I spawned 2 TCL consoles and used the TCLSoap package to call the service; one client called the sleep method at time 0 and the second called the sayHello method at time 1. The sayHello method returns immediately with the expected results and the sleep method returns after 30 seconds. This is essentially what you are trying to do correct? The only thing that I can think of is maybe the difference in tomcat versions is a problem. Also are any of your methods specified as synchronized? I have never tried that but I imagine that could lock the object until the first method returns.
Jared -----Original Message----- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 11, 2001 4:10 PM To: [EMAIL PROTECTED] Subject: Is Apache SOAP a turnstile? I fear my desire to implement an apache SOAP solution may be crushed. Can someone please confirm that I am missing something obvious? The scenerio we have is certainly not uncommon, Kick off a soap request at time 0. This request takes a long time to process and return it's result, approximately 20 seconds. Kick off a second soap request at time 1 to a different soap service, (which normally has sub second response), and is handled by the same rpcrouter. The second request is not handled until the response from the first request has been returned. __Is this by design, or is it a known limitation of Apache Soap... or better yet is there a work around?__ To test this scenario I've deployed the following code (both as Session and Request scope) using Tomcat 3.3 and Allaire Jrun 3.1 as the servlet engine. My constants in this experiment are the stockquote and addressbook examples that come with Apache SOAP 2.2. The addressbook example is held back by about 20 seconds (the length of the sleep method) when fired right after SearchQuoteService. If this is the best SOAP can offer, then it is limited in it's application. I'd really appreciate it if someone could shed some light on this. Thanks, Dave Here's the test code. DeploymentDescriptor.xml <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:search-quotes"> <isd:provider type="java" scope="Session" methods="getSearchQuote"> <isd:java class="search.SearchQuoteService"/> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis tener> </isd:service> SearchQuoteService.java, Stripped down version of StockQuoteService.java package search; import java.io.*; import org.w3c.dom.*; import org.xml.sax.*; import javax.xml.parsers.*; import org.apache.soap.util.xml.*; /** * @author Original author Sanjiva Weerawarana ([EMAIL PROTECTED]) */ public class SearchQuoteService { public float getSearchQuote (String symbol) throws Exception { String quoteStr = symbol; System.out.println("startSleep"); java.lang.Thread.sleep(20000); System.out.println("EndSleep"); try { return Float.valueOf (quoteStr).floatValue (); } catch (NumberFormatException e1) { // mebbe its an int? try { return Integer.valueOf (quoteStr).intValue () * 1.0F; } catch (NumberFormatException e2) { return -1.0F; } } } }
