public void unloadGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
unloadGBean(null, type);
}
public void unloadGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
GBeanInstance gbeanInstance = registry.getGBeanInstance(shortName, type);
AbstractName name = gbeanInstance.getAbstractName();
gbeanInstance.die();
registry.unregister(name);
}