logger.severe("Uses port: " + usingPortName +
" has been unregistered");
// callback the AppCoordinator with an exception
try {
AppCoordinatorCallback coord = (AppCoordinatorCallback)
HandleResolver.resolveHandle(coordinatorHandle,
AppCoordinatorCallback.class.getName());
coord.migrationApproval(providesComponentName,
getComponentID().getInstanceName(),
usingPortName,
AppCoordinatorCallback.EXCEPTION);
} catch (gov.cca.CCAException ce) {
logger.severe("Can't invoke notification on remote AppCoordinator",
ce);
}
return;
}
// wait till the port is released
while (uInfo.getInUse()) {
try {
logger.finest("wait till the port is released");
uInfo.wait();
} catch (InterruptedException ie) {
logger.severe("Caught InterruptedException while waiting", ie);
}
}
// notify that this port requests migration
uInfo.requestMigration();
// Callback the App Coordinator notifying that the uses
// side is ready for migration
try {
AppCoordinatorCallback coord = (AppCoordinatorCallback)
HandleResolver.resolveHandle(coordinatorHandle,
AppCoordinatorCallback.class.getName());
coord.migrationApproval(providesComponentName,
getComponentID().getInstanceName(),
usingPortName,
AppCoordinatorCallback.READY);
} catch (gov.cca.CCAException ce) {
logger.severe("Can't invoke notification on remote AppCoordinator",
ce);
}
}
} else {
logger.severe("Port " + usingPortName + " not defined");
// callback the AppCoordinator with an exception
try {
AppCoordinatorCallback coord = (AppCoordinatorCallback)
HandleResolver.resolveHandle(coordinatorHandle,
AppCoordinatorCallback.class.getName());
coord.migrationApproval(providesComponentName,
getComponentID().getInstanceName(),
usingPortName,
AppCoordinatorCallback.EXCEPTION);
} catch (gov.cca.CCAException ce) {
logger.severe("Can't invoke notification on remote AppCoordinator",