The PR at https://github.com/weld/core/pull/920/files looks like a very good start.
Some more features we should consider:
-
packages - either simple packages() or with recursive support for subpackages
-
this will require some kind of simplified scanning to implement
-
parameters - inlike the CDI initialize(Map<String, ?>) proposal I am more in favor of builder approach e.g. new Weld().param(NON_PORTABLE_MODE, true).param(INJECTABLE_REFERENCE_OPTIMIZATION, true) - method name subject to change
-
shutdown hook - currently we use it only when StartMain is used to bootstrap Weld
-
it could be useful to register it always for the cases when a user forgets to use try-with-resources or to close the container. In other cases the hook would simply check if the container is shut down already and do nothing if it is
-
this should be implemented as a separate issue as it does not have much to do with the API
|