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: Dov Rosenberg <email@hidden>
- Date: Wed, 12 Mar 2003 14:42:45 -0500
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
_______________________________________________
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.