[jboss-user] [JBoss Microcontainer Development] - JBoss Reflect Performance Javassist vs Introspection

Andrew Rubinger do-not-reply at jboss.com
Thu Apr 22 11:25:55 EDT 2010


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 at 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&containerType=14&container=2115]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100422/6070875c/attachment.html 


More information about the jboss-user mailing list