Service Registry 3.1 Developer's Guide

Obtaining and Using a RegistryService Object

After creating the connection, the client uses the connection to obtain a RegistryService object and then the interface or interfaces that the client will use:

RegistryService rs = connection.getRegistryService();
DeclarativeQueryManager bqm = rs.getDeclarativeQueryManager();
BusinessLifeCycleManager blcm = rs.getBusinessLifeCycleManager();

Typically, a client obtains two objects from the RegistryService object: a query manager and a life cycle manager. The query manager is either a DeclarativeQueryManager object or a BusinessQueryManager object; both of these implement the base interface QueryManager. The life cycle manager is a BusinessLifeCycleManager object, which implements the base interface LifeCycleManager. If the client is using the Registry for simple queries only, it might need to obtain only a query manager.

If your program uses implementation-specific features of the Service Registry JAXR provider, you need to use the implementation-specific version of the respective query manager or life cycle manager: BusinessQueryManagerImpl, DeclarativeQueryManagerImpl, or BusinessLifeCycleManagerImpl.