On 7/16/07, Simon Laws <[EMAIL PROTECTED]> wrote:
<snip>
How are you thinking this would be done? If the management components are > just regular SCA components that would need some sort of new property > annotation wouldn't it, or are you thinking of just some sort of static > helper ComponentManager.getInstance() type of thing? > Excuse pseudo code but I was thinking something along the lines of the following code added to the activate processing. ComponentReguistry componentRegistry = nodeDomain.getService( ComponentRegistry.class, "ComponentRegistry"); ... for (Component component : domainComposite.getComponents()) { components.put(component.getName(), component); componentRegistry.addComponentModel(component.getName(), component); } Not sure ComponentRegistry is the right management component for your purposes but you get the idea. I am concerned here that we rely on a component that had been declared in the ".node" file. Someone could come along and just delete if from that configuration file. What do we do then? Raise and error? Switch to non distributed mode?
Yeah this doesn't seem perfect yet. So is whats required here something similar to the spec defined @Context annotation which enables a component to get access to the ComponentContext? Something like a Tuscany specific 'system' annotation that any component which you want to be able to do runtime management could use to get hold of the SCADomain instance or some object implementing some runtime management interface (eg the ComponentRegistry in the above example)? ...ant