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).
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?