* share memory buffer, this method returns.
*
* @exception AttachNotSupportedException if it's not attachable
*/
void testAttachable(String id) throws AttachNotSupportedException {
MonitoredVm mvm = null;
boolean isKernelVM = false;
try {
VmIdentifier vmid = new VmIdentifier(id);
MonitoredHost host = MonitoredHost.getMonitoredHost(vmid);
mvm = host.getMonitoredVm(vmid);
if (MonitoredVmUtil.isAttachable(mvm)) {
// it's attachable; so return false
return;
}
isKernelVM = MonitoredVmUtil.isKernelVM(mvm);
} catch (Throwable t) {
if (t instanceof ThreadDeath) {
ThreadDeath td = (ThreadDeath)t;
throw td;
}
// we do not know what this id is
return;
} finally {
if (mvm != null) {
mvm.detach();
}
}
// we're sure it's not attachable; throw exception
if (isKernelVM) {