On Sat, Nov 21, 2009 at 10:47 AM, Pete Muir <pmuir(a)redhat.com> wrote:
* I would prefer to not actually bootstrap Weld core inside the Weld
constructor (I believe this should be an explicit step), hence the boot() method. We could
rename this to initialize() for example. Opinions?
Fine by me. Especially since that at some stage we will need to pass
some kind of settings before booting.
* What API do we want to expose to allow people to get hold of an
Instance<?> ? IMO we need more syntatic sugar than offered by BeanManager. Do we
want to just allow access to Instances (as above)?
Stick the following two methods on the object returned by initialize():
Instance<Object> instance();
Instance<Event> event();
So I can do:
Weld weld = new Weld().initialize();
weld.instance().select(Foo.class).get()
weld.event().select(Bar.class).fire( new Bar() );
weld.shutdown();
Or whatever.
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org