public void addNamingListener(EventContext context, Name target, int scope, NamingListener l) throws NamingException, RemoteException { edelegate.addNamingListener(context, target, scope, l); } public void removeNamingListener(NamingListener l) throws NamingException,
public void addNamingListener(Name target, int scope, NamingListener l) throws NamingException { if((naming instanceof NamingEvents) == false) { Class<?> cls = naming.getClass(); String cs = cls.getName() + ", CS:"+ cls.getProtectionDomain().getCodeSource().toString(); throw new UnsupportedOperationException("Naming implementation does not support NamingExt, : "+cs); } NamingEvents next = (NamingEvents) naming; try { next.addNamingListener(this, target, scope, l); } catch (RemoteException e) { CommunicationException ce = new CommunicationException("addNamingListener failed"); ce.initCause(e); } }