[JBoss AOP Development] New message: "Re: ClassPool Refactoring"
by Kabir Khan
JBoss development,
A new message was posted in the thread "ClassPool Refactoring":
http://community.jboss.org/message/518925#518925
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
> alesj wrote:
>
> > Finally, I detected a great deal of calls to ClassPool.get("org.jboss.aop.microcontainer.annotations.DisableAOP"). The calls are being made by org.jboss.annotation.factory.javassist.DefaultValueAnnotationValidator.getDeclaredMethods(Class<?>), and I'm confident that this can be improved somehow (such as caching DisableAOP ctClass). I think improving this will have some impact on the startup time of AS.
> We're deprecating this annotation anyway.
> But we're replacing it with just the opposite - EnableAOP, so not a lot different from performance perspective.
> Kabir, any idea on how to optimize (e.g. cache) this?
The quick and dirty way would be at DefaulValueAnnotationValidator level
-a WeakHashMap<Class<?>, CtClass>, or
-be able to configure it with annotations it should cache
But I guess the real and harder solution is that caching at class pool level could be improved? What seems to happen now is that when trying to load a CtClass we end up in Base-/JBossClClassPoolDomain which checks each relavant pool and parent domain for a locally cached CtClass which is simple but probably more work than necessary. Maybe these lookups should be cached in the initiating pool, with some invalidation if the domain (or its parent domain) has pools added/removed?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518925#518925
16 years, 2 months
[JBoss AOP Development] New message: "Re: ClassPool Refactoring"
by Ales Justin
JBoss development,
A new message was posted in the thread "ClassPool Refactoring":
http://community.jboss.org/message/518912#518912
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> Finally, I detected a great deal of calls to ClassPool.get("org.jboss.aop.microcontainer.annotations.DisableAOP"). The calls are being made by org.jboss.annotation.factory.javassist.DefaultValueAnnotationValidator.getDeclaredMethods(Class<?>), and I'm confident that this can be improved somehow (such as caching DisableAOP ctClass). I think improving this will have some impact on the startup time of AS.
We're deprecating this annotation anyway.
But we're replacing it with just the opposite - EnableAOP, so not a lot different from performance perspective.
Kabir, any idea on how to optimize (e.g. cache) this?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518912#518912
16 years, 2 months
[jBPM Development] New message: "Re: JBPM 4.x on Sybase"
by Ronald van Kuijk
JBoss development,
A new message was posted in the thread "JBPM 4.x on Sybase":
http://community.jboss.org/message/518876#518876
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
Walter,
Thanks for your interest in jBPM. You are using the wrong forum for these kinds of questions. This forum is for discussing the deveopment OF jBPM, not developing WITH jBPM. The userforum above this one should be used. Much bigger chance that your question gets answered since that one is read by way more more people.
Oh and in addition, it would also be helpful to post your errors, instead of just asking for somebody elses config. Simply because many errors are more generic and could e.g. be answered by me, but I could not give you what you ask now (since I don't have it). This also increases your chance of getting an answer.
Ronald
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518876#518876
16 years, 2 months
[JBoss Microcontainer Development] New message: "Re: another annotation scanner requirement"
by Ales Justin
JBoss development,
A new message was posted in the thread "another annotation scanner requirement":
http://community.jboss.org/message/518868#518868
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> My first question is, what is the right API to write a deployer that scans annotations? AnnotationEnvironment?
>
Yes #1.
> Or is there a new one coming down the pipe?
>
Yes #2.
The idea that I have is to allow for plugable resource indexing.
I have some prototype code locally which I plan to push as https://jira.jboss.org/jira/browse/JBMCSCAN project.
We need to scan all resources once anyway, hence let's make sure it's really just once.
And while doing this we could build whatever indexes those plugins come up with.
Annotations being just one of the indexes.
Others would include Hibernate's .hbm.xml, Seam's .page.xml, etc ...
In your case you would build interface+annotation index.
You can wait for this feature or go ahead and do it,
as I really haven't done much, apart from refactoring my previous annotations scanning attempts to be more generic, hence no big waste.
This is what I've done for annotations scanning: http://anonsvn.jboss.org/repos/jbossas/projects/mc-ann/trunk/
The idea is to
* have work split into pre-indexed and runtime-indexing if pre doesn't exist
* use VFS visitor pattern to do the work
* use MC's CL resource pattern to do the work
* use JBoss Reflect (its Javassist config) to do the lazy class reading
What is missing is the nice API to plug-in additional indexers and expose the to be read.
> A query for all classes that implement an interface annotated with a specific annotation.
Currently this is a pita, pretty slow.
You can ask the AnnotationRepository (renamed from AnntationEnvironment) for all classes that are annotated with your annotation.
As we don't keep any class hierarchy info, you would now need to go over all classes again,
and check for those who implement your previously found interfaces.
Let me know if you decide to take the first route.
We can discuss the dev here, and I can pitch in once I'm done with MC releases.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518868#518868
16 years, 2 months