try {
if(haveRegistration(provisionManager)) {
logger.trace("Already registered to {}", provisionManager);
return;
}
ProvisionManager provisioner = (ProvisionManager)provisionerPreparer.prepareProxy(provisionManager);
logger.trace("ServiceConsumer - prepared ProvisionManager proxy: {}", provisioner.toString());
ResourceCapability rCap = adapter.getResourceCapability();
logger.trace("ResourceCapability {}", rCap);
Lease lease = connect(provisioner);
if(lease==null) {
logger.warn("Unable to register to ProvisionManager {}", provisioner.toString());
return;
}
leaseTable.put(provisioner, new ProvisionLeaseManager(lease, provisioner, serviceID));
logger.info("Registered to a ProvisionManager, now connected to [{}] ProvisionMonitor instances",
provisionerMap.size());