private void removeListenerForResource(Object instance) {
ObservableBean bean = null;
if(instance instanceof Resource){
bean = (ObservableBean) ConfigSupport.getImpl((ConfigBeanProxy)instance);
bean.removeListener(this);
} else if(instance instanceof ResourceRef) {
bean = (ObservableBean) ConfigSupport.getImpl((ConfigBeanProxy) instance);
bean.removeListener(this);
}
}