public void resetNamingContext(NamingContext context) throws NamingException { storageManager.storeNamingContext(context); reloadMBean(context); }
public void resetNamingContext(NamingContext context) throws NamingException { storageManager.storeNamingContext(context); reloadMBean(context); }
public NamingContextInfo[] changeOwner( CompositeName cn, Object formerOwnerId, Object newOwnerId) throws NamingException { Vector updatedContexts = new Vector(); Enumeration idEnum = storageManager.getContextIds(); Enumeration nameEnum = storageManager.getContextNames(); while (idEnum.hasMoreElements()) { NamingContextId ncid = (NamingContextId)idEnum.nextElement(); CompositeName name = (CompositeName)nameEnum.nextElement(); NamingContext nc = getNamingContext(ncid, false); if (nc.getOwnerId().equals(formerOwnerId) && (name.equals(cn) || cn == null)) { nc.setOwnerId(newOwnerId); storageManager.storeNamingContext(nc); updatedContexts.addElement( new NamingContextInfo(nc, name)); reloadMBean(nc); } } NamingContextInfo[] res = new NamingContextInfo[updatedContexts.size()]; updatedContexts.copyInto(res); return res; }
public NamingContextInfo[] changeOwner( CompositeName cn, Object formerOwnerId, Object newOwnerId) throws NamingException { Vector updatedContexts = new Vector(); Enumeration idEnum = storageManager.getContextIds(); Enumeration nameEnum = storageManager.getContextNames(); while (idEnum.hasMoreElements()) { NamingContextId ncid = (NamingContextId)idEnum.nextElement(); CompositeName name = (CompositeName)nameEnum.nextElement(); NamingContext nc = getNamingContext(ncid, false); if (nc.getOwnerId().equals(formerOwnerId) && (name.equals(cn) || cn == null)) { nc.setOwnerId(newOwnerId); storageManager.storeNamingContext(nc); updatedContexts.addElement( new NamingContextInfo(nc, name)); reloadMBean(nc); } } NamingContextInfo[] res = new NamingContextInfo[updatedContexts.size()]; updatedContexts.copyInto(res); return res; }