brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Heneveld <alex.henev...@cloudsoftcorp.com>
Subject Re: Adding children dynamically within an effector
Date Wed, 14 Jan 2015 15:53:09 GMT

alasdair-

this happens if the child was never managed

this snippet from EntityManagementUtils.java should make it clear:

                 Entity child = (Entity)parent.addChild(spec);
                 Entities.manage(child);
                 children.add(child);

this is a part of the model i've never really liked ... are there any 
use cases which would break if we said Entity.addChild automatically 
manages the child if the parent is managed?

--a


On 14/01/2015 15:34, Alasdair Hodge wrote:
> Devs,
>
> I have a simple entity that acts a bit like a cluster, with an 
> effector that can dynamically add /n/ more child entities (of a known, 
> fixed type). The effector simply invokes addChild() with a configured 
> EntitySpec in the usual way, synchronously. The resulting Brooklyn 
> task completes normally, according to the activity view, but there's 
> no sign of the new child entities.
>
> Manually refreshing the web UI reveals:
>
>
>
> The 'loading' placeholders are never replaced by actual entities.
>
> Any pointers?
> A.
> -- 
> Alasdair Hodge
> Principal Engineer,
> Cloudsoft Corporation
>


Mime
View raw message