RMI only accpets on Server Interface
Hi guys...
Well I have a program which 2 interfaces were bind to RMI server, StockServer and PurchaseServer.
The StockServer are works perfectly, but the PurchaseServer not, both interfaces are binding without exceptions, both stub are generated and referenced at runtime without exceptions - I print both stub with the toString method and a non-null value are printed.
But when I try to invoke a remote method from PurchaseServer interface I catch a Connection refused to host 127.0.0.1 as a java.rmi.ConnectException
I know which the RMI server support more than one interfaces at the same time, but why only the first one are work properly?!!?
Thanks all. Its URGENTE!!!!!!
Two different servers on a same host (the localhost in your case) can't
listen to the same port without special precautions. Make both servers
listen to a different port, i.e. at startup of the server, make it create or
get (if a server already existed) a registry by the LocateRegistry
class using a different port number, and all will be fine.
kind regards,
Jos
JosAHa at 2007-7-16 13:04:19 >

HI josAH,
Thanks for the help, but I am using only one rmiregistry server and two server interfaces to bind into it. right now I solve the problem, I mount a list of client ot try send message to the server and all of them works properly...
So I focus on my application and get a reference problem, one of my stub clients was trying to connect to the remote interface before it been completly started. Multithread hard code problems
Thanks all.