21 Mar, 2007

1 commit


16 Mar, 2007

1 commit


15 Mar, 2007

1 commit

  • The following changes are targeted to be able to run OpenDS as a windows 
    service.
    
    The idea is to be able to run OpenDS to run as a service and to be able 
    also to disable this feature.
    
    The setup has been updated to run OpenDS as a service in windows (which 
    is the standard behavior in this platform).  The uninstall has also been 
    updated to remove all references to OpenDS in the Registry and in the 
    list of services once OpenDS has been uninstalled.
    
    A new executable (opends_service.exe) has been added to be able to 
    perform all the tasks that require native code 
    (registering/unregistering the service, sending events to the event log, 
    etc.).  Most of the code required by this executable is in the file 
    service.c.  The README file has been updated and a Makefile file 
    provided to generate all the executables.
    
    A new command line has been added: windowsservice.bat.  The usage of 
    this command line is the following one:
    
    This utility may be used to configure OpenDS as a Windows service.
    Usage:  windowsservice {options}
                  where {options} include:
    -e  or   --enableService
         Enables OpenDS as a Windows service.
    -d  or   --disableService
         Disables OpenDS as a Windows service and stops the server
    -s  or   --serviceState
         Provides information about the state of OpenDS as a Windows service.
    -H  or   --help
         Display this usage information.
    
    The class associated with this command line (ConfigureWindowsService) 
    uses opends_service.exe.  ConfigureWindowsService is basically a wrapper 
    that allows to have the messages displayed to the user in the Java code 
    (and so to minimize what is done by the native code).
    
    
    Some changes have been made in the start-ds(.bat) and stop-ds(.bat) 
    scripts by extending what the --checkStartability (in DirectoryServer 
    class) and --checkStoppability (in StopDS class) do.  I think that it is 
    a good idea to have all the parsing of the arguments into the java code 
    (specially considering the limitations of the .bat files).  So I have 
    moved most of the parsing to the java code so that the is the java code 
    that provides a return code to the scripts to tell them what to do 
    (start the server in detach mode, stop the server using a system call, 
    stop the server using protocol, etc.).
    
    In the particular case of how start-ds.bat and stop-ds.bat have been 
    updated to manage the case where the server must be started using the 
    system call 'net start <service_name>' and 'net stop <service_name>'. 
    --checkstoppability and --checkstartability tell whether the server must 
    be stopped/started directly with a system call (or stopped using LDAP 
    protocol) or using the Windows Service system.  If it is the latter the 
    bat files use two new auxiliary classes (StopWindowsService and 
    StartWindowsService).  These classes figure out the service name 
    associated with the OpenDS instance and call net stop (or net start) 
    using that service name.
    
    When net start/net stop are called start-ds.bat (or stop-ds.bat) are 
    called.  The Windows Services have been configured to call start-ds.bat 
    and stop-ds.bat with some particular options (--windowsNetStart and 
    --windowsNetStop) to identify the case where we must start/stop the 
    server directly (and so not having an infinite recursive loop of calls 
    to net start/net stop).
    
    In order to have the same user experience when the server is configured 
    to run as a service and when is not the tool class WaitForDelete has 
    also been updated to write its output to a file.  This has been done 
    because piping from the standard output to a file in the context of a 
    Windows Service call does not seem to work properly.  So now 
    WaitForDelete has a new option --outputFile.
    
    setup --cli on windows has a new option '-n' or '-noWindowsService' to allow not to enable the windows service.  When run in interactive mode and this options is not specified the user will systematically be asked whether to enable the windows service or not. 
    
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1418 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     

01 Mar, 2007

1 commit

  • …atically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete. 
    
    - Removed debugEnter and debugConstructor from all source files.
    - Removed CLASS_NAME static string for debug purposes.
    - Removed old debug logging framework.
    - Added new debug logging frameworking using AOP.
    - Added AspectJ binary and libraries.
    - Change all modified files copyrights to include 2007.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1280 41b1ffd8-f28e-4786-ab96-9950f0a78031
    boli
     

22 Feb, 2007

1 commit

  • …if LDAP port' and 'cannot stop server through status panel').
    
    The goal of these changes is to be able to have exactly the same user interface in Windows and Unix to stop the server.  In windows we force the user to provide LDAP credentials even if the command is going to be run locally.  The goal is to allow to stop the server using only system credentials (as we do in UNIX) when the user does not provide arguments when calling stop-ds.bat.
    
    In order to do this I have written some native code.  This native code is called when we start the server to:
    1. Launch the java process and get the associated PID.
    2. Create a server.pid file as we do for UNIX systems to store the PID of the process.
    
    The native code that stops the server reads the PID file contents and tries to stop the process associated with the PID.
    
    In order to allow the users to be able to build the product with independence of the platform, the binaries will be included with the source code.  The code used to generate these binaries will also be provided.
    
    I have generated 1 executable called winlauncher.exe.  The binaries will be committed in the source tree under lib (with activation.jar and mail.jar).  They will also be installed under <server root>\lib.
    
    The native code is in the files winlauncher.c and winlauncher.h.  These files are placed under the new directory build-tools/src/windows.
    
    I have tried to keep the native code simple and leave as much logic as I could into the batch files (for instance everything related to the discovery of the java binaries) so that the administrators can play with them.
    
    A README file has been also been included to explain how to generate the binaries.
    
    Extras:
    When we call start-ds from the command line, the server will not stop when the command prompt window is closed (unless start-ds was called to run in not-detached mode).  The next step is to register DS as a service to avoid the server to be stopped when the user logs out.
    
    When we call setup (with no arguments) or the statuspanel the generated process (and windows) will no longer get killed when the command prompt window is killed.
    
    When the user double-clicks on the setup.bat or the statuspanel.bat files, the command prompt window only appears briefly.  Today when we do this a command prompt window stays open until we close setup or the status panel window.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@1216 41b1ffd8-f28e-4786-ab96-9950f0a78031
    jvergara
     

17 Dec, 2006

1 commit


28 Jun, 2006

1 commit