2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.config.manager.impl;
10 import com.google.common.collect.Maps;
11 import org.opendaylight.controller.config.api.ConflictingVersionException;
12 import org.opendaylight.controller.config.api.ModuleIdentifier;
13 import org.opendaylight.controller.config.api.RuntimeBeanRegistratorAwareModule;
14 import org.opendaylight.controller.config.api.ValidationException;
15 import org.opendaylight.controller.config.api.annotations.ServiceInterfaceAnnotation;
16 import org.opendaylight.controller.config.api.jmx.CommitStatus;
17 import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
18 import org.opendaylight.controller.config.manager.impl.dependencyresolver.DestroyedModule;
19 import org.opendaylight.controller.config.manager.impl.dependencyresolver.ModuleInternalTransactionalInfo;
20 import org.opendaylight.controller.config.manager.impl.dynamicmbean.DynamicReadableWrapper;
21 import org.opendaylight.controller.config.manager.impl.factoriesresolver.HierarchicalConfigMBeanFactoriesHolder;
22 import org.opendaylight.controller.config.manager.impl.factoriesresolver.ModuleFactoriesResolver;
23 import org.opendaylight.controller.config.manager.impl.jmx.BaseJMXRegistrator;
24 import org.opendaylight.controller.config.manager.impl.jmx.ModuleJMXRegistrator;
25 import org.opendaylight.controller.config.manager.impl.jmx.RootRuntimeBeanRegistratorImpl;
26 import org.opendaylight.controller.config.manager.impl.jmx.TransactionJMXRegistrator;
27 import org.opendaylight.controller.config.manager.impl.osgi.BeanToOsgiServiceManager;
28 import org.opendaylight.controller.config.manager.impl.osgi.BeanToOsgiServiceManager.OsgiRegistration;
29 import org.opendaylight.controller.config.manager.impl.util.LookupBeansUtil;
30 import org.opendaylight.controller.config.manager.impl.util.ModuleQNameUtil;
31 import org.opendaylight.controller.config.spi.Module;
32 import org.opendaylight.controller.config.spi.ModuleFactory;
33 import org.opendaylight.yangtools.yang.data.impl.codec.CodecRegistry;
34 import org.osgi.framework.BundleContext;
35 import org.slf4j.Logger;
36 import org.slf4j.LoggerFactory;
38 import javax.annotation.concurrent.GuardedBy;
39 import javax.annotation.concurrent.NotThreadSafe;
40 import javax.annotation.concurrent.ThreadSafe;
41 import javax.management.InstanceAlreadyExistsException;
42 import javax.management.InstanceNotFoundException;
43 import javax.management.MBeanServer;
44 import javax.management.MBeanServerFactory;
45 import javax.management.ObjectName;
46 import java.util.ArrayList;
47 import java.util.Collection;
48 import java.util.Collections;
49 import java.util.HashMap;
50 import java.util.Iterator;
51 import java.util.LinkedList;
52 import java.util.List;
54 import java.util.Map.Entry;
58 * Singleton that is responsible for creating and committing Config
59 * Transactions. It is registered in Platform MBean Server.
62 public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBean {
63 private static final Logger logger = LoggerFactory.getLogger(ConfigRegistryImpl.class);
65 private final ModuleFactoriesResolver resolver;
66 private final MBeanServer configMBeanServer;
67 private final CodecRegistry codecRegistry;
70 private long version = 0;
72 private long versionCounter = 0;
75 * Contains current configuration in form of {moduleName:{instanceName,read
76 * only module}} for copying state to new transaction. Each running module
77 * is present just once, no matter how many interfaces it exposes.
80 private final ConfigHolder currentConfig = new ConfigHolder();
83 * Will return true unless there was a transaction that succeeded during
84 * validation but failed in second phase of commit. In this case the server
85 * is unstable and its state is undefined.
88 private boolean isHealthy = true;
91 * Holds Map<transactionName, transactionController> and purges it each time
92 * its content is requested.
95 private final TransactionsHolder transactionsHolder = new TransactionsHolder();
97 private final BaseJMXRegistrator baseJMXRegistrator;
99 private final BeanToOsgiServiceManager beanToOsgiServiceManager;
101 // internal jmx server for read only beans
102 private final MBeanServer registryMBeanServer;
103 // internal jmx server shared by all transactions
104 private final MBeanServer transactionsMBeanServer;
106 // Used for finding new factory instances for default module functionality
108 private List<ModuleFactory> lastListOfFactories = Collections.emptyList();
110 @GuardedBy("this") // switched in every 2ndPC
111 private CloseableServiceReferenceReadableRegistry readableSRRegistry = ServiceReferenceRegistryImpl.createInitialSRLookupRegistry();
114 public ConfigRegistryImpl(ModuleFactoriesResolver resolver,
115 MBeanServer configMBeanServer, CodecRegistry codecRegistry) {
116 this(resolver, configMBeanServer,
117 new BaseJMXRegistrator(configMBeanServer), codecRegistry);
121 public ConfigRegistryImpl(ModuleFactoriesResolver resolver,
122 MBeanServer configMBeanServer,
123 BaseJMXRegistrator baseJMXRegistrator, CodecRegistry codecRegistry) {
124 this.resolver = resolver;
125 this.beanToOsgiServiceManager = new BeanToOsgiServiceManager();
126 this.configMBeanServer = configMBeanServer;
127 this.baseJMXRegistrator = baseJMXRegistrator;
128 this.codecRegistry = codecRegistry;
129 this.registryMBeanServer = MBeanServerFactory
130 .createMBeanServer("ConfigRegistry" + configMBeanServer.getDefaultDomain());
131 this.transactionsMBeanServer = MBeanServerFactory
132 .createMBeanServer("ConfigTransactions" + configMBeanServer.getDefaultDomain());
136 * Create new {@link ConfigTransactionControllerImpl }
139 public synchronized ObjectName beginConfig() {
140 return beginConfig(false);
144 * @param blankTransaction true if this transaction is created automatically by
145 * org.opendaylight.controller.config.manager.impl.osgi.BlankTransactionServiceTracker
147 public synchronized ObjectName beginConfig(boolean blankTransaction) {
148 return beginConfigInternal(blankTransaction).getControllerObjectName();
151 private synchronized ConfigTransactionControllerInternal beginConfigInternal(boolean blankTransaction) {
153 final String transactionName = "ConfigTransaction-" + version + "-" + versionCounter;
155 TransactionJMXRegistratorFactory factory = new TransactionJMXRegistratorFactory() {
157 public TransactionJMXRegistrator create() {
158 return baseJMXRegistrator.createTransactionJMXRegistrator(transactionName);
162 Map<String, Map.Entry<ModuleFactory, BundleContext>> allCurrentFactories = Collections.unmodifiableMap(
163 resolver.getAllFactories());
165 // closed by transaction controller
166 ConfigTransactionLookupRegistry txLookupRegistry = new ConfigTransactionLookupRegistry(new TransactionIdentifier(
167 transactionName), factory, allCurrentFactories);
168 SearchableServiceReferenceWritableRegistry writableRegistry = ServiceReferenceRegistryImpl.createSRWritableRegistry(
169 readableSRRegistry, txLookupRegistry, allCurrentFactories);
171 ConfigTransactionControllerInternal transactionController = new ConfigTransactionControllerImpl(
172 txLookupRegistry, version, codecRegistry,
173 versionCounter, allCurrentFactories, transactionsMBeanServer,
174 configMBeanServer, blankTransaction, writableRegistry);
176 txLookupRegistry.registerMBean(transactionController, transactionController.getControllerObjectName());
177 } catch (InstanceAlreadyExistsException e) {
178 throw new IllegalStateException(e);
180 transactionController.copyExistingModulesAndProcessFactoryDiff(currentConfig.getEntries(), lastListOfFactories);
181 transactionsHolder.add(transactionName, transactionController, txLookupRegistry);
182 return transactionController;
189 @SuppressWarnings("PMD.AvoidCatchingThrowable")
190 public synchronized CommitStatus commitConfig(ObjectName transactionControllerON)
191 throws ConflictingVersionException, ValidationException {
192 final String transactionName = ObjectNameUtil
193 .getTransactionName(transactionControllerON);
194 logger.trace("About to commit {}. Current parentVersion: {}, versionCounter {}", transactionName, version, versionCounter);
196 // find ConfigTransactionController
197 Map<String, Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>> transactions = transactionsHolder.getCurrentTransactions();
198 Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry> configTransactionControllerEntry = transactions.get(transactionName);
199 if (configTransactionControllerEntry == null) {
200 throw new IllegalArgumentException(String.format(
201 "Transaction with name '%s' not found", transactionName));
203 ConfigTransactionControllerInternal configTransactionController = configTransactionControllerEntry.getKey();
204 // check optimistic lock
205 if (version != configTransactionController.getParentVersion()) {
206 throw new ConflictingVersionException(
208 "Optimistic lock failed. Expected parent version %d, was %d",
210 configTransactionController.getParentVersion()));
212 // optimistic lock ok
214 CommitInfo commitInfo = configTransactionController.validateBeforeCommitAndLockTransaction();
215 lastListOfFactories = Collections.unmodifiableList(configTransactionController.getCurrentlyRegisteredFactories());
216 // non recoverable from here:
218 return secondPhaseCommit(configTransactionController, commitInfo, configTransactionControllerEntry.getValue());
219 } catch (Throwable t) { // some libs throw Errors: e.g.
220 // javax.xml.ws.spi.FactoryFinder$ConfigurationError
222 logger.error("Configuration Transaction failed on 2PC, server is unhealthy", t);
223 if (t instanceof RuntimeException) {
224 throw (RuntimeException) t;
225 } else if (t instanceof Error) {
228 throw new RuntimeException(t);
233 private CommitStatus secondPhaseCommit(ConfigTransactionControllerInternal configTransactionController,
234 CommitInfo commitInfo, ConfigTransactionLookupRegistry txLookupRegistry) {
236 // close instances which were destroyed by the user, including
237 // (hopefully) runtime beans
238 for (DestroyedModule toBeDestroyed : commitInfo
239 .getDestroyedFromPreviousTransactions()) {
240 toBeDestroyed.close(); // closes instance (which should close
241 // runtime jmx registrator),
242 // also closes osgi registration and ModuleJMXRegistrator
244 currentConfig.remove(toBeDestroyed.getIdentifier());
247 // set RuntimeBeanRegistrators on beans implementing
248 // RuntimeBeanRegistratorAwareModule, each module
249 // should have exactly one runtime jmx registrator.
250 Map<ModuleIdentifier, RootRuntimeBeanRegistratorImpl> runtimeRegistrators = new HashMap<>();
251 for (ModuleInternalTransactionalInfo entry : commitInfo.getCommitted()
253 RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator;
254 if (entry.hasOldModule() == false) {
255 runtimeBeanRegistrator = baseJMXRegistrator
256 .createRuntimeBeanRegistrator(entry.getIdentifier());
258 // reuse old JMX registrator
259 runtimeBeanRegistrator = entry.getOldInternalInfo()
260 .getRuntimeBeanRegistrator();
262 // set runtime jmx registrator if required
263 Module module = entry.getProxiedModule();
264 if (module instanceof RuntimeBeanRegistratorAwareModule) {
265 ((RuntimeBeanRegistratorAwareModule) module)
266 .setRuntimeBeanRegistrator(runtimeBeanRegistrator);
268 // save it to info so it is accessible afterwards
269 runtimeRegistrators.put(entry.getIdentifier(), runtimeBeanRegistrator);
272 // can register runtime beans
273 List<ModuleIdentifier> orderedModuleIdentifiers = configTransactionController.secondPhaseCommit();
274 txLookupRegistry.close();
275 configTransactionController.close();
277 // copy configuration to read only mode
278 List<ObjectName> newInstances = new LinkedList<>();
279 List<ObjectName> reusedInstances = new LinkedList<>();
280 List<ObjectName> recreatedInstances = new LinkedList<>();
282 Map<Module, ModuleInternalInfo> newConfigEntries = new HashMap<>();
285 for (ModuleIdentifier moduleIdentifier : orderedModuleIdentifiers) {
286 logger.trace("Registering {}", moduleIdentifier);
287 ModuleInternalTransactionalInfo entry = commitInfo.getCommitted()
288 .get(moduleIdentifier);
290 throw new NullPointerException("Module not found "
294 ObjectName primaryReadOnlyON = ObjectNameUtil
295 .createReadOnlyModuleON(moduleIdentifier);
297 // determine if current instance was recreated or reused or is new
299 // rules for closing resources:
300 // osgi registration - will be reused if possible.
301 // module jmx registration - will be (re)created every time, needs
303 // runtime jmx registration - should be taken care of by module
305 // instance - is closed only if it was destroyed
306 ModuleJMXRegistrator newModuleJMXRegistrator = baseJMXRegistrator
307 .createModuleJMXRegistrator();
309 OsgiRegistration osgiRegistration = null;
310 AutoCloseable instance = entry.getProxiedModule().getInstance();
311 if (entry.hasOldModule()) {
312 ModuleInternalInfo oldInternalInfo = entry.getOldInternalInfo();
313 DynamicReadableWrapper oldReadableConfigBean = oldInternalInfo.getReadableModule();
314 currentConfig.remove(entry.getIdentifier());
316 // test if old instance == new instance
317 if (oldReadableConfigBean.getInstance().equals(instance)) {
318 // reused old instance:
319 // wrap in readable dynamic mbean
320 reusedInstances.add(primaryReadOnlyON);
321 osgiRegistration = oldInternalInfo.getOsgiRegistration();
323 // recreated instance:
324 // it is responsibility of module to call the old instance -
325 // we just need to unregister configbean
326 recreatedInstances.add(primaryReadOnlyON);
328 // close old osgi registration
329 oldInternalInfo.getOsgiRegistration().close();
332 // close old module jmx registrator
333 oldInternalInfo.getModuleJMXRegistrator().close();
336 // wrap in readable dynamic mbean
337 newInstances.add(primaryReadOnlyON);
339 Module realModule = entry.getRealModule();
341 DynamicReadableWrapper newReadableConfigBean = new DynamicReadableWrapper(
342 realModule, instance, moduleIdentifier,
343 registryMBeanServer, configMBeanServer);
347 newModuleJMXRegistrator.registerMBean(newReadableConfigBean, primaryReadOnlyON);
348 } catch (InstanceAlreadyExistsException e) {
349 throw new IllegalStateException("Possible code error, already registered:" + primaryReadOnlyON,e);
352 // register services to OSGi
353 Map<String, ServiceInterfaceAnnotation> annotationMapping = configTransactionController.getWritableRegistry().findServiceInterfaces(moduleIdentifier);
354 BundleContext bc = configTransactionController.getModuleFactoryBundleContext(
355 entry.getModuleFactory().getImplementationName());
356 if (osgiRegistration == null) {
357 osgiRegistration = beanToOsgiServiceManager.registerToOsgi(
358 newReadableConfigBean.getInstance(), moduleIdentifier, bc, annotationMapping);
360 osgiRegistration.updateRegistrations(annotationMapping, bc, instance);
363 RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator = runtimeRegistrators
364 .get(entry.getIdentifier());
365 ModuleInternalInfo newInfo = new ModuleInternalInfo(
366 entry.getIdentifier(), newReadableConfigBean, osgiRegistration,
367 runtimeBeanRegistrator, newModuleJMXRegistrator,
368 orderingIdx, entry.isDefaultBean());
370 newConfigEntries.put(realModule, newInfo);
373 currentConfig.addAll(newConfigEntries.values());
376 version = configTransactionController.getVersion();
378 // switch readable Service Reference Registry
379 this.readableSRRegistry.close();
380 this.readableSRRegistry = ServiceReferenceRegistryImpl.createSRReadableRegistry(
381 configTransactionController.getWritableRegistry(), this, baseJMXRegistrator);
383 return new CommitStatus(newInstances, reusedInstances,
391 public synchronized List<ObjectName> getOpenConfigs() {
392 Map<String, Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>> transactions = transactionsHolder
393 .getCurrentTransactions();
394 List<ObjectName> result = new ArrayList<>(transactions.size());
395 for (Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry> configTransactionControllerEntry : transactions
397 result.add(configTransactionControllerEntry.getKey().getControllerObjectName());
403 * Abort open transactions and unregister read only modules. Since this
404 * class is not responsible for registering itself under
405 * {@link org.opendaylight.controller.config.api.ConfigRegistry#OBJECT_NAME}, it will not unregister itself
409 public synchronized void close() {
410 // abort transactions
411 Map<String, Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>> transactions = transactionsHolder
412 .getCurrentTransactions();
413 for (Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry> configTransactionControllerEntry : transactions
416 ConfigTransactionControllerInternal configTransactionController = configTransactionControllerEntry.getKey();
418 configTransactionControllerEntry.getValue().close();
419 configTransactionController.abortConfig();
420 } catch (RuntimeException e) {
421 logger.warn("Ignoring exception while aborting {}",
422 configTransactionController, e);
426 // destroy all live objects one after another in order of the dependency
428 List<DestroyedModule> destroyedModules = currentConfig
429 .getModulesToBeDestroyed();
430 for (DestroyedModule destroyedModule : destroyedModules) {
431 destroyedModule.close();
433 // unregister MBeans that failed to unregister properly
434 baseJMXRegistrator.close();
435 // remove jmx servers
436 MBeanServerFactory.releaseMBeanServer(registryMBeanServer);
437 MBeanServerFactory.releaseMBeanServer(transactionsMBeanServer);
445 public long getVersion() {
453 public Set<String> getAvailableModuleNames() {
454 return new HierarchicalConfigMBeanFactoriesHolder(
455 resolver.getAllFactories()).getModuleNames();
462 public boolean isHealthy() {
472 public Set<ObjectName> lookupConfigBeans() {
473 return lookupConfigBeans("*", "*");
480 public Set<ObjectName> lookupConfigBeans(String moduleName) {
481 return lookupConfigBeans(moduleName, "*");
488 public ObjectName lookupConfigBean(String moduleName, String instanceName)
489 throws InstanceNotFoundException {
490 return LookupBeansUtil.lookupConfigBean(this, moduleName, instanceName);
497 public Set<ObjectName> lookupConfigBeans(String moduleName,
498 String instanceName) {
499 ObjectName namePattern = ObjectNameUtil.createModulePattern(moduleName,
501 return baseJMXRegistrator.queryNames(namePattern, null);
508 public Set<ObjectName> lookupRuntimeBeans() {
509 return lookupRuntimeBeans("*", "*");
516 public Set<ObjectName> lookupRuntimeBeans(String moduleName,
517 String instanceName) {
518 if (moduleName == null) {
521 if (instanceName == null) {
524 ObjectName namePattern = ObjectNameUtil.createRuntimeBeanPattern(
525 moduleName, instanceName);
526 return baseJMXRegistrator.queryNames(namePattern, null);
530 public void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException {
531 ObjectNameUtil.checkDomain(objectName);
532 ObjectNameUtil.checkType(objectName, ObjectNameUtil.TYPE_MODULE);
533 String transactionName = ObjectNameUtil.getTransactionName(objectName);
534 if (transactionName != null) {
535 throw new IllegalArgumentException("Transaction attribute not supported in registry, wrong ObjectName: " + objectName);
537 // make sure exactly one match is found:
538 LookupBeansUtil.lookupConfigBean(this, ObjectNameUtil.getFactoryName(objectName), ObjectNameUtil.getInstanceName(objectName));
541 // service reference functionality:
543 public synchronized ObjectName lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName, String refName) {
544 return readableSRRegistry.lookupConfigBeanByServiceInterfaceName(serviceInterfaceQName, refName);
548 public synchronized Map<String, Map<String, ObjectName>> getServiceMapping() {
549 return readableSRRegistry.getServiceMapping();
553 public synchronized Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName) {
554 return readableSRRegistry.lookupServiceReferencesByServiceInterfaceName(serviceInterfaceQName);
558 public synchronized Set<String> lookupServiceInterfaceNames(ObjectName objectName) throws InstanceNotFoundException {
559 return readableSRRegistry.lookupServiceInterfaceNames(objectName);
563 public synchronized String getServiceInterfaceName(String namespace, String localName) {
564 return readableSRRegistry.getServiceInterfaceName(namespace, localName);
568 public void checkServiceReferenceExists(ObjectName objectName) throws InstanceNotFoundException {
569 readableSRRegistry.checkServiceReferenceExists(objectName);
573 public ObjectName getServiceReference(String serviceInterfaceQName, String refName) throws InstanceNotFoundException {
574 return readableSRRegistry.getServiceReference(serviceInterfaceQName, refName);
578 public Set<String> getAvailableModuleFactoryQNames() {
579 return ModuleQNameUtil.getQNames(resolver.getAllFactories());
583 public String toString() {
584 return "ConfigRegistryImpl{" +
585 "versionCounter=" + versionCounter +
586 ", version=" + version +
592 * Holds currently running modules
596 private final Map<ModuleIdentifier, ModuleInternalInfo> currentConfig = new HashMap<>();
599 * Add all modules to the internal map. Also add service instance to OSGi
602 public void addAll(Collection<ModuleInternalInfo> configInfos) {
603 if (currentConfig.size() > 0) {
604 throw new IllegalStateException(
605 "Error - some config entries were not removed: "
608 for (ModuleInternalInfo configInfo : configInfos) {
613 private void add(ModuleInternalInfo configInfo) {
614 ModuleInternalInfo oldValue = currentConfig.put(configInfo.getIdentifier(),
616 if (oldValue != null) {
617 throw new IllegalStateException(
618 "Cannot overwrite module with same name:"
619 + configInfo.getIdentifier() + ":" + configInfo);
624 * Remove entry from current config.
626 public void remove(ModuleIdentifier name) {
627 ModuleInternalInfo removed = currentConfig.remove(name);
628 if (removed == null) {
629 throw new IllegalStateException(
630 "Cannot remove from ConfigHolder - name not found:" + name);
634 public Collection<ModuleInternalInfo> getEntries() {
635 return currentConfig.values();
638 public List<DestroyedModule> getModulesToBeDestroyed() {
639 List<DestroyedModule> result = new ArrayList<>();
640 for (ModuleInternalInfo moduleInternalInfo : getEntries()) {
641 result.add(moduleInternalInfo.toDestroyedModule());
643 Collections.sort(result);
651 * Holds Map<transactionName, transactionController> and purges it each time its
652 * content is requested.
655 class TransactionsHolder {
657 * This map keeps transaction names and
658 * {@link ConfigTransactionControllerInternal} instances, because platform
659 * MBeanServer transforms mbeans into another representation. Map is cleaned
660 * every time current transactions are requested.
662 @GuardedBy("ConfigRegistryImpl.this")
663 private final Map<String /* transactionName */,
664 Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>> transactions = new HashMap<>();
667 * Can only be called from within synchronized method.
669 public void add(String transactionName,
670 ConfigTransactionControllerInternal transactionController, ConfigTransactionLookupRegistry txLookupRegistry) {
671 Object oldValue = transactions.put(transactionName,
672 Maps.immutableEntry(transactionController, txLookupRegistry));
673 if (oldValue != null) {
674 throw new IllegalStateException(
675 "Error: two transactions with same name");
680 * Purges closed transactions from transactions map. Can only be called from
681 * within synchronized method. Calling this method more than once within the
682 * method can modify the resulting map that was obtained in previous calls.
684 * @return current view on transactions map.
686 public Map<String, Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>> getCurrentTransactions() {
687 // first, remove closed transaction
688 for (Iterator<Entry<String, Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>>> it = transactions
689 .entrySet().iterator(); it.hasNext(); ) {
690 Entry<String, Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>> entry = it
692 if (entry.getValue().getKey().isClosed()) {
696 return Collections.unmodifiableMap(transactions);