mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
03.41.2007 a22acf0c877f931dcce85305b6a5232c805e407b
refs
author jvergara <jvergara@localhost>
Thursday, May 3, 2007 09:41 +0200
committer jvergara <jvergara@localhost>
Thursday, May 3, 2007 09:41 +0200
commita22acf0c877f931dcce85305b6a5232c805e407b
tree 23b08e81b1b84feb35495ba1ef0c001c990c737a tree | zip | gz
parent c09124d6ae9060ea52a6d8bc284140f8ab95fbe9 view | diff
Fix for issues 1231 and 1234 ('start-ds logs are incomplete when we provide an invalid LDAP port' and 'Server should not start when no connection handler can be enabled').

The fix consist of the following parts:

The first part performs a check on the listener values provided if we are not in the mode where we start the server with no connection handlers; it checks whether the listener values can be used or not (and logs an error message if they cannot be used). It also checks if there are two enabled connection handlers using the same listener. Finally checks if there are any connection handlers enabled. If any of the checks above fails we send an exception and the server is not started.

The second part of the fix calls the DirectoryServer.shutDown method instead of the System.exit method. This liberates all the resources cleanly and fixes some stack printed in the output that might appear because some BufferedWriters where closed without control by the JVM when we called System.exit directly. Moreover the message that was logged during the stop of the server made reference to a shutdown caused by a system call and probably generated by an external application or the administrator himself. This message was misleading and using shutDown we clearly state the reason that caused the shutdown. DirectoryServer.bootstrapServer() and DirectoryServer.bootstrapServer() have been called before the call to DirectoryServer.shutDown() so I assume that the call is safe.

Finally the equals and hashCode methods have been overwritten in HostPort class to make them work properly in with the contains methods of the HashSets.

4 files modified
190 ■■■■■ changed files
opends/src/server/org/opends/server/core/DirectoryServer.java 87 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/messages/CoreMessages.java 52 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/types/HostPort.java 32 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/util/SetupUtils.java 19 ●●●● diff | view | raw | blame | history