Hi,
I'm writing a client/server application using RMI.
The method book ticket calls remote methods.
While
testing the application I noticed that if I stop the server and then call this method errors are
displayed on dos prompt instead of displaying message dialog. Is my logic wrong ?
public void bookTickets(int recordNumber, int seats, int operatingMode) {
:
:
try {
:
:
}
catch (DatabaseException e) {
message = "1" + e.getMessage() ;
JOptionPane.showMessageDialog(null, message, "Book Tickets", JOptionPane.INFORMATION_MESSAGE );
}
catch (RemoteException e) {
message = "2" + e.getMessage() ;
JOptionPane.showMessageDialog(null, message, "Book Tickets", JOptionPane.INFORMATION_MESSAGE );
}
catch (Exception e) {
message = "3" + e.getMessage() ;
JOptionPane.showMessageDialog(null, message, "Book Tickets", JOptionPane.INFORMATION_MESSAGE );
}
}
The error displayed on dos prompt on client side is:
java.rmi.ConnectionIOException: Exception creating connection to 123.123.123.94; nested exception is
java.net.SocketException
Thanks