aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Mahrwald <>
Subject Re: Service registration and service consumption cannot be defined in the same blueprint bundle?
Date Wed, 16 Dec 2009 08:14:52 GMT
Blueprint supports two kinds of dependencies, implicit, which  
dependencies that come from injecting A into B (such as via a  
property, constructor arg or a ref on service definition etc), and  
explicit, which are defined by the "depends-on" attribute. Dependent  
beans are constructed after their dependencies. However, for beans  
that are not dependent on one another either way, blueprint gives no  
guarantee of any specific ordering.

So if you wanted a specific ordering you can most easily achieve that  
by specifying the "depends-on" attribute for each of your beans.  
Although of course that is not quite best practice ;)

For reference see 121.2.4 of the spec.



On 16 Dec 2009, at 00:52, Forrest Xia wrote:

> Hi Valentin,
> Thank you for quick response. Now I understood it.
> By default, the service reference resolution is mandatory, so this
> implicitly means service registration and consumption is better not  
> in the
> same bundle.
> I see callservicebean can use the serverbean1 directly, just I want to
> practice the service and service reference concepts :-)
> btw, another question comes out when I am doing practice. Is there any
> attribute or element to tell bluerprint extender the order of bean
> initialization? If there are many beans defined in the same bundle,  
> what
> order will they be initialized?
> Forrest

View raw message