Re: How to talk to a SmartFrog component fromthe outside?
"Goldsack, Patrick" <[email protected]> Wed, 21 Jun 2006 09:44:38 +0100
| Newsgroups | gmane.comp.java.smartfrog.devel |
|---|---|
| Message-ID | <[email protected]> |
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.
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
-----Original Message-----
From: smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
Olivier Pernet
Sent: 20 June 2006 18:52
To: Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [Smartfrog-developer] How to talk to a SmartFrog component
fromthe outside?
On 6/20/06, Guijarro, Julio <[email protected]> wrote:
> As Steve mentioned you would need to find the RMI reference to that
> component and then you will be able to invoke any method exported by
> that component using RMI (create a remote interface and export the
> interface using RMI).
>
> To locate a SmartFrog component from a java application you can use
> the SmartFrog locator to find a ProcessCompound and then use the
> ProcessCompound to find the final component.
[...]
Is there a way to access the component without using Smartfrog, with raw
RMI ?
This would remove the dependency on SmartFrog for clients, which would
be nice.
Using a Naming.list("//host:3800") call we found that only the
RootProcessCompound was registered in the naming service. Can we change
this ?
I reckon that the SmartFrog naming service is much more powerful, but
this would make the client's job a tad bit simpler.
--
Olivier Pernet
We are the knights who say
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc
_______________________________________________
Smartfrog-developer mailing list
Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-developer