Hi, 

I am trying to do that. here is my code. 

///////////////////////Service Class/////////////

public class Server  implements Hello{

    private  LookupDiscoveryManager ldm = null;

    
    public Server() throws IOException{
        init();
    }
    
    
    @Override
    public String sayHello() {
        // TODO Auto-generated method stub
        return "Hello World";
        
    }
    
    public void init() throws IOException{
        System.out.println("in server main");
        Exporter myExporter = new 
BasicJeriExporter(TcpServerEndpoint.getInstance(0), new BasicILFactory());
        
        // Create a service id as required by the join Manager
        Uuid myuuid = UuidFactory.generate();
        ServiceID myService = new ServiceID(myuuid.getMostSignificantBits(), 
myuuid.getLeastSignificantBits());
        
        //Create the object proxy for use by joiinmanager
        Server myProxy = (Server) myExporter.export(this);
        
        //find the reggie instances
        LookupLocator[] myLocator = new LookupLocator[]{new 
LookupLocator("jini://localhost:8080")};
        
        ldm = new LookupDiscoveryManager(DiscoveryGroupManagement.ALL_GROUPS, 
myLocator,null  );
        
        //Now join them 
    }
    
    public static void main(String[] args) throws IOException {
    }
    
}

/************** *****************/

Now as the Join Manager takes 4 arguments and since I am not using a config 
file .
 How can  I provide  entry attr sets . From the documentation I found that 

"attrSets - array of Entry consisting of the
                     attribute sets with which to register the service"

But with Entry Interface i don't know what to write. 
Please tell what will go in an entry?

Also can I provide the config argument of JoinManager as null?

Regards
Ashutosh Singh


> Date: Thu, 15 Dec 2011 13:00:22 +0000
> Subject: Re: what should be written in a config file for service application?
> From: [email protected]
> To: [email protected]
> 
> Okay so then you don't need to put anything in a configuration file.
> You can hard-code the lot and then come back and do configuration
> later as it makes sense.
> 
> Probably the simplest you can go is to use lookuplocators to find the
> lookup service and register/lookup.
> 
> On 15 December 2011 12:54, Ashutosh Singh <[email protected]> wrote:
> >
> > The  hello example given contains a complicated server with all the smart 
> > proxies and different methods of exporting.
> >
> > So I am just writing a very basic Hello World application that uses a jeri 
> > protocol. No SDM's!.
> >
> >
> >
> >
> >
> >> Date: Thu, 15 Dec 2011 12:47:58 +0000
> >> Subject: Re: what should be written in a config file for service 
> >> application?
> >> From: [email protected]
> >> To: [email protected]
> >>
> >> Are you configuring one of the standard services, one of your own or
> >> one of the examples?
> >>
> >> On 15 December 2011 11:36, Ashutosh Singh <[email protected]> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I am a novice RIVER user?
> >> >
> >> > Can you please tell me what should be written in a config file for a 
> >> > service application?
> >> >
> >> > Regards
> >> > Ashutosh Singh
> >> >
> >
                                          

Reply via email to