/* */
/* */ public synchronized void unregisterConnectionFactory(String uniqueName, boolean supportsFailover, boolean supportsLoadBalancing)
/* */ throws Exception
/* */ {
/* 239 */ log.trace("ConnectionFactory " + uniqueName + " being unregistered");
/* 240 */ ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)this.endpoints.remove(uniqueName);
/* */
/* 243 */ if (endpoint == null)
/* */ {
/* 245 */ throw new IllegalArgumentException("Cannot find endpoint with name " + uniqueName);
/* */ }
/* */
/* 248 */ JNDIBindings jndiBindings = endpoint.getJNDIBindings();
/* */ Iterator i;
/* 250 */ if (jndiBindings != null)
/* */ {
/* 252 */ List jndiNames = jndiBindings.getNames();
/* 253 */ for (i = jndiNames.iterator(); i.hasNext(); )
/* */ {
/* 255 */ String jndiName = (String)i.next();
/* 256 */ this.initialContext.unbind(jndiName);
/* 257 */ log.debug(jndiName + " unregistered");
/* */ }
/* */ }
/* */
/* 261 */ if (trace) log.trace("Removing delegate from delegates list with key=" + uniqueName + " at serverPeerID=" + this.serverPeer.getServerPeerID());
/* */
/* 263 */ ConnectionFactoryDelegate delegate = (ConnectionFactoryDelegate)this.delegates.remove(uniqueName);
/* */
/* 265 */ if (delegate == null)
/* */ {
/* 267 */ throw new IllegalArgumentException("Cannot find factory with name " + uniqueName);
/* */ }
/* */
/* 270 */ if (this.replicator != null)
/* */ {
/* 272 */ if (!this.replicator.remove("CF_" + uniqueName))
/* */ {
/* 274 */ throw new IllegalStateException("Cannot find replicant to remove: CF_" + uniqueName);
/* */ }
/* */
/* */ }
/* */
/* 279 */ Dispatcher.instance.unregisterTarget(endpoint.getID(), endpoint);
/* */ }