18 Jan, 2010

1 commit

  • Improve the code of windows service to poll the status of the server (whether is running or not).
    Improve some of the messages associated with the events that are sent to the windows service log.
    Improve the code that is in charge of starting the service (and the server) to help identify cases where the server startup is correctly launched but the startup itself fails (because for instance a port of the server is already in use).
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@6356 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     

20 Mar, 2009

1 commit


16 Jan, 2009

1 commit


11 Nov, 2008

1 commit


07 Nov, 2008

1 commit

  • …ing it configurable).
    
    The fix increases the number of tries used to figure out if the server is started or not.  This is required in particular after reboot since the system can be really loaded.
    
    The user can modify the default tries value (100 tries with an interval of 5 seconds between tries) by setting the value of the OPENDS_WINDOWS_SERVICE_START_NTRIES  environment variable (it must be a SYSTEM environment variable in order to be taken into account).
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@4592 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     

21 Oct, 2008

1 commit


05 Jul, 2008

1 commit


26 May, 2008

1 commit

  • Changes by file:
    
    . resource/admin/example-plugin/ExamplePlugin.java
      - support for messages
      - fix for PluginResult.Startup refactoring
    
    . resource/admin/example-plugin/example_plugin.properties
      - 3 messages used in the example plugin (english/default)
    
    . resource/admin/example-plugin/example_plugin_fr.properties
      - 3 messages used in the example plugin (french)
    
    . resource/admin/example-plugin/build.xml
      - automatic generation of messages from properties files located in
        resource/messages while keeping package name.
        (eg. resource/messages/my/example/example_plugin.properties will
        generate a message class with package name "my.example")
    
    . resource/Messages.java.stub
      - forced underlying properties files to be located in /messages within
        jars file (eg MY_JAR_FILE:/messages/example_plugin.properties)
      - support for messages available from extensions' classloaders
    
    . src/messages/src/org/opends/messages/Message.java
      - typo in javadoc
    
    . build.xml
      - added message template used by generator in the build-tools.jar
      - added the "resource/messages" directory at the root of the example
        plugin
      - added example properties files in the example plugin zipfile
    
    . src/build-tools/org/opends/build/tools/GenerateMessageFile.java
      - stopped assuming messages are targeted in package name
        org.opends.messages
      - template for message class generation now retrieved from the
        build-tools.jar when generating messages for extensions
      - for user messages, set destination files automatically based on the
        source full filename and apply basic pattern
        (eg. source=resource/messages/my/example/example_plugin.properties
        sets destination to
        src-generated/my/example/ExamplePluginMessage.java)
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@4293 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ctissot
     

12 Feb, 2008

1 commit


15 Jan, 2008

1 commit


14 Jan, 2008

1 commit


08 Oct, 2007

1 commit


17 Sep, 2007

1 commit

  • that is part of the Mozilla LDAP SDK for Java.  Also, use this source stub to
    create the org.opends.server.protocols.internal.InternalMozillaLDAPSocketFactory
    class which implements that interface and allows users to more easily use the
    Mozilla LDAP SDK for Java to invoke internal operations in the server.
    
    Note that the source stub is used only to allow our code to compile.  Anyone
    that wants to use the Mozilla LDAP SDK for Java to perform internal operations
    will need to supply the full library containing the LDAP SDK for Java.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@3089 41b1ffd8-f28e-4786-ab96-9950f0a78031
    neil_a_wilson
     

13 Sep, 2007

1 commit


11 Sep, 2007

1 commit

  • improvements, including:
    
    - Replace occurrences of StringBuffer with StringBuilder.  As of Java 5,
      StringBuilder is almost always a better choice than StringBuffer because it
      provides all the same methods but doesn't have the synchronization overhead.
    
    - Update the JE backend DN2URI class (which is responsible for keeping track of
      smart referrals in the database) to keep track of whether there are any
      referrals in the underlying database so that it doesn't go to the DB if it
      can be certain that there aren't any referrals to get.
    
    - Update the JE backend ImportJob class to provide a simple cache for parent ID
      lookups so that it can avoid the need to go to the underlying DB to get the
      entry ID for a parent entry if it's contained in the cache.
    
    - Update the salted password storage scheme variants so that they use an
      instance of java.util.Random rather than java.security.SecureRandom to
      generate the salt.  There really isn't a need for a cryptographic-quality
      random number generator for salt generation, and the java.util.Random
      implementation is much faster than the java.security.SecureRandom
      implementation.
    
    - Update the DN class to return a reference to the precomputed NULL_DN instead
      of creating a new DN with zero RDN components when decoding DNs from strings
      or octet strings.  Also, use LinkedList rather than ArrayList for temporary
      storage of RDN values to avoid the hit of allocating memory that we may not
      need.
    
    
    - Update the Entry class to cache the result of LDIFImportConfig.typesOnly(),
      which has been observed to slightly improve MakeLDIF performance.
    
    - If Java 6 is available, then prefer using it to set file permissions over
      Runtime.exec() on UNIX systems.  Even though it's potentially less
      fine-grained than using exec to call chmod, it's faster and safer to use the
      Java methods if they're available.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@3006 41b1ffd8-f28e-4786-ab96-9950f0a78031
    neil_a_wilson
     

30 Aug, 2007

1 commit


29 Aug, 2007

1 commit


23 Aug, 2007

1 commit


19 Aug, 2007

1 commit

  • A new global property has been added to be able to specify to use a ClassLoader 
    that limits the search of the bundles to the jar containint the Messages class i
    f we are running WebStart setup/upgrader.  This property is only set in the quic
    ksetup.properties file, so the current behavior is preserved for all the other m
    essages files.  The MessageDescriptor constructors have also been modified and n
    ow require a ClassLoader as parameter.  With this modifications we have a ClassL
    oader defined in QuickSetupMessages.java that will only be used if we are runnin
    g QuickSetup.  The JnlpProperties have been moved to SetupUtils so that the mess
    ages classes only depend on classes on the org.opends.server classes that can be
     compiled independently.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2682 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     

16 Aug, 2007

2 commits


15 Aug, 2007

2 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@2643 41b1ffd8-f28e-4786-ab96-9950f0a78031
    davidely
     
  • …ssues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
    
    In general this commit converts any string values that might potentially be shown to an end user (client or administrator) to a new class called Message.  This includes exception messages, error log messages, alert and email text, labels, and CLI output.  Message's main interface includes methods for rendering itself as a string in the default locale using toString() or a specified locale toString(Locale).  In addition to addressing localization, this would allow us to potentially support controls allowing clients to set a preferred locale for server communication or output log messages in different languages.  Message extends CharSequence so it can be used in some places where strings are currently used with not code change (e.g. writing to a buffer) as well as allowing messages to be composed of one another.
    
    In order to create localized messages, instead of adding them to the *Messages.java class, you define them in the corresponding properties files.  In general the property file keys are used to derive the new messages severity, category, and ordinal.  There are directives that can be used in the properties file in order to avoid doing this however.  For instance all the properties files used internally include the 'global.category' directive at the top of the file that instructs the generator to make all the following message belong to a single category.  So for internal messages the property value key will be as follows:
    
       [SEVERITY]_[DESCRIPTION]_[ORDINAL]
    
    See the properties files themselves for more information.
    
    Once your messages are in the properties file you can use the ant target 'generatemessages' to create create MessageDescriptor objects that are referred to in the Java code.  In the code you might think of these objects as replacing the int-valued message IDs.  To create messages you call MessageDescriptor.get() which replaces MessageHandler.getMessage().  It might be helpful then to try to define your messages before referring to them in your code since until you run 'generatemessages' you won't have any Java-code with with to create your message objects.
    
    In order to support non-localizable text in messages (host names, DN's, etc.) Message's can be created from String values by calling Message.raw(String).  In this way it is also possible to circumvent the intention of changing the APIs to use Message objects instead of Strings which is to support writing of localizable messages.  This method is currently used in the code as a crutch for areas of the code that need internationalization (tagged with a 'TODO: i18n' comment).  It might also be used by 3rd party developers that don't intend to localize their products.  However for internal use we should not be using this method to create Messages for text that is locale sensitive.
    
    Additionally this code includes a MessageBuilder that can be used in much the same way that a StringBuilder can be used.  It has a method toMessage() that can be used to generate a message object when needed.  At this time this method just converts the buffer contents to a raw, unlocalizable message so this will need to addressed in the future.
    
    Some other issues:
    
    - While all of the unit tests pass after this commit, there may be issues in the code where we have no or minimal test coverage.  This includes much of the setup and GUI tools packages for which I have not done any testing but will begin after this commit.
    
    - The new message related Java sources are contained in package org.opends.messages and organized in a new module src/module modeled somewhat after the admin module:
    
        src/messages/src (non-generated Java source files)
        src/messages/generated (generated source files)
        src/messages/messages (properties files for messages)
    
    If you run the code from within your IDE you will have to mark all messages/src, messages/generated and messages as source directories.
    
    - To generated the MessageDescriptor files you invoke the 'generatemessages' target.
    
    - If you run the code from within your IDE you will probably ne
    
    - This commit would change the plugin API.  Here are the changes caught by DirectoryServerPluginTestCase:
    
        doShutdown(String)->doShutdown(Message)
    
        doPostDisconnect(PostDisconnectPluginResult,ClientConnection,DisconnectReason,int,String) ->         doPostDisconnect(PostDisconnectPluginResult,ClientConnection,DisconnectReason,Message);
    
    - This commit aligns the entire code-base behind the new Formatter class (printf style formattings like %s) as opposed to the older MessageFormat style (using curly braces for message arguments).  This allows us to provide more type safety for message arguments.  So for instance you can include a %c argument specifier in your format string and the MessageDescriptor will enforce specification of a Character as message creation time.
    
    - Not all of the config framework has not been converted to use Messages.  Perhaps as some point we might have a 'message' syntax for locale-sensitive textural data.  I'm sure Matt will have ideas about this.
    
    - In addition to Message, MessageDescriptor and MessageBuilder, the org.opends.server.message package includes enums for Category and Severity that replace the definitions formerly found in MessageHandler.
    
    - The interface for the ErrorLogger has been simplified to allow logging of messages using a single Message parameter.  The severity and category of the message will be derived from the Message itself instead of specified as arguments when a message is logged.
    
    - I will provide more documentation about this plumbing on the Wiki shortly.
    
    - I will expand on the included tests soon.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2641 41b1ffd8-f28e-4786-ab96-9950f0a78031
    kenneth_suter
     

14 Aug, 2007

1 commit


18 Jul, 2007

1 commit

  • With the new user access control of Vista, even if we are administrators we are not allowed to do certain operations (such as writing in the service registry) in some circumstances.  For instance if we launch net start <service_name> from a normal command prompt this will fail systematically.  In order to be able to execute these "privileged" operations we have different alternatives:
    
    Execute the binary that will do the operations using the "Run as Administrator" option in Vista (or launching them from a command prompt that has been started using that same option).
    Add a manifest to the binary informing that the binary requires administrator privileges.
    
    The first alternative is one of the workarounds for the bug, however it does not apply to the case of the Java Web Start Installer.
    
    The second alternative is in what consists the bug fix.  A new binary has been created.  This binary has a manifest informing that it requires administrator privileges.  This binary will be used in Vista as a wrapper to call operations that require administrator privileges (modifying the registry in windows-services.bat command line and calling "net start" and "net stop").  
    
    If the user is running the setup, the status-panel using the "Run as Administrator" option or is using the command lines from a command prompt launched with that option the behavior in Vista does not change with the behavior in previous versions of Windows.
    
    If the UAC is enabled and the user is not using the "Run as Administrator" options, (s)he will be prompted for confirmation each time the registry is modified and the server is started or stopped as a service.  The wrapper is called on any of the individual operations.  An alternative would be to call the wrapper when we launch the setup or the status-panel but this generates some issues:
    1. This does not work (directly) with the Java Web Start installer.
    2. This would force users that are not administrators to provide administrator credentials even to install/run an OpenDS that does not require to do privileged operations (an OpenDS that does not run as a service).
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2428 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     

16 Jul, 2007

1 commit


04 Jul, 2007

1 commit


28 Jun, 2007

1 commit

  • …ests.  The previous implementation only worked for the default tests and not the precommit or function test definitions.
    
    With this commit:
    
    The following rules apply to the generation of content for test.xml by PrepTestNG:
    
    - For the default test definition, if no group clauses have been specified and the platform is non-Windows and explicit Windows exclusion element is generated.
    - For the default test definition, if group clauses have been specified a Windows exclusion element is generated if the platform is non-Windows and a Windows group clause has not been explicitly provided.
    - The precommit and functional test definitions are always parameterized with an explicit Windows exclusion element if the platform is non-Windows.
    
    Corrected and added to the test framework help generated in build.xml.
    
    I have also cleaned up the formatting of the generated XML with reasonable indentation.
    
    Reenabled TestStaticUtils.testRenameFileLockedTarget() 
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2214 41b1ffd8-f28e-4786-ab96-9950f0a78031
    kenneth_suter
     

27 Jun, 2007

1 commit


20 Jun, 2007

1 commit

  • - Extracted common interface DatabaseContainer from DN2ID, ID2Entry, etc... classes.
    - Moved database read and write methods from EntryContainer to DatabaseContainer.
    - Added index configuration to the XML based admin framework.
    - Removed redundant configuration objects (Config, IndexConfig).
    - Added exclusive/shared lock to EntryContainer. All access to an EntryContainer must acquire a lock before using the internal 
    DatabaseContainers or making configuration changes.
    - Added the ability to add/remove/modify indexes with the backend online. Server will issue rebuild required warning when adding new indexes 
    or sub-indexes (equality, substring, presence...).
    - Added the ability to change the index entry limit for both the backend and each index with the backend online. Server will issue rebuild 
    required warning if the previous limit has been exceeded.
    - Added the ability to change entry compression and index substring length setting while the backend is online.
    - Added a persistent state database to each EntryContainer to persist backend configuration between server restarts. Server will issue 
    rebuild required warning if a new index is added when the backend is offline.
    - Added a trusted flag to indexes so that non existent keys will not be interpreted as an empty entry ID set when an index is untrusted. An 
    index is untrusted when it is added to an non-empty EntryContainer or an inconsistency is detected. Server will issue warning on startup to 
    rebuild the index. 
    - Fixed a issue where the LDIF import process stops responding if the temporary import dir is full or unwritable. 
    
    Fix for issue 1480 1455 1575
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@2135 41b1ffd8-f28e-4786-ab96-9950f0a78031
    boli
     

09 Jun, 2007

1 commit


17 May, 2007

1 commit


15 May, 2007

1 commit

  • - Change the way that we construct the server version number.  This is
      explained in detail at
      https://www.opends.org/wiki/page/TheOpenDSVersionNumber
    
    - Remove the CheckEOLStyle and CheckCopyrightDates ant targets and replace them
      with a single CheckPrecommit target that does both tasks and should be much
      more efficient.  This should prevent out of memory errors on some platforms
      that were experiencing them before.
    
    - Update the build process so that Javadoc generation is no longer part of the
      precommit target.  This has been known to take a significant length of time
      and is unlikely to catch many problems that checkstyle doesn't already
      detect.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1879 41b1ffd8-f28e-4786-ab96-9950f0a78031
    neil_a_wilson
     

08 May, 2007

1 commit


07 May, 2007

2 commits

  • -    debug("Deleting the service '%s'.");
    +    debug("Deleting the service '%s'.", serviceName);
    
    Which was causing the process to core on uninstall.  So I went through the other debug messages, and made a few more changes that most likely wouldn't have caused problems.  For instance,
    
    -      debug("doStartApplication: spawn failed.  Sent command:");
    -      debug(command);
    +      debug("doStartApplication: spawn failed.  Sent command: '%s'", command);
    
    Technically, command could include a format directive (e.g. %s) in which case we'd have the same problem as debug("Deleting the service '%s'."), but this is unlikely.  There are also a few other debug messages that I added to track down the real problem, and I've left them in.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1833 41b1ffd8-f28e-4786-ab96-9950f0a78031
    davidely
     
  • …h stopping the server on Windows, and also adds a lot of debug logging to the service code, so we can track problems down in the future
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1827 41b1ffd8-f28e-4786-ab96-9950f0a78031
    davidely
     

04 May, 2007

1 commit

  • 1. A char array was set to NULL wrongly which caused a core in the windows services code.  This problem appeared almost systematically when the install path was long.
    2. The windows services code got into an infinite loop when the server could not be started.
    3. The windows services code was missing to unlock a file after testing if it could lock it.
    4. Create specific loggers for Setup, Uninstall and StatusPanel applications.  This avoids having duplicated and not very user friendly log lines on the output of these applications.
    5. When we cannot launch the graphical applications store the stack trace we get in the log file associated with the application and inform the user about the existence of this file in the same message where we tell that we are falling back to the CLI mode.
    6. Fix a refresh problem in the status panel.  Now when the number of entries of the database increase the contents of the panel are automatically updated.
    7. Modify the name of the Age of Oldest Missing Changes as mentioned by Brian.
    8. Redirect some logging/debugging lines of the windows services to a file called windows-service in the logs directory.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1821 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     

03 May, 2007

1 commit


26 Apr, 2007

1 commit


24 Apr, 2007

1 commit

  • - Narrow down the set of packages that external developers will need to access
      in order to write a plugin or other type of extension.  Hopefully, for most
      things developers will only need to interact with the following packages (and
      their sub-packages):
      * org.opends.server.admin
      * org.opends.server.api
      * org.opends.server.config
      * org.opends.server.protocols.internal
      * org.opends.server.types
      * org.opends.server.util
    
    - As part of the attempted narrowing of packages that external developers need
      to access, I have moved the org.opends.server.core.Operation and
      org.opends.server.protocols.ldap.LDAPException classes to the
      org.opends.server.types package.  I have also created
      org.opends.server.types.RawAttribute to wrap the
      org.opends.server.protocols.ldap.LDAPAttribute class, and
      org.opends.server.types.RawModification to wrap the
      org.opends.server.protocols.ldap.LDAPModification class.
    
    - I have updated the internal operations API to add a few new convenience
      methods when performing internal operations.
    
    - I have updated all of our message strings so that none of them end in periods
      (except those that end with an ellipsis).  This will help us avoid the
      problem in which we see multiple periods due to embedding one message in
      another.
    
    - I have moved a message file from a synchronizaiton package to the messages
      package and resolved conflicts with existing message IDs.
    
    - I have updated a number of cases in which
      StaticUtils.stackTraceToSingleLineString() was used in client-facing code to
      replace those calls with StaticUtils.getExceptionMessage() instead.  This
      should provide a more user-friendly message that will hopefully not reduce
      our ability to debug problems that may arise.
    
    - I have cleaned up some of the code in the org.opends.server.api package so
      that all of the classes use consistent formatting, and to fix a couple of
      potential Javadoc problems.
    
    - I have moved the build-tools/src directory to src/build-tools to be more
      consistent with other components of the server.
    
    - I have updated the build script so that the xslt task will no longer dump
      lots of output to the terminal when generating code.  I have also gotten rid
      of warnings about run.classpath not being set properly.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1695 41b1ffd8-f28e-4786-ab96-9950f0a78031
    neil_a_wilson