[jboss-user] [JBoss Microcontainer Development] - ClassPool bootstrap refactoring

Kabir Khan do-not-reply at jboss.com
Tue May 11 17:40:30 EDT 2010

Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] replied to the discussion

"ClassPool bootstrap refactoring"

To view the discussion, visit: http://community.jboss.org/message/542427#542427

> Andrew Rubinger wrote:
> Corrected the failing tests, made a couple other lil' tweaks. 
>  https://jira.jboss.org/jira/browse/JBBOOT-134 https://jira.jboss.org/jira/browse/JBBOOT-134
> Still something I'd like to investigate is moving some of these bits to event handlers or elsewhere.  This patch brings in a lot of dependencies I'd like to understand/justify.  If this is primarily for AS, what's the overhead in pure MC servers, where this is placed?  If the answer is more than "nothing", we may have to extract this stuff out a bit so pure MCServer performance doesn't deteriorate.
> S,
I agree these classpool bits should not be hard-coded in AbstractMcServerBase.doInitialize(). If the events and event handlers can be made more  fine-grained or "precise" as to when they occur (as mentioned what I added must happen in *exactly* the place it does, although it might be possible to move the installation of the config bean into MC before the call to super.initialize()) then we should do that. The quick way would be to just add two new events, PRE_BOOTSTRAP and POST_BOOTSTRAP and raise them from where I am doing so, but I don't want to mess up your code if you have other ideas :-)

This is primarily for AS since what my new stuff does is basically to set up javassist classpools understanding the AS classloading, normal MC setups probably will not need to do that, or might need to do something else. 

The overhead is installing a new bean waiting for the ClassLoading bean to be installed, which then installs itself as a ModuleRegistry in the ClassLoading bean. This ModuleRegistry then gets notified as classloader Modules are added/removed and does some work. So the overhead isn't exactly "nothing", so it should go somewhere else once we can have the event handlers triggered where I need them. I guess these event listeners could go into a different module in bootstrap or elsewhere. As long as the jars containing them are on the classpath, I think AS Main could just call registerEventHandler() after creating the server instance but before initializing it.


Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer Development at Community

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

More information about the jboss-user mailing list