Hello, Why do we say extends UnicastRemoteObject in RMI... I have done a RMI program without extending this class...it works perfectly. **** What is the significance of extending this UnicastRemoteObject class.. please do reply me as soon as possible... many thanks, ram...
Extending UnicastRemoteObject is not a requirement; it's just ensures that your subclass will be exported once constructed. You could just as easily code it this way:
Or for that matter, you could call exportObject() in a main(). ------------------ Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
Hi Micheal, Thanks a lot for your reply..I never knew that something like this can be done... What I have done in my program is class XYZ implements RemoteSeriveInterface,Serializable { public void serviceName() throws RemoteException { }
} and when I register the object of the above code it registers perfectly..and it also serves as a remote object...What I am not getting till now is what is the significance of using UnicastRemoteObject ... thanks, ram...
Hello Ram, Are you telling me that , without using UnicastRemoteObject.exportObject(obj), you were able to bind your object in the registry?From your words i get an impression that you are not using UnicastRemoteObject anywhere in your program!! I guess that is not possible!!
Hello manjunath, I have a problem in my m/c... when I workked with an simple RMI prog...without using UnicastRemoteObject it get's registerd with the registry [perfectly..but when I make a remote call ...it is not executing in servers m/c but instead it make a copy of the remote object and the the invocation happens only in that copy... I do not understnad whether it is my m'c problem or not.. When I tried in some other m/c it didnt work..It throwed a exception and the time of runing the server.. anyway thanx for your reply.. bye, ram..
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Gift giving made easy with the permaculture playing cards