The Java-based server can be installed as a Windows Service, to start automatically whenever your computer boots.
We have installed OpenDJ Community Edition version 4.4 for this tutorial:
-
If necessary, download and
install OpenDJ. We recommend using the Windows MSI installer, which has the option to set up OpenDJ as a Windows Service:
After installation, make sure everything works as you expect.
-
Download and
install
Service Protector, if necessary.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab, in the Service to protect dropdown, select the OpenDJ Server entry:
-
One of our customers experienced a problem where the OpenDJ Java process would grow larger and larger, eventually failing with a hang or an
out of memory error. To avoid this, we suggest recycling the service once a week during a scheduled maintenance window or at a "quiet" time.
To set up a weekly restart, check the At the following times box, click the Add button and specify the time to restart.
Every Sunday at 1 AM works for us:
-
Click the Save button to record your settings. In a few seconds, a new entry will appear in the Service Protector window.
The green shield indicates that Service Protector is already actively monitoring OpenDJ to detect failures:
-
That's it! Next time your computer boots, OpenDJ will start automatically and Service Protector will babysit the service to promptly restart it if it stops for any reason.
We encourage you to edit your OpenDJ entry in Service Protector and browse through the many other settings that may be appropriate for your environment.
For example, send an email when the service fails, run a batch file to clear log files whenever the service stops, and much more.