No, I can't think  of a logical explanation.

Chuck

On Oct 22, 2010, at 1:52 AM, Atli Páll Hafsteinsson wrote:

> Hi all
> 
> I am experiencing strange behavior when enabling concurrent request
> handling in my app, if the requests com to a direct action only one
> request is handle at a time and if they come to a component they seem
> to be handled in batches, the first request blocks every other but the
> after that has finished the app handles other requests concurrently.
> Made a small app to test this with the following code:
> 
> try {
>                       System.out.println( "Putting to sleep: " +
> Thread.currentThread().getName() );
>                       Thread.currentThread().sleep( 20000 );
>                       System.out.println( "Waking up: " + 
> Thread.currentThread().getName() );
>               }
>               catch( Exception e ) {
>                       System.out.println( "Forced to catch the Exception, 
> 'cause Java is stupid" );
>               }
> 
> When 4 request are done almost at the same time to a direct action it
> prints out:
> 
> Putting to sleep: WorkerThread0
> Waking up: WorkerThread0
> Putting to sleep: WorkerThread0
> Waking up: WorkerThread0
> Putting to sleep: WorkerThread0
> Waking up: WorkerThread0
> Putting to sleep: WorkerThread0
> Waking up: WorkerThread0
> 
> The requests are ran one at a time.
> 
> 
> But when the code is in a component it prints out:
> 
> Putting to sleep: WorkerThread0
> Waking up: WorkerThread0
> Putting to sleep: WorkerThread15
> Putting to sleep: WorkerThread0
> Putting to sleep: WorkerThread14
> Waking up: WorkerThread15
> Waking up: WorkerThread0
> Waking up: WorkerThread14
> 
> That is the first request blocks all others but after that the
> remaining 3 are ran at the same time.
> 
> Have set WOAllowsConcurrentRequestHandling=true and overridden
> allowsConcurrentRequestHandling() in Application to return true.
> 
> Any logical explanation?
> 
> Using:
> Eclipse 3.6
> Wolips 3.6.6210
> Latest wonder from the build server
> WebObjects version = 5.4.3
> java.vm.name=Java HotSpot(TM) 64-Bit Server VM
> java.vm.version=16.3-b01-279
> 
> Atli Páll Hafsteinsson
> [email protected]
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to [email protected]

-- 
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/products/practical_webobjects







Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to