*/
void registerMBean(final String storageId) {
// We wrap to bypass standard mbean naming convetion.
// This wraping can be removed in java 6 as it is more flexible in
// package naming for mbeans and their impl.
StandardMBean bean;
String serverName;
if (storageId.equals("")) {// Temp fix for the uninitialized storage
serverName = "DataNode-UndefinedStorageId" + rand.nextInt();
} else {
serverName = "DataNode-" + storageId;
}
try {
bean = new StandardMBean(this,FSDatasetMBean.class);
mbeanName = MBeanUtil.registerMBean(serverName, "FSDatasetStatus", bean);
} catch (NotCompliantMBeanException e) {
e.printStackTrace();
}