[cdi-dev] Feedback - CDI bootstrap API (CDI-26)
jharting at redhat.com
Wed Feb 11 04:21:47 EST 2015
Hi John, some thoughts:
- instead of using BeanManager it makes more sense to me to return a CDI
instance, which is a more user-friendly API (and it also exposes access
- is there a usecase for arbitrary keys of the "params" map or is
Map<String, ?> sufficient?
- if we could move the shutdown() method from CDIContainer to the actual
container handle that we obtain from initialize(), that would look more
- what exactly is initialize() supposed to do? Is it supposed to start
scanning the entire classpath for CDI beans? That could be a problem
especially with spring-boot-like fat jars. I think we need an API to
tell the container which classes / packages to consider. Something like
Guice's binding API perhaps?
- the proposal makes me wonder whether retrofitting this functionality
to the CDI class wouldn't be a better option. It could look like:
CDI container = CDI.initialize();
compare it to:
CDIContainer container = CDIContainerLoader. getCDIContainer();
BeanManager manager = container.initialize();
On 02/10/2015 06:58 PM, John D. Ament wrote:
> I have the updated API here, and wanted to solicit any final feedback
> before updating the google doc and spec pages.
> Let me know your thoughts.
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cdi-dev