Feature/windows service collectors pr#46
Feature/windows service collectors pr#46ReineLindqvist wants to merge 3 commits intogoranschwarz:masterfrom
Conversation
Enable DbxTune collectors and DbxCentral to run as Windows services using Apache Commons Daemon. Adds a WindowsServiceWrapper with start/stop methods that integrate with the existing ShutdownHandler lifecycle, a batch script for service install/uninstall/management, and documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows specifying a Windows account for the service to run as, defaulting to LocalSystem for backward compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Yes that could work! BUT... when I new version of DbxTune is shipped, the list of JAR files is normally changed...
A workaround for this may be to use a So... Not sure this will "fly" to 100% |
Summary
The wrapper hooks into the existing ShutdownHandler lifecycle — start() delegates to the appropriate main() method (which blocks on waitforShutdown()), and stop() calls
ShutdownHandler.shutdown() to signal graceful termination. No changes to the existing shutdown flow were needed.
Usage example:
dbxtune_service.bat install DbxTune__PROD_ASE ase --serviceUser DOMAIN\svcDbx -n config.conf -SPROD_ASE -Usa
dbxtune_service.bat start DbxTune__PROD_ASE
Note
I don't currently have a Windows machine to test this on end-to-end with Procrun. The implementation follows the Procrun jvm mode contract and reuses the existing shutdown infrastructure, but it hasn't been validated against an actual Windows service install/start/stop cycle. Would appreciate a review of the approach and any feedback before testing on a Windows environment.
Maybe need to add support for gMSA.
Test plan