You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Greg Trasuk <tr...@stratuscom.com> on 2010/03/17 16:53:06 UTC

Re: [Fwd: Re: River question : mailinglist refuses] multicast discovery and Entry updating

On Wed, 2010-03-17 at 10:03, Yannick JENN wrote:
> Hello,
> 
> Both computers are on our LAN and can ordinarily communicate without any 
> problem.
> We just have some router random problems, usually between 2 and 5 sec 
> network breaks.
> 

Jini's all about surviving intermittent network failures, so these
really shouldn't present any problems.

Could you post sample code and configuration files for how you are
registering the services?  I'd like to check whether you're using
JoinManager correctly.

In your earlier post you had said something about registering with one
registrar and having it update the other.  That isn't how the registrars
work.  The do not talk to each other.  Your service is responsible for
registering with all the ServiceRegistrar instances it discovers.  This
functionality is encapsulated for convenience within the JoinManager
class.


Cheers,

Greg.

> We are using multicast discovery, and we don't have any firewall.
> We use DHCP on the Windows XP computer (192.168.1.156), the other is 
> running linux mandriva (192.168.1.28).
> 
> We use jini for 6 years, and I am now trying to understand the jin code 
> for few months.
> 
> 
> Here is our multicast configuration file (mandriva's) :
> 
> import com.sun.jini.discovery.DiscoveryProtocolVersion;
> import java.net.NetworkInterface;
> import net.jini.constraint.BasicMethodConstraints;
> import net.jini.core.constraint.InvocationConstraint;
> import net.jini.core.constraint.InvocationConstraints;
> import net.jini.core.discovery.LookupLocator;
> import net.jini.discovery.DiscoveryGroupManagement;
> import net.jini.jeri.BasicJeriExporter;
> import net.jini.jeri.tcp.TcpServerEndpoint;
> 
> com.sun.jini.reggie {
>     private static networkInterface = NetworkInterface.getByName("eth0");
> 
>     serverExporter = new 
> BasicJeriExporter(ServiceProperties.newServerEndpoint("eth0", 
> "192.168.1.28"),
>                                            new 
> FcRemoteInvocationLayerFactory());
> 
>     initialLookupGroups = DiscoveryGroupManagement.NO_GROUPS;
>     initialLookupLocators = new LookupLocator[] {  };
>     initialMemberGroups = new String[] { "public" };
> 
>     multicastInterfaces = new NetworkInterface[] { networkInterface };
>     unicastDiscoveryHost = "192.168.1.28";
> 
>     constraints = new InvocationConstraints(new InvocationConstraint[] 
> {DiscoveryProtocolVersion.TWO, 
> DiscoveryCircleConstraint.getCurrentDiscoveryCircleConstraint()}, null);
>     discoveryConstraints = new BasicMethodConstraints(constraints);
>     discoveryManager = 
> ServiceRegistrarDiscoveryManager.newServiceRegistrarDiscovery(DiscoveryGroupManagement.NO_GROUPS, 
> null);
>     taskManager = new ServiceTaskManager();
> }
> 
> net.jini.lookup.JoinManager {
>     discoveryManager = 
> ServiceRegistrarDiscoveryManager.newServiceRegistrarDiscovery(DiscoveryGroupManagement.NO_GROUPS, 
> null);
>     taskManager = new ServiceTaskManager();
>     leaseManager = ServiceClientFactory.getServiceLeaseRenewalManager();
> }
> 
> // This lease renewal manager config is for the default LRM, which is 
> replaced
> // in the definition of the JoinManager, by the Module LRM
> net.jini.lease.LeaseRenewalManager {
>     taskManager = new ServiceTaskManager(FcTaskPriority.HIGH);
> }
> 
> Cheers,
> Yannick
> 
> 
> Sim IJskes - QCG a écrit :
> >>>
> >>> I've checked 1 min, 5 min or 10 min later : the entry is never set 
> >>> in soft2.
> >>> How can it be ? Is it normal ?
> >>>   
> >>
> >> What's your network configuration?  Do you have DHCP? Can both 
> >> computers ordinarily contact each other with existing software?  Do 
> >> you have firewalling enabled?
> >
> > Multicast routing? Please send the jini config files.
> >
> > Gr. Sim
> >
-- 
Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.com