try {
if (debug) System.out.println("RemoteListenerConnector.handleNotification()");
if (listener == null) {
listener = (RemoteEventListener)Naming.lookup(proxyAddress);
}
listener.handleNotification(evt, h);
} catch (java.rmi.RemoteException ce) {
if (server != null) {
if (debug) System.out.println("RemoteListenerConnector.server.removeNotificationListener("+ (ObjectName)evt.getSource() + ", " + this + ")");
try {
server.removeNotificationListener((ObjectName)evt.getSource(), this);
} catch (javax.management.ListenerNotFoundException e) {
if(debug) System.out.println(toString() + ": " + e); //occurs normally if event was fowarded from J2EEDomain
} catch (Exception e1) {
System.out.println(toString() + ": " + e1);
}
}
} catch (Exception e) {
System.out.println(toString() + ": " + e);
if (debug) {
try {
System.out.println("Naming.list(\"//localhost:1100\")");
String [] names = Naming.list("//localhost:1100");
for(int x=0;x<names.length;x++) {
System.out.println("names["+x+"] = " + names[x]);
}
} catch(Exception e1) {
e1.printStackTrace();
}
}
}