Book Home Java Enterprise in a Nutshell Search this book

11.6. Concurrency Control Service

The Concurrency Control Service defines a framework for managing concurrent access to remote objects from multiple clients. It is analogous to the multithreading support present in some programming languages, such as C++ and Java, but in a distributed context. The Concurrency Control Service provides facilities for interfacing with the Transaction Service to allow transactional clients to participate in concurrent access to resources from within transaction contexts.

The Concurrency Control Service uses a model based on locks that are acquired by clients for defined resources. Locks can be of different types (read, write, etc.), and different locking models can be specified, such as multiple-possession, two-phase locks, etc. Clients that attempt to acquire a lock on a resource and are refused because of conflicts with existing locks are queued on a first-come, first-serve basis.

Resources are implicitly represented by the LockSet interface, which request and relinquish locks on resources. The TransactionalLockSet is an equivalent interface for transactional clients. Lock sets are created using the LockSetFactory interface.

The transaction-related interfaces in this service depend on Transaction Service interfaces.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.

This HTML Help has been published using the chm2web software.