Andrew Rubinger [
http://community.jboss.org/people/ALRubinger] replied to the discussion
"JBoss Reflect Performance Javassist vs Introspection"
To view the discussion, visit:
http://community.jboss.org/message/539057#539057
--------------------------------------------------------------
ie:
/**
* {@link LifecycleEventHandler} implementation to set the jboss-reflect
* {@link RepositoryClassPoolFactory}. Must be called before MC is brought up.
*
* @author <a href="mailto:andrew.rubinger@jboss.org">ALR</a>
*/
public enum SetClassPoolLifecycleEventHandler implements LifecycleEventHandler {
INSTANCE;
//-------------------------------------------------------------------------------------||
// Class Members
----------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
/**
* Logger
*/
private static final Logger log =
Logger.getLogger(SetClassPoolLifecycleEventHandler.class);
//-------------------------------------------------------------------------------------||
// Required Implementations
-----------------------------------------------------------||
//-------------------------------------------------------------------------------------||
/**
* {@inheritDoc}
* @see
org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler#handleEvent(org.jboss.bootstrap.api.lifecycle.LifecycleState)
*/
@Override
public void handleEvent(final LifecycleState state) throws LifecycleEventException
{
/*
* Make sure we have the correct classpool
*/
final RepositoryClassPoolFactory factory = new
RepositoryClassPoolFactory(ClassPoolRepository.getInstance());
JavassistTypeInfoFactoryImpl.setPoolFactory(factory);
if (log.isTraceEnabled())
{
log.tracef("Set %s pool factory to %s",
JavassistTypeInfoFactoryImpl.class.getSimpleName(), factory);
}
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/539057#539057]
Start a new discussion in JBoss Microcontainer Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]