Gavin, all,
A couple of weeks ago Gavin and I were chatting about being able to do
Instance<Foo> foo = new Weld().boot().getInstance(Foo.class);
which I think led Gavin to reinvestigate the Weld SE stuff that Pete R did.
Adding the above syntatic sugar is pretty easy (it's just another way of exposing the
existing stuff), and I can see use cases for both approaches. Before Pete R or I impl the
above syntax, I want to see what others think (will it just confuse people) and get some
ideas about what the API should look like. Decomposing it:
* new Weld() is ideal. Anyone disagree?
* 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?
* 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)?
On 17 Nov 2009, at 22:25, Gavin King wrote:
Great work on this, Peter, it's really nice.
I think we should let you specify an event type to raise:
java -Devent=my.Event
or, perhaps, an event qualifier to be applied to the ContainerInitialized event:
java -Dqualifier=my.Qualifier
that way, you have a mechanism for choosing between "main methods".
Alternatively, we could use something EL-ish to specify a method to call:
java -Daction=mybean.method
Hrm, perhaps that's the best option. Maybe my idea of using an event
wasn't so great after all.
WDYT?
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
_______________________________________________
weld-dev mailing list
weld-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev