Flavia Rainone wrote:
Ales Justin wrote:
Why the rush? :-)
If you ask me, I would do it lazily aka on_demand.
Scanning the whole common/lib is gonna be slow,
and imo, people should not be using libs to deploy Weld components -- simply put them in deploy/.
Or why would you do it upfront?
Because the Java EE/CDI specs require it.
I've been thinking about correctness all this time. If somebody places a jar in lib and expects that the beans are created upfront when AS starts, then this would not work using your approach.
Ok, I think we've got crossed wires. You can't deploy a library jar in some "context" outside a deployment. The beans don't get created or anything outside the context of a deployment.
Another way to think of it is that a library in default/lib with a beans.xml in it works just like a library in WEB-INF/lib.