[weld-dev] Specifying the classes to install

Pete Muir pmuir at redhat.com
Fri Nov 12 11:05:10 EST 2010


On 11 Nov 2010, at 12:54, Pete Muir wrote:

> 
> On 10 Nov 2010, at 21:59, Paul Bakker wrote:
> 
>> It's not easy to drop because it's part of the CDI spec I guess. But besides that I don't think it's a conceptual problem, it has a lot of advantages (injecting third party classes for example). In some cases (when startup times are important, e.g. on GAE) it would be nice to override this behavior though.
> 
> Agreed, Ales has started prototyping this in Weld already :-)

Ales and I discussed this on IM. Points of note:

* The deployment for Weld is split up like:

  1) scan classloader
  2) load classes
  3) send PAT events
  4) create beans

  Weld already supports skipping (2), (3), (4) via the beans.xml support for excluding classes, so we have removed some overhead, but being able to skip (1) will help as well.

* We could introduce a Java API for this, where you can specify classes to load in a list, array or similar (refactor safe compared to a plain text file)

* You need to specify each class, no support for wildcards etc. here

* We could introduce a build-time tool that does support wildcards, and generates the plain text descriptor

* A build time tool would also fit well with the support for jandex that we want to add


More information about the weld-dev mailing list