Niclas Hedhman wrote: > On Mon, Mar 16, 2009 at 12:27 PM, Rickard Öberg <[email protected]> > wrote: > >> Does this seem like an ok fix? I have already tried implementing it, and >> that worked well, so I know that it is doable. Is there any problem with it? > > I think @UseDefault should kick in here... And we could say that > @UseDefault for @Uses will be a new instance of the class/composite if > it can be instantiated either through > CompositeBuilderFactory.newComposite() or for objects with a callable > constructor (i.e. Dep Injects allowed). > > But without @UseDefaults, it should fail as previously. > > WDYT?
I'm all for that, but the question remains whether each injection point in a graph gets its own instance, or whether they share, within the same instantiation call. I.e. if, with the previous example, I do obf.newObject(A.class), does it create one or two instances of C? I would prefer C, although I sort of recall having a similar discussion previously where we talked about having it be two different instances. /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

