The Artima Developer Community
Sponsored Link

Jini Forum
jini server

1 reply on 1 page. Most recent reply: May 26, 2004 7:20 AM by Marius Danciu

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Luca

Posts: 1
Nickname: metatron
Registered: Nov, 2003

jini server Posted: Nov 28, 2003 6:27 AM
Reply to this message Reply
Advertisement
Hi i'm a student of Roma 3 University
i have this trouble:
I write a Server jini and, when It runs,it don't execute the command line sign with "***************" in the code below:
package ProgettoJini;
import net.jini.core.entry.*;
import net.jini.lookup.entry.*;
import net.jini.lookup.JoinManager;
import net.jini.lease.*;
import net.jini.core.lookup.*;
import java.io.*;
import net.jini.core.discovery.*;
import java.net.*;
import java.rmi.server.*;
import java.rmi.*;
public class ServerJini implements Interfaccia {
//implementazione del servio mostrato dall'interfaccia
public void ServioHello(){
System.out.println("Jini funziona!!!!!!!!!!!!!!!!!");
}
public static void main(String[] args) throws IOException,MalformedURLException,ClassNotFoundException{
int sPort;
String sHost;
Entry[] att;
att= new Entry[10];
att[1]= new Name("ServerJini");
ServiceID id;
ServiceRegistrar reg;
System.setSecurityManager(new RMISecurityManager());
//descrizione del servizio ServioHello da registrare nel lookup service
// Entry[] attributi;
// attributi = new Entry[1];

long a,b;
a=0; b=1;
try{
LookupLocator look;
look = new LookupLocator("jini://localhost");
sHost =look.getHost();
sPort =look.getPort();
System.out.println("Host del Server "+ sHost );
System.out.println("Porta del Server "+ sPort);
ServerJini Server = new ServerJini();
reg = look.getRegistrar();
System.out.println("kkkkk "); **********************

id = reg.getServiceID();
JoinManager join = new JoinManager(Server,att,id,null,new LeaseRenewalManager());
System.out.println(join);
}
catch (Exception m){
System.out.println(m);
}



}
}

someone know why?
thank you


Marius Danciu

Posts: 5
Nickname: dmarius
Registered: May, 2004

Re: jini server Posted: May 26, 2004 7:20 AM
Reply to this message Reply
are you getting any exception ?
if not, try not to use localhost in the url (jini://localhost). Try use jini://<computer_name>

Flat View: This topic has 1 reply on 1 page
Topic: New Jini Stuff Previous Topic   Next Topic Topic: Urgent, please help! Start Lookup service will auto-exit

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use