Re: multithreading and stateless components
Re: multithreading and stateless components
- Subject: Re: multithreading and stateless components
- From: Max Muller <email@hidden>
- Date: Thu, 30 Oct 2003 13:53:54 -0800
Incidentally this is not the case with dynamic elements which must be
thread safe as they can be used by multiple threads at the same time.
Regards,
Max
On Oct 30, 2003, at 8:26 AM, email@hidden wrote:
[demime could not interpret encoding binary - treating as plain text]
On Thu, 30 Oct 2003 15:57:02 +0100 David Teran wrote:
Hi,
lets assume we have a stateless component which has, afaik, only one
instance for the whole application. Is it possible that one thread
calls appendToResponse and while this component still 'appends' another
thread calls appendToResponse, too?
It is not supposed to be possible, no. Your mistake is assuming that
there is always only one instance of a stateless component at a time.
From WOComponent reference documentation:
"If a stateless component is needed simultaneously in separate threads,
additional instances of the component are created (and later discarded)
as necessary to prevent conflicts. Thus, the number of threads in which
a
component could be used determines the maximum number of instances of a
stateless component that may be allocated at any given time."
http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/appserver/WOComponent.html
So if it is happening, it's a bug.
regards David
[demime 0.98b removed an attachment of type text/directory which had
a name of David Teran.vcf]
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.