I'm investigating how to best move non-contextual injection into a
webbeans extension that's jsr299-impl independent. While I could
rewrite a stripped down version of the reflection scanning/caching
code that is already used by the existing webbeans-specific
non-contextual-injector, but it wouldn't be as performant or compliant
as the code that's already in the core, and I'm wondering if it's
reasonable to try to break out this chunk of the core into a library
which my extension (and possibly others in webbeans-extensions) uses.
These would be some coherent self-contained subset of
org.jboss.webbeans.{injection, introspector, introspector.jlr,bean,
metadata, util}. I think of this as the part of the core that
examines classes and builds a metamodel about the beans they
represent, and knows how to inject them, but doesn't deal with
contexts, bootstrapping, and the zillion other things the core does.
I think it could probably be made implementation-independent based on
the jsr299-api. It would have to be made independent of ManagerImpl,
mainly.
It couldn't live in webbeans-extensions obviously, since the core
would depend upon it. But if it lived in webbeans-model, then
webbeans-core could depend on it, as could jsr299-utils.
Thoughts? This is not terribly well investigated yet, so those with
more experience with the source base, feel free to wave me off. I
just hate duplicating code.
Thanks,
-Clint
--
Clint Popetz
http://42lines.net
Scalable Web Application Development