CCA Registry Service

[1] Initially binding and lookup were public methods in the RegistryService API. While this scheme was simple and easy to understand, it prevented concurrent use of the service. This is because bind and lookup calls are made relative to a specific context. Two components using the same registry service simultaneously might wish to have different registry contexts (i.e. different physical servers which store registry data). One way to enable this would be to have each user of the service pass the context as a parameter with each bind or lookup call. This solved the problem, but was cumbersome and somewhat untidy. Looking at the JNDI API gave us the idea of using a different registry context for each user of the registry service. Once the context is obtained, the user of the service would make all calls through the context. This would allow the same component to have different registry contexts, as well as allow different components use of the registry service simultaneously.

[2] Most other APIs for registry services (e.g. the API for the Java RMI registry) do not allow users to bind information using a name that has already been used. In RMI, the user needs to use an explicit rebind call to overwrite the existing information under that name. This keeps the API simple - lookup returns a single instance bound under that name, if any. The drawback of the scheme is that code using the registry is often littered with an attempt to bind, followed by a block which catches the exception thrown if the name was used and tries to rebind or just warns the user that the bind failed. The alternative to this is what we did: allowing multiple binds under a single name. The registry internally generates a unique name for each instance. When a lookup is done, all instances bound under that name are possible matches, so the user gets an array as the return value from lookup.

[3] Why do we have two forms of the bind call?
There are two ways using which a user can hold of a handle to an instance (i.e. a ComponentID for it):

So we have two forms of bind, one for a user who created the instance and wants to bind it and the other for the user who got the instance form a registry and wants to bind it (somewhere else).

Last modified: Tue Mar 14 11:29:12 EST 2000