You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by pn...@scancoin.se on 2003/12/16 17:20:12 UTC

[MERLIN]How to get a global lookup for services?

Hi,
we are looking a bit closer at the service configuration of Merlin. It seems
that every component get's it's own ServiceManager that provides the
declared dependencies to the component.

Is there a way to look up components at runtime, e.g. by
"container/component", that are not in the ServiceManager? Or is JNDI etc.
used for that?

It seems that in the block.xml you can only override already declared
dependencies, not insert any new ones?

How can you add a dependency after the SM is finished (e.g. when the
configuration on a component is called?)

Thanks

/peter

------------
Peter Neubauer
Software Manager
ScanCoin AB
J�gershillgatan 26
213 75 Malm� /Sweden

Phone:  +46 40 6000 687
mail: pnb@scancoin.se 


Re: [MERLIN]How to get a global lookup for services?

Posted by Stephen McConnell <mc...@apache.org>.
Hi Peter:

See notes in-line.


pnb@scancoin.se wrote:

>Hi,
>we are looking a bit closer at the service configuration of Merlin. It seems
>that every component get's it's own ServiceManager that provides the
>declared dependencies to the component.
>
>Is there a way to look up components at runtime, e.g. by
>"container/component", that are not in the ServiceManager? 
>

No.

The keys handled by the the service manager are aligned directly with 
the @avalon.dependency tags for the component to which the service 
manager is assigned.

>Or is JNDI etc. used for that?
>
>It seems that in the block.xml you can only override already declared
>dependencies, not insert any new ones?
>

Correct.

If you were inserting new deependecies - you would do this at the level 
of the type (i.e. under the xinfo - or equivalent @avalon.dependency). 
If your component needs to aquire something dynamic - then your 
component should be declaring a dependency on some application specific 
finder service.  The implementation of that finder service could do some 
intertesting things with an embedded kernel - but that's another thread.

>How can you add a dependency after the SM is finished (e.g. when the
>configuration on a component is called?)
>

You cannot - you can only get the depedency you declare at the level of 
the type.
This is intentional - if you want to step outside of this constraint you 
need to be thinking about a service that provides the discovery 
semantics that you are thinking of.

What is the "discovery scenario" your dealing with?

Cheers, Steve.


>
>Thanks
>
>/peter
>
>------------
>Peter Neubauer
>Software Manager
>ScanCoin AB
>Jägershillgatan 26
>213 75 Malmö /Sweden
>
>Phone:  +46 40 6000 687
>mail: pnb@scancoin.se 
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/                               |
|------------------------------------------------|





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org