Flavia Rainone [
http://community.jboss.org/people/flavia.rainone%40jboss.com] replied to
the discussion
"JBoss Reflect Performance Javassist vs Introspection"
To view the discussion, visit:
http://community.jboss.org/message/538584#538584
--------------------------------------------------------------
Kabir Khan wrote:
The problem seems to be that in the bootstrap DefaultClassPoolFactory is used until it
gets replaced by the real one. Flavia, is there a way to get the real ClassPoolFactory to
kick in earlier?
The correct classpool factory kicks in just allright in the JBoss AOP integration. What
exactly is being performed before the correct ClassPool Factory is set up?
Taking a look at your implementation, I see that you created in jboss-kernel a
ClassPoolFactoryImpl with support to installation and uninstallation of ClassLoaders. By
doing this, as far as I can tell, you created a mechanism that is already present in the
integration (take a look at the usage of RegisterModuleCallback in aop.xml).
I mean, with things set up the way they are, I thought we had all that we needed to use
JBoss Reflection over Javassist with the new pools:
- there is a part that is in aop.xml that concerns ClassPools. I thought of moving this
stuff to a new separate file when we integrated JBoss Reflection + Javassist with MC
(mainly RegisterModuleCallback stuff)
- in JBoss Reflection, there is a RepositoryClassPoolFactory class, which is the
classpoolfactory intended for usage with jboss-classpool. You only need to set it as the
classpoolfactory in JavassistTypeInfoFactory and set
org.jboss.classpool.spi.ClassPoolRepository as the repository in
RepositoryClassPoolFactory:
RepositoryClassPoolFactory cpFactory = new
RepositoryClassPoolFactory(ClassPoolRepository.getInstance());
JavassistTypeInfoFactory.setClassPoolFactory(cpFactory);
I thought this would also be configured in this xml file that would contain stuff
extracted from aop.xml
So, why do you need ClassPoolFactoryImpl? If you need it for integration, maybe we should
get rid of RepositoryClassPoolFactory and put it in its place instead, as
RepositoryClassPoolFactory would become useless.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/538584#538584]
Start a new discussion in JBoss Microcontainer Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]