exporter.setInterfaces(interfaces);
exporter.setListeners(listeners);
exporter.setTarget(bean);
try {
exporter.afterPropertiesSet();
}
catch (Exception ex) {
throw new BeanCreationException("Cannot publish bean for pid " + beanName, ex);
}
return exporter;