[Design of POJO Server] - Use of jboss-reflect project
by anil.saldhana@jboss.com
Adrian's rant is here for all projects to look at if they are using any kind of reflection to get to class info, methods etc.
---------------------------
I'm very tempted not to respond to this thread
since there's no reason why this discussion can't go on jboss-dev
(other than it is a fork of a discussion about the tck
which could be removed).
I also don't see why this code exists since jboss-reflect
is the project intended to have all this code.
If you want to know one of the reasons why JBoss5 takes
so long to boot, you only have to look at all the different
projects doing their own reflection object processing/caching.
Who knows how many times ejb3, aop, security, mdr, hibernate,
microcontainer etc. scan a class for its methods/fields?
If you look at the code in openjdk this involves lots of cloning
of objects.
Not to mention the unncessary overhead of trying to maintain
and optimize the same routines over and over again.
-----------------------------------------
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194661#4194661
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194661
17 years, 4 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: Reimplementing ClassPools for AS
by adrian@jboss.org
I've said this before, but I'll repeat it.
You shouldn't be trying to use the ClassLoaderSystem api for this.
The information you want is available in the ClassLoading/Modules api in the form
of what the parent domain is.
If its a sub-deployment with a Module then the parent is the classloader of the
parent deployment. (If it has no explicit parent domain specified.)
In all other cases it is the getDeterminedParentDomainName()
This last part is kind of an implicit rule created by the deployers
since only they understand what a subdeployment actually is. :-)
Like I said before, if we need to make something more explicit in the Module api
or some helper class to make your life easier then we can do that.
The current "implicit" rule is here:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jboss-deploye...
Although the first comment in the code is incomplete/wrong, I've corrected here.
| if (unit.isTopLevel() || module.getParentDomainName() != null)
| {
| // Top level or subdeployment with a parent domain, just create the classloader
| return classLoaderPolicyModule.registerClassLoaderPolicy(system);
| }
| else
| {
| // Subdeployment that wants a classloader
| ClassLoader parentClassLoader = unit.getParent().getClassLoader();
| return classLoaderPolicyModule.registerClassLoaderPolicy(system, parentClassLoader);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194658#4194658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194658
17 years, 4 months