if (targetName.equals(myContainer.getAMS())) {
// If we are debugging the AMS, let's wait for the ToolNotifier
// to be ready to avoid deadlock problems. Note also that in
// this case this code is executed by the ams-debug-helper thread and not
// by the AMS thread
tn.waitUntilStarted();
}
// Wait a bit to let the ToolNotifier pass in ACTIVE_STATE
try {Thread.sleep(1000);} catch (Exception e) {};
helper.registerMessageListener(tn);
helper.registerAgentListener(tn);