opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ReadOnlyConfigFileHandler.java
@@ -354,8 +354,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws ConfigException, InitializationException public void openBackend() throws ConfigException, InitializationException { } opendj-server-legacy/src/main/java/org/opends/server/api/Backend.java
@@ -113,8 +113,9 @@ new ConcurrentLinkedQueue<PersistentSearch>(); /** * Configure this backend based on the information in the provided * configuration. * Configure this backend based on the information in the provided configuration. * When the method returns, the backend will have been configured (ready to be opened) but still unable * to process operations. * * @param cfg The configuration of this backend. * @param serverContext The server context for this instance @@ -155,44 +156,51 @@ } /** * Initializes this backend based on the information provided * when the backend was configured. * Opens this backend based on the information provided when the backend was configured. * It also should open any underlying storage and register all suffixes with the server. * * @see #configureBackend * * @throws ConfigException If an unrecoverable problem arises in * the process of performing the * initialization. * @throws ConfigException If an unrecoverable problem arises while opening the backend. * * @throws InitializationException If a problem occurs during * initialization that is not * related to the server * configuration. * @throws InitializationException If a problem occurs during opening that is not * related to the server configuration. */ public abstract void initializeBackend() throws ConfigException, InitializationException; public abstract void openBackend() throws ConfigException, InitializationException; /** * Performs any necessary work to finalize this backend, including * closing any underlying databases or connections and deregistering * any suffixes that it manages with the Directory Server. This may * be called during the Directory Server shutdown process or if a * backend is disabled with the server online. * Performs any necessary work to finalize this backend. The backend must be an opened backend, * so do not use this method on backends where only <code>configureBackend()</code> has been called. * This may be called during the Directory Server shutdown process or if a backend is disabled * with the server online. * It must not return until the backend is closed. * <p> * This method may not throw any exceptions. If any problems are encountered, * then they may be logged but the closure should progress as completely as * possible. * <p> * This method must be called by all overriding methods with * <code>super.finalizeBackend()</code>. */ public void finalizeBackend() public final void finalizeBackend() { for (PersistentSearch psearch : persistentSearches) { psearch.cancel(); } persistentSearches.clear(); closeBackend(); } /** * Performs any necessary work to finally close this backend, particularly * closing any underlying databases or connections and deregistering * any suffixes that it manages with the Directory Server. * <p> * It will be called as final step of <code>finalizeBackend()</code>, * so subclasses might override it. * </p> */ public void closeBackend() { } /** opendj-server-legacy/src/main/java/org/opends/server/backends/BackupBackend.java
@@ -173,7 +173,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() public void openBackend() throws ConfigException, InitializationException { // Create the set of base DNs that we will handle. In this case, it's just @@ -255,9 +255,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); currentConfig.removeBackupChangeListener(this); try opendj-server-legacy/src/main/java/org/opends/server/backends/ChangelogBackend.java
@@ -287,7 +287,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws InitializationException public void openBackend() throws InitializationException { baseDNs = new DN[] { CHANGELOG_BASE_DN }; @@ -304,10 +304,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); try { DirectoryServer.deregisterBaseDN(CHANGELOG_BASE_DN); opendj-server-legacy/src/main/java/org/opends/server/backends/LDIFBackend.java
@@ -114,7 +114,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() public void openBackend() throws ConfigException, InitializationException { // We won't support anything other than exactly one base DN in this @@ -330,7 +330,7 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { backendLock.writeLock().lock(); opendj-server-legacy/src/main/java/org/opends/server/backends/MemoryBackend.java
@@ -162,7 +162,7 @@ /** {@inheritDoc} */ @Override public synchronized void initializeBackend() public synchronized void openBackend() throws ConfigException, InitializationException { // We won't support anything other than exactly one base DN in this @@ -214,7 +214,7 @@ /** {@inheritDoc} */ @Override public synchronized void finalizeBackend() public synchronized void closeBackend() { clearMemoryBackend(); opendj-server-legacy/src/main/java/org/opends/server/backends/MonitorBackend.java
@@ -318,9 +318,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); currentConfig.removeMonitorChangeListener(this); try { @@ -415,8 +414,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws ConfigException, InitializationException public void openBackend() throws ConfigException, InitializationException { // Register with the Directory Server as a configurable component. currentConfig.addMonitorChangeListener(this); opendj-server-legacy/src/main/java/org/opends/server/backends/NullBackend.java
@@ -160,8 +160,7 @@ /** {@inheritDoc} */ @Override public synchronized void initializeBackend() throws ConfigException, InitializationException public synchronized void openBackend() throws ConfigException, InitializationException { baseDNSet = new HashSet<DN>(); for (DN dn : baseDNs) @@ -218,9 +217,8 @@ /** {@inheritDoc} */ @Override public synchronized void finalizeBackend() public synchronized void closeBackend() { super.finalizeBackend(); for (DN dn : baseDNs) { try opendj-server-legacy/src/main/java/org/opends/server/backends/RootDSEBackend.java
@@ -152,7 +152,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws ConfigException, InitializationException public void openBackend() throws ConfigException, InitializationException { ConfigEntry configEntry = DirectoryServer.getConfigEntry(configEntryDN); @@ -289,9 +289,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); currentConfig.removeChangeListener(this); } opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
@@ -354,7 +354,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws ConfigException, InitializationException public void openBackend() throws ConfigException, InitializationException { // Register each of the suffixes with the Directory Server. Also, register // the first one as the schema base. @@ -480,9 +480,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); currentConfig.removeSchemaChangeListener(this); for (DN baseDN : baseDNs) opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
@@ -141,7 +141,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws ConfigException, InitializationException public void openBackend() throws ConfigException, InitializationException { DN configEntryDN = configuration.dn(); @@ -344,9 +344,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); configuration.addTrustStoreChangeListener(this); try opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/BackendImpl.java
@@ -163,7 +163,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() public void openBackend() throws ConfigException, InitializationException { if (mustOpenRootContainer()) @@ -232,9 +232,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); cfg.removeLocalDBChangeListener(this); // Deregister our base DNs. opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendImpl.java
@@ -155,7 +155,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws ConfigException, InitializationException public void openBackend() throws ConfigException, InitializationException { if (mustOpenRootContainer()) { @@ -200,9 +200,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); cfg.removePluggableChangeListener(this); // Deregister our base DNs. opendj-server-legacy/src/main/java/org/opends/server/backends/task/TaskBackend.java
@@ -231,7 +231,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() public void openBackend() throws ConfigException, InitializationException { // Create the scheduler and initialize it from the backing file. @@ -262,9 +262,8 @@ /** {@inheritDoc} */ @Override public void finalizeBackend() public void closeBackend() { super.finalizeBackend(); currentConfig.removeTaskChangeListener(this); try opendj-server-legacy/src/main/java/org/opends/server/core/BackendConfigManager.java
@@ -1025,7 +1025,7 @@ throws ConfigException, InitializationException { backend.configureBackend(cfg, serverContext); backend.initializeBackend(); backend.openBackend(); } } opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java
@@ -2101,7 +2101,7 @@ rootDSEBackend = new RootDSEBackend(); rootDSEBackend.configureBackend(rootDSECfg, serverContext); rootDSEBackend.initializeBackend(); rootDSEBackend.openBackend(); } @@ -2435,7 +2435,7 @@ } rootDSEBackend = new RootDSEBackend(); rootDSEBackend.configureBackend(rootDSECfg, serverContext); rootDSEBackend.initializeBackend(); rootDSEBackend.openBackend(); } opendj-server-legacy/src/main/java/org/opends/server/extensions/ConfigFileHandler.java
@@ -803,7 +803,7 @@ /** {@inheritDoc} */ @Override public void initializeBackend() throws ConfigException, InitializationException public void openBackend() throws ConfigException, InitializationException { // No action is required, since all initialization was performed in the // initializeConfigHandler method. opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServer.java
@@ -473,7 +473,7 @@ try { changelogBackend = new ChangelogBackend(this, domainPredicate); changelogBackend.initializeBackend(); changelogBackend.openBackend(); try { DirectoryServer.registerBackend(changelogBackend); opendj-server-legacy/src/main/java/org/opends/server/tools/EncodePassword.java
@@ -880,7 +880,7 @@ backend.setWritabilityMode(WritabilityMode.INTERNAL_ONLY); try { backend.configureBackend(backendCfg, directoryServer.getServerContext()); backend.initializeBackend(); backend.openBackend(); } catch (Exception e) { LocalizableMessage msg = ERR_CONFIG_BACKEND_CANNOT_INITIALIZE.get(className, backendCfg.dn(), stackTraceToSingleLineString(e)); opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
@@ -840,7 +840,7 @@ memoryBackend = new MemoryBackend(); memoryBackend.setBackendID(backendID); memoryBackend.setBaseDNs(new DN[] {baseDN}); memoryBackend.initializeBackend(); memoryBackend.openBackend(); DirectoryServer.registerBackend(memoryBackend); } opendj-server-legacy/src/test/java/org/opends/server/backends/ChangelogBackendTestCase.java
@@ -1492,7 +1492,7 @@ memoryBackend = new MemoryBackend(); memoryBackend.setBackendID(backendId); memoryBackend.setBaseDNs(new DN[] {baseDN}); memoryBackend.initializeBackend(); memoryBackend.openBackend(); DirectoryServer.registerBackend(memoryBackend); } opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/PluggableBackendImplTestCase.java
@@ -115,7 +115,7 @@ testBaseDN = DN.valueOf("dc=test,dc=com"); backend = createBackend(); backend.initializeBackend(); backend.openBackend(); topEntries = TestCaseUtils.makeEntries( "dn: " + testBaseDN, @@ -800,7 +800,7 @@ } assertEquals(rejectedEntries.size(), 0, "No entries should be rejected"); backend.initializeBackend(); backend.openBackend(); assertEquals(backend.getEntryCount(), ldifNumberOfEntries, "Not enough entries in DIT."); }