Re: allowsConcurrentRequestHandling, strange behavior
Re: allowsConcurrentRequestHandling, strange behavior
- Subject: Re: allowsConcurrentRequestHandling, strange behavior
- From: Farrukh Ijaz <email@hidden>
- Date: Fri, 22 Oct 2010 19:53:08 +0300
I hope you are trying five different requests from five different absolutely unique browser requests. Then you'll find five different concurrent requests I hope.
Farrukh
Sent from my iPhone
On 2010-10-22, at 7:26 PM, Chuck Hill <email@hidden> wrote:
> 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@hidden
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> 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
>
>
>
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden