final MarshalledObject handback,
final ResourceCapability resourceCapability,
final List<DeployedService> deployedServices,
final int serviceLimit,
final long duration) throws LeaseDeniedException, RemoteException {
ServiceBeanInstantiator instantiator;
try {
instantiator = sbi.get();
} catch (IOException e) {
throw new LeaseDeniedException("Error calling MarshalledObject.get(), "+e.getLocalizedMessage());
} catch (ClassNotFoundException e) {
throw new LeaseDeniedException("Could not load ServiceBeanInstantiator, "+e.getLocalizedMessage());
}
if(instantiator instanceof RemoteMethodControl)
instantiator = (ServiceBeanInstantiator)instantiatorPreparer.prepareProxy(instantiator);
String name;
try {
name = instantiator.getName();
} catch(Throwable t) {
name = "Cybernode";
}
Uuid uuid=instantiator.getInstantiatorUuid();
InstantiatorResource resource = new InstantiatorResource(sbi,
instantiator,
name,
uuid,
handback,