Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Jan-Kees van Andel
2009/1/11 Matthias Wessendorf mat...@apache.org: On Sun, Jan 11, 2009 at 4:46 AM, Mario Ivankovits ma...@ops.co.at wrote: ;-) I really hate to wait on the boot-up. :-) -- Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Cagatay Civici
Hi Jan, Thanks for your contribution, yes this could be done without adding a dependency. We could avoid reflection stuff and use byte code exploring. Mojarra 2.0 uses code from Glassfish codebase for this byte code stuff btw. You may take a look at their implementation to give an idea. I agree

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Jan-Kees van Andel
2009/1/18 Cagatay Civici cagatay.civ...@gmail.com: Hi Jan, Thanks for your contribution, yes this could be done without adding a dependency. We could avoid reflection stuff and use byte code exploring. Mojarra 2.0 uses code from Glassfish codebase for this byte code stuff btw. You may take

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Simon Kitching
On Sun, 2009-01-18 at 14:41 +0100, Jan-Kees van Andel wrote: 2009/1/11 Matthias Wessendorf mat...@apache.org: On Sun, Jan 11, 2009 at 4:46 AM, Mario Ivankovits ma...@ops.co.at wrote: ;-) I really hate to wait on the boot-up. :-) -- Matthias Wessendorf blog:

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Jan-Kees van Andel
That sounds great. What is your general approach? Just read in the class as byte[], then use the class-file-format rules to get to the annotations sections on the class and the methods? From my quick scan of the classfile spec it seemed reasonably easy to do that... This line is the

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Cagatay Civici
I also have some questions for the JSF 2.0 EG, like what classpaths need to be scanned by default. Or the policy of dealing with runtime invisible annotations (I can read them, but Reflection cannot). I'm also interested in general rules regarding class/method signatures. For example, do you

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Matthias Wessendorf
We could avoid reflection stuff and use byte code exploring. Mojarra 2.0 uses code from Glassfish codebase for this byte code stuff btw. You may take a look at their implementation to give an idea. eh... ? -1 on that... -M -- Matthias Wessendorf blog:

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Jan-Kees van Andel
eh... ? -1 on that... -M LOL! Don't worry. I won't copy their codebase. ;-) I already have a working implementation.

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Simon Lessard
Hi Cagatay, The issue of what packages to scan is the responsibility of the specification here however. We cannot simply decide to avoid some packages in this case, we have to wait for the spec to normalize a way to define those. Regards, ~ Simon On Sun, Jan 18, 2009 at 8:50 AM, Cagatay

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Simon Lessard
Hi again, Actually, much more packages have to be scanned. The goal of those annotation is 0-Config, so a faces-config.xml might not even be needed anymore in the libraries. Anyway, before implementing any kind of package filter, I would wait for the final spec version, as long as the scanner is

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Gerhard Petracek
hello, i agree with simon. regards, gerhard 2009/1/18 Simon Lessard simon.lessar...@gmail.com Hi again, Actually, much more packages have to be scanned. The goal of those annotation is 0-Config, so a faces-config.xml might not even be needed anymore in the libraries. Anyway, before

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Bernd Bohmann
Hello, perhaps the annotation scanning was already solved by openejb? We should try to create a common annotation module for apache projects like openejb, tomcat, cxf and myfaces. Regards Bernd Gerhard Petracek schrieb: hello, i agree with simon. regards, gerhard 2009/1/18

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Matthias Wessendorf
On Sun, Jan 18, 2009 at 1:00 PM, Bernd Bohmann bernd.bohm...@atanion.com wrote: Hello, perhaps the annotation scanning was already solved by openejb? We should try to create a common annotation module for apache projects like openejb, tomcat, cxf and myfaces. and openwebbeans +1 Regards

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Gerhard Petracek
+1 regards, gerhard 2009/1/18 Matthias Wessendorf mat...@apache.org On Sun, Jan 18, 2009 at 1:00 PM, Bernd Bohmann bernd.bohm...@atanion.com wrote: Hello, perhaps the annotation scanning was already solved by openejb? We should try to create a common annotation module for apache

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread Mark Struberg
...@atanion.com Betreff: Re: Scanning for annotated classes in MyFaces 2 An: MyFaces Development dev@myfaces.apache.org Datum: Sonntag, 18. Januar 2009, 22:00 Hello, perhaps the annotation scanning was already solved by openejb? We should try to create a common annotation module for apache

Re: Scanning for annotated classes in MyFaces 2

2009-01-18 Thread David Blevins
but has a small memory footprint) 3.) scan all annotations and remove all unnecessary ones. LieGrue, strub --- Bernd Bohmann bernd.bohm...@atanion.com schrieb am So, 18.1.2009: Von: Bernd Bohmann bernd.bohm...@atanion.com Betreff: Re: Scanning for annotated classes in MyFaces 2 An: MyFaces

Re: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Simon Kitching
On Sat, 2009-01-10 at 19:56 -0700, Matthias Wessendorf wrote: On Sat, Jan 10, 2009 at 11:21 AM, Jan-Kees van Andel jankeesvanan...@gmail.com wrote: I don't think Scannotation itself is an issue, but it has a required dependency on Javassist, which has an LGPL license. Isn't that a problem?

RE: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Mario Ivankovits
Hi! -Original Message- From: Jan-Kees van Andel [mailto:jankeesvanan...@gmail.com] Mario, I've been looking at the Shale code that handles the annotation scanning, but I saw it uses Reflection and standard Java ClassLoaders for scanning the classpath for JSF artifacts. What's your

Re: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Mark Struberg
: Scanning for annotated classes in MyFaces 2 An: MyFaces Development dev@myfaces.apache.org Datum: Sonntag, 11. Januar 2009, 12:06 On Sat, 2009-01-10 at 19:56 -0700, Matthias Wessendorf wrote: On Sat, Jan 10, 2009 at 11:21 AM, Jan-Kees van Andel jankeesvanan...@gmail.com wrote: I don't

RE: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Mario Ivankovits
Hi! not sure on the PERF, but if it is really (proven) the case, I am with you. Well... startup time isn't really a big problem, right? :-) Is that ironic? In projects with 3000 classes and 60 jar files you are up to 30 seconds, or even more, scanning time. Under load, with shale, I saw

Re: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Simon Kitching
skitch...@apache.org Betreff: Re: Scanning for annotated classes in MyFaces 2 An: MyFaces Development dev@myfaces.apache.org Datum: Sonntag, 11. Januar 2009, 12:06 On Sat, 2009-01-10 at 19:56 -0700, Matthias Wessendorf wrote: On Sat, Jan 10, 2009 at 11:21 AM, Jan-Kees van Andel

Re: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Cagatay Civici
I've checked mojarra 2.0 some time ago to see how do they implemented this, well they're using reflection/class way. Spring's scanning mechanism also gives out of memory if you dont specify a sub package name to scan. So, my thought is to implement this in myfaces, it's not a complicated task as

Re: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Stephen Friedrich
My 2 cents: Don't load classes to use java.lang.reflect on it: - What if a class does something bad (or just about anything) in a static initializer? For example try to run the code below. It will EXIT THE VM - Can you be sure that those classes are unloaded again? - Performance: It is

Re: Scanning for annotated classes in MyFaces 2

2009-01-11 Thread Matthias Wessendorf
On Sun, Jan 11, 2009 at 4:46 AM, Mario Ivankovits ma...@ops.co.at wrote: Hi! not sure on the PERF, but if it is really (proven) the case, I am with you. Well... startup time isn't really a big problem, right? :-) Is that ironic? ;-) I really hate to wait on the boot-up. :-) In projects

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Jan-Kees van Andel
2009/1/7 Mario Ivankovits ma...@ops.co.at: -Original Message- From: Jan-Kees van Andel [mailto:jankeesvanan...@gmail.com] Sent: Wednesday, January 07, 2009 8:15 AM To: dev@myfaces.apache.org Subject: Re: Scanning for annotated classes in MyFaces 2 It might be smart to put

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Matthias Wessendorf
It might be smart to put this Shale code in a separate project. For example in Commons, since there are several Apache projects that need to scan for annotations, like EJB3 and JPA projects. there is something on the new open web beans podling (in the incubator) or, take a look a google

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Cagatay Civici
I see scannoation in openwebbeans, anyone tried it? As far as I know it's a one man project and dont know if he still maintains it. I think reflection.class stuff is problematic if you dont limit the package name to be scanned. On Sat, Jan 10, 2009 at 4:44 PM, Matthias Wessendorf

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Matthias Wessendorf
On Sat, Jan 10, 2009 at 10:09 AM, Cagatay Civici cagatay.civ...@gmail.com wrote: I see scannoation in openwebbeans, anyone tried it? As far as I know it's a one man project and dont know if he still maintains it. ah, so perhaps guice over scannoation ? -M I think reflection.class stuff is

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Matthias Wessendorf
On Sat, Jan 10, 2009 at 10:31 AM, Matthias Wessendorf mat...@apache.org wrote: On Sat, Jan 10, 2009 at 10:09 AM, Cagatay Civici cagatay.civ...@gmail.com wrote: I see scannoation in openwebbeans, anyone tried it? As far as I know it's a one man project and dont know if he still maintains it.

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Jan-Kees van Andel
I don't think Scannotation itself is an issue, but it has a required dependency on Javassist, which has an LGPL license. Isn't that a problem? Using Scannotation, however, would definitely ease development. /Jan-Kees 2009/1/10 Matthias Wessendorf mat...@apache.org: On Sat, Jan 10, 2009 at

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Andrew Robinson
Feel free to use my code for facelets annotation deployment: http://jsf-comp.sourceforge.net/components/facelets-deployment/index.html http://jsf-comp.svn.sourceforge.net/svnroot/jsf-comp/trunk/facelets/annotation-deployment/

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Matthias Wessendorf
On Sat, Jan 10, 2009 at 11:21 AM, Jan-Kees van Andel jankeesvanan...@gmail.com wrote: I don't think Scannotation itself is an issue, but it has a required dependency on Javassist, which has an LGPL license. Isn't that a problem? hrm, I think not really, b/c it's not a direct dependency.

Re: Scanning for annotated classes in MyFaces 2

2009-01-10 Thread Matthias Wessendorf
On Sat, Jan 10, 2009 at 11:34 AM, Andrew Robinson andrew.rw.robin...@gmail.com wrote: Feel free to use my code for facelets annotation deployment: http://jsf-comp.sourceforge.net/components/facelets-deployment/index.html

RE: Scanning for annotated classes in MyFaces 2

2009-01-07 Thread Jan-Kees van Andel
[mailto:jankeesvanan...@gmail.com] Sent: Wednesday, January 07, 2009 8:15 AM To: dev@myfaces.apache.org Subject: Re: Scanning for annotated classes in MyFaces 2 It might be smart to put this Shale code in a separate project. For example in Commons, since there are several Apache projects that need to scan

Re: Scanning for annotated classes in MyFaces 2

2009-01-06 Thread Simon Lessard
Hi Jan-Kees, I think it's ok for Apache projects to depend on external libraries that are not licensed under ASL 2.0. However that would be some extra dependencies for MyFaces and we try to minimize those. On the other hand the gain might worth it in this case imho if those libraries are deployed

Re: Scanning for annotated classes in MyFaces 2

2009-01-06 Thread Cagatay Civici
I think we should avoid scannotation, not that it's bad but because it's a dependency. MyFaces already has more dependencies compared to mojarra afaik and increasing those doesn't sound good. Classpath scanning is a tricky business and it's good both performance and computing wise to limit the

RE: Scanning for annotated classes in MyFaces 2

2009-01-06 Thread Mario Ivankovits
Hi! But there are some issues with this: First, what paths to scan? AFAIK the spec doesn't state the classpaths to scan. I suppose only /WEB-INF/lib and /WEB-INF/classes need to be checked, but I can't find it in the spec. What ever the spec says, we definitely should provide a configuration

Re: Scanning for annotated classes in MyFaces 2

2009-01-06 Thread Gerhard Petracek
hello mario, sounds good to me regards, gerhard 2009/1/7 Mario Ivankovits ma...@ops.co.at Hi! But there are some issues with this: First, what paths to scan? AFAIK the spec doesn't state the classpaths to scan. I suppose only /WEB-INF/lib and /WEB-INF/classes need to be checked,

Re: Scanning for annotated classes in MyFaces 2

2009-01-06 Thread Jan-Kees van Andel
Hi, It might be smart to put this Shale code in a separate project. For example in Commons, since there are several Apache projects that need to scan for annotations, like EJB3 and JPA projects. Jan-Kees Gerhard Petracek wrote: hello mario, sounds good to me regards, gerhard

RE: Scanning for annotated classes in MyFaces 2

2009-01-06 Thread Mario Ivankovits
-Original Message- From: Jan-Kees van Andel [mailto:jankeesvanan...@gmail.com] Sent: Wednesday, January 07, 2009 8:15 AM To: dev@myfaces.apache.org Subject: Re: Scanning for annotated classes in MyFaces 2 It might be smart to put this Shale code in a separate project. For example