commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: [sandbox] class scanning + karma requests
Date Fri, 22 Jul 2011 09:41:34 GMT
Hi!

Jakob Korherr (apacheId jakobk) is also interested and did some work in this area in MyFaces
and OWB already.

There are 2 main parts in this project

a.) A classpath scanner which does _not_ use Class.getDeclaredXxx etc, since this allocates
memory in the ClassLoader which cannot get freed up later. In a mid sized project this leads
to getting 100MB of PermGenSpace easily! This is what Davids xbean-finder fixes already by
just scanning the structure from the bytecode directly.

b.) Lots of EE apps need to scan the classpath for annotations (e.g. MyFaces, OpenWebBeans,
Tomcat, OpenEJB, etc). So this part is done redundantly a few times when starting the server.
I hacked a quick API + SPI to do all this in one go. The trick is to introduce a register
mechanism where classscan-clients can register their needs before the scan gets performed.


We like to do this at commons because it's really decoupled from all the single projects and
could be useful for a lot more projects which added some kind of annotation processing lately.

LieGrue,
strub

--- On Fri, 7/22/11, Matt Benson <gudnabrsam@gmail.com> wrote:

> From: Matt Benson <gudnabrsam@gmail.com>
> Subject: [sandbox] class scanning + karma requests
> To: dev@commons.apache.org
> Cc: dblevins@apache.org, "Gerhard Petracek" <gerhard.petracek@gmail.com>
> Date: Friday, July 22, 2011, 4:30 AM
> First, Simo added [meiyo] to the
> sandbox.  Now, some of the guys from
> the various JEE-related communities have expressed interest
> in working
> with class scanning here at Commons.  What we would
> propose to do is
> start with the code of Geronimo's xbean-finder, which scans
> classes by
> reading bytecode to populate meta-structures, thereby
> sparing permgen
> space whenever possible.  We plan to carefully prune
> and polish that
> code, pull in the best ideas from [meiyo] (Simo and/or any
> of the rest
> of you Commons developers are of course welcome to
> participate as
> always!), and add a single-scan SPI strategy to allow the
> majority of
> consumers to share the impact of scanning.  For my own
> part, I hope to
> be able to contribute such that the final API can
> accommodate most if
> not all conceivable use-cases for classpath scanning, while
> not
> becoming too unwieldy.  We'd like to get started ASAP
> (and obviously
> nothing stops me from going ahead and taking the first
> steps).  I
> would also request our new chair grant sandbox karma to:
> 
> struberg (Mark Struberg)
> dblevins (David Blevins)
> gpetracek (Gerhard Petracek}
> 
> Thanks,
> Matt
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message