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(); LifeCycleManager blcm = rs.getLifeCycleManager();
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. The life cycle manager is either a LifeCycleManager object or a BusinessLifeCycleManager object. If the client is using the Registry for simple queries only, it might need to obtain only a query manager.