Re: SOLVED: Multi-threading 5.2 WO app as servlet or woapp doesn't work
Re: SOLVED: Multi-threading 5.2 WO app as servlet or woapp doesn't work
- Subject: Re: SOLVED: Multi-threading 5.2 WO app as servlet or woapp doesn't work
- From: Hsu <email@hidden>
- Date: Fri, 14 Mar 2003 07:48:19 -0800
Possibly, you're didn't understand my original post.
I created an app that had 2 pages. One page waited for 5 seconds, the
other didn't. I then demonstrated that with concurrent request handling
enabled through commandline arguments I could hit the first page (and
have it wait), hit and return the second page, then have the first page
return.
This implies that concurrent request handling is in fact working, as
during the second page request, 2 page requests were occurring
simultaneously.
Again, this test fails in the default configuration, and works
correctly if concurrency is enabled through the commandline or through
code.
Karl
On Friday, March 14, 2003, at 05:09 AM, Dov Rosenberg wrote:
The problem we were dealing with was different than your test. Our
issue was that on a data entry form, the user has the option of
uploading a file that gets loaded to a FTP server. While that user was
uploading the file or executing a long running operation, could be
several seconds, all other users were locked out of doing anything.
Other browser sessions were completely blocked. Since we are running
as a servlet, we couldn't run multiple instances of the app and we
didn't have the WO Adaptor to do the load balancing. The problem also
occurred running the app as a WOApp. I'm not sure if the problem was
more related to opening a FTP connection holding up the request
response loop.
It was easy to reproduce - all we needed was 2 separate browser
sessions trying to do different things. The first operation started
and help up all other requests until it completed. Once we hardcoded
the AllowsConcurrentRequestHandling, things started acting properly
again. The properties file or command line setting did not affect the
behavior.
Dov Rosenberg
On Friday, March 14, 2003, at 12:36 AM, Hsu wrote:
I tested on both OSX and Win2K, both on 5.2. Works fine.
Karl
On Wednesday, March 12, 2003, at 11:42 AM, Dov Rosenberg wrote:
I am on Win2K, WO 5.2
Dov Rosenberg
On Wednesday, March 12, 2003, at 02:04 PM, Hsu wrote:
I just tested this, and it appears to work fine.
public WOActionResults longAction() {
System.out.println("START LONG ACTION NOW");
WOResponse aResponse = new WOResponse();
aResponse.setContent("Looooong");
try {
Thread.sleep(5000);
} catch (Exception e) {}
System.out.println("END LONG ACTION NOW");
return aResponse;
}
public WOActionResults shortAction() {
System.out.println("START SHORT ACTION NOW");
WOResponse aResponse = new WOResponse();
aResponse.setContent("Shoooort");
System.out.println("END SHORT ACTION NOW");
return aResponse;
}
MTTest.woa:{58}> ./MTTest -WOAllowsConcurrentRequestHandling YES
...
java -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory="/System"
-DWOLocalRootDirectory="" -DWOUserDirectory="/Objects/MTTest.woa"
-DWOEnvClassPath="" -DWOApplicationClass=Application
-DWOPlatform=MacOS -Dcom.webobjects.pid=22702 -classpath
WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap
-WOAllowsConcurrentRequestHandling YES
Generated classpath:
...
[2003-03-12 10:59:21 PST] <main>
WOAllowsConcurrentRequestHandling=true
...
[2003-03-12 10:59:21 PST] <main> ------------------------
...
Welcome to MTTest!
[2003-03-12 10:59:23 PST] <main> Waiting for requests...
START LONG ACTION NOW
START SHORT ACTION NOW
END SHORT ACTION NOW
END LONG ACTION NOW
curl "http://localhost:55555/cgi-bin/WebObjects/MTTest.woa/wa/long"
& ; sleep 1 ; curl
"http://localhost:55555/cgi-bin/WebObjects/MTTest.woa/wa/short" &
Karl
On Wednesday, March 12, 2003, at 07:50 AM, Dov Rosenberg wrote:
Finally figured out the problem.
It seems that regardless of what is set in the Properties file or
on the URL, the WOAllowsConcurrentRequestHandling does not get set
at runtime. I'm not sure about the other parameters. I added a
method in the Application constructor to explicitly set the
parameter using
setAllowsConcurrentRequestHandling(true);
and everything started working again.
Thanks to everyone for the suggestions. I will submit this as a
bug to Apple.
Dov Rosenberg
Conviveon Corporation
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
--
You are truly human now. You can love, and fear, and forbid things
to be what they are and overact.
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
--
"If you press the backspace key and anything else apart from the
character to the left of the cursor disappearing happens, you're
using a Unix"
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
--
To err is human; to forgive is not company policy.
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.