if ((instance instanceof HandleAware)
&& (bean instanceof PassivationCapable)) {
HandleAware handleAware = (HandleAware) instance;
PassivationCapable passiveBean = (PassivationCapable) bean;
handleAware.setSerializationHandle(new SingletonHandle(passiveBean.getId()));
}
return instance;
}