Author: tolusha
Date: 2011-07-05 05:11:22 -0400 (Tue, 05 Jul 2011)
New Revision: 4593
Modified:
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextBinder.java
Log:
EXOJCR-1423: Remove reference from InitialContextBinder
Modified:
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextBinder.java
===================================================================
---
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextBinder.java 2011-07-05
08:49:25 UTC (rev 4592)
+++
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/naming/InitialContextBinder.java 2011-07-05
09:11:22 UTC (rev 4593)
@@ -177,6 +177,25 @@
}
/**
+ * Unbind the Reference with defined name, remove from the bindings list and persists
the rest of references
+ * into the file.
+ *
+ * @param bindName
+ * the Reference's bind name
+ * @throws NamingException
+ * @throws FileNotFoundException
+ * @throws XMLStreamException
+ */
+ public void unbind(String bindName) throws NamingException, FileNotFoundException,
+ XMLStreamException
+ {
+ initialContextInitializer.getInitialContext().unbind(bindName);
+ bindings.remove(bindName);
+
+ saveBindings();
+ }
+
+ /**
* Returns reference associated with defined name.
*
* @param bindName the name on which the reference was binded.
Show replies by date