Another thing is related to initialization of beans and cyclic dependencies. The Option.LAZY_ASSIGNMENT option can be set on a recipe to allo references to be injected at a later time when they are created and break cyclic dependencies. However, calling an initialization method must be done only when the instance has been fully constructed. I think it would be easier if xbean-reflect has built-in support for calling initializing methods on beans...
On Thu, Apr 23, 2009 at 10:46, Guillaume Nodet <[email protected]> wrote: > When trying to implement the dedens-on attribute for blueprint, I had > to find my way in xbean-reflect about constructor recipes and nested > recipes. > In the ObjectRecipe, a factory-method can be set so that the object is > built by calling a static method or an instance method. > This will be very useful when implementing the factory stuff in blueprint. > However, I think there is a mismatch here. > In xbean-reflect, the recipe is used to create both the factory (in > case of an instance factory), then the factory method is called to > create the final object. In blueprint, there is a notion of factory > component, which should be built by its own recipe, then used as a > reference to create the object using arguments if any, then populating > the created beans using properties. > I'd like to enhance xbean-reflect to support such factory instances by > references, but it would break any existing code relying on the > current factory mechanism. > Is there a need to support backward compatibility on this ? > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com
