PATH  WebObjects 4.0 Documentation > What's New in WebObjects 4.0

Table of Contents Previous Section

New Methods to Support Multithreading

To support the writing of multithreaded applications, the following methods have been added to the following classes:
WOApplication
Method Description
adaptorsDispatchRequestsConcurrently Returns YES or true if at least one adaptor contains multiple threads and will attempt to concurrently invoke the request handlers.
allowsConcurrentRequestHandling Specifies whether the application has been written to be able to safely handle concurrent requests. By default, returns NO or false. Subclasses should override to return YES or true if the application is written to be thread-safe.
isConcurrentRequestHandlingEnabled Returns YES or true if the application can handle concurrent requests and the adaptor will dispatch requests to the application concurrently.
lockRequestHandling Serializes request handler access through the use of an internal lock if concurrent request handling is disabled. Request handlers should invoke this method before calling into application code.
unlockRequestHandling Removes the request handling internal lock to allow access to the request handler again.
lock Locks access to the WOApplication object.
unlock Unlocks access to the WOApplication object.
WORequestHandler
Method Description
lock Locks access to the WORequestHandler object
unlock Unlocks access to the WORequestHandler object
WOResourceManager
Method Description
lock Locks access to the WOResourceManager object.
unlock Unlocks access to the WOResourceManager object.
WOSessionStore
Method Description
checkOutSessionWithSessionID:request: (checkOutSessionWithSessionID in Java) Checks out a session for exclusive use. When you check a session out, all other access to that session is blocked until the session is checked in again.
checkInSessionForContext: Checks in a session.
WOStatisticsStore
Method Description
lock Locks access to the WOStatisticsStore object.
unlock Unlocks access to the WOStatisticsStore object.

Table of Contents Next Section