Re: How to talk to a SmartFrog component fromthe outside?

"Olivier Pernet" <[email protected]> Wed, 21 Jun 2006 10:57:55 +0200
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
On 6/21/06, Goldsack, Patrick <[email protected]> wrote:
>
> Indeed, that is the case - the process compound is registered there as
> the way to acccess the host, after that we use SF naming.
>
> So to access a componenet on hist xxx you would add the attribute
> "sfProcessComponentName yyy" to the component you wish to name, then
> find it by using the reference "HOST xxx:yyy", either as a LAZY
> reference in some description, or by calling sfResolve directly on that
> reference.
>
> You can do this without being in a SF deamon.

Yup, that's what we've done as a first try.

> Now if you wish to have a model where a specific component type adds a
> name into the registry (and removes it on termination), extend PrimImpl
> to add that capability into the sfDeploy and sfTerminateWith methods,
> and use this modified Prim. Or define a component which names others and
> add it to description where it is required.
>
> So define
>
> RMIRegisterNamer extends Prim {
>     sfClass ".....NamerClass";
>
>     //name "someName";
>     //component LAZY ...;
> }
>
> Then you can use it in any description
>
> sfConfig extends Compound {
>     aComponent extends ...
>
>     namer extends RMIRegisterNamer {
>         name "myName2;
>         component LAZY aComponent;
>     }
> }
>
> Or somehting along those lines,
>
>
> Patrick

Thanks. We'll probably also use that.

-- 
Olivier Pernet
Summer Student - CERN Openlab

We are the knights who say
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc