This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI/CORBA  RSS feed

 
Vedavalli Radhika
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i am having Client program and server program in RMI
I don't want to start rmiregistry on the server,it should be incorporated in the Server prog only
Could u please help me how to incorporate that in the server
prog which is given below what else to be added to the server prog or any where like to(interface prog,Implementation prog,client prog )
import java.rmi.*;
import java.io.*;
public class Server implements Serializable
{
public static void main(String s[]) throws Exception
{
MyFind f=new MyFindImpl();
Naming.rebind("vvv",f);
System.out.println("Server is ready");
}
}
 
Todd M Bush
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you are looking for something like this....
Registry reg = java.rmi.registry.LocateRegistry.createRegistry(port);
MyFind f=new MyFindImpl();
java.rmi.Naming.rebind("vvv",f);
I found this bit of code here. http://developer.java.sun.com/developer/technicalArticles/RMI/rmi/
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!