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

jvergara
22.30.2007 06779fb942a83a58766c73da4575f97050c38f48
refs
author jvergara <jvergara@localhost>
Thursday, February 22, 2007 10:30 +0100
committer jvergara <jvergara@localhost>
Thursday, February 22, 2007 10:30 +0100
commit06779fb942a83a58766c73da4575f97050c38f48
tree 8a765e934f56e66c731ec89115e2525ac564d219 tree | zip | gz
parent 862a04b6dd5667ae1ffa3355f0d206d39e0442d5 view | diff
Fix for Issues #1025 and #1248 ('stop-ds.bat should be able to stop server even 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.
4 files added
10 files modified
1205 ■■■■■ changed files
opendj-sdk/opends/build-tools/src/windows/README 72 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/build-tools/src/windows/winlauncher.c 561 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/build-tools/src/windows/winlauncher.h 37 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/lib/winlauncher.exe diff | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/QuickSetup.java 35 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties 53 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/DirectoryManagerAuthenticationDialog.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallCli.java 305 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java 10 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java 4 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UserUninstallData.java 42 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/StatusPanelController.java 65 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/resources/Resources.properties 7 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/ui/LoginDialog.java 12 ●●●● diff | view | raw | blame | history