{
log.debug("Creating proxy for " + component.getIoCName() + " Seam component '"
+ component.getName() + "' using class: " + beanClass.getName());
}
// create pojo proxy
JavaBeanInterceptor interceptor = new JavaBeanInterceptor(bean, component);
// Should probably create a Factory but required a lot of duplicated
// code and there is potential for a spring bean to provide
// different interfaces at different times in an application. If
// need is great I can create a Factory and assume the same
// interfaces all the time.
ProxyObject po = Component.createProxyFactory(ComponentType.JAVA_BEAN, beanClass, interfaces).newInstance();
po.setHandler(interceptor);
interceptor.postConstruct();
return po;
}