RipeRMI server closes down immediatly

70 views
Skip to first unread message

kit...@gmail.com

unread,
Jun 22, 2015, 4:39:00 AM6/22/15
to js...@googlegroups.com
I have made a project that uses RipeRMI. But when I want to run my server, it simply finishes the execution, and the server runs no more (then of course my client can't get hold of it).

This is what I execute from my main method:
try
{
CallHandler callHandler = new CallHandler();
ClientImplementation cIpml = new ClientImplementation();
OrderImplementation oImpl = new OrderImplementation();

callHandler.registerGlobal(ClientImplementation.class,
 cIpml);
callHandler.registerGlobal(OrderImplementation.class, oImpl);
Server server = new Server();

server.bind(Constant.RMI_PORT, callHandler);
server.addServerListener(new IServerListener() {

   @Override
   public void clientDisconnected(Socket socket) {
    clientDisconnected(socket);
       System.out.println("Client Disconnected: " + socket.getInetAddress());
   }

   @Override
   public void clientConnected(Socket socket) {
    clientConnected(socket);
       System.out.println("Client Connected: " + socket.getInetAddress());
   }
   
});
System.out.println("Server Listening");
} catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}

What causes this problem? Are there any tutorials on how to use RipeRMI (or LipeRMI) anywhere? Any example projects to download?
Reply all
Reply to author
Forward
0 new messages