Hello everyone, I would like to give you a feedback on my developments that I made on my GIT copy of the Apache Daemon project (see https://github.com/gchauvet/commons-daemon). My goal is to be able to provide a more homogeneous way of writing a Java service regardless of the host operating system.
Common Changes: - Splitting JAR to a implementation and API jars; - Embedding a fat jar (implementation + api of commons daemon) in jsvc and prunsrv executables with automatic loading in the JVM. Users will only need to add the commons Daemon API as "provided" in their POM; - Support only classes that implement the Daemon interface; - Add a Maven plugin to start / stop Daemon without registring them to the OS; - Take a jar as only valid entry point. The Jar must provide a class implementing the Daemon interface througth the "Daemon-Class" Manifest key; - Supports in addition to the global classpath jars referenced in the Manifest of the Jar; - Cross compilation with Cmake and GCC For Windows 32/64 bit, Linux 32/64 bit (see https://travis-ci.org/gchauvet/commons-daemon). For Linux: - Detection of the jvm.conf file by a recursive search in the Java home. For Windows: - Manage SCM start, pause, continue, stop and shutdown behaviors (to be totally compatible with Daemon interface); - Update of the prunmgr GUI; - Delete commands start(console mode) / stop / pause from prunsrv in favor of Windows system "net" start / stop / pause / continue; - Supports only JNI mode. Left to do (in order) : - Add additinal controls to the prunmgr GUI (in progress); - Implement the signal equivalent on Windows with the RPC MailSlot API; - Test limit cases (in particular timeout, JVM errors); - Complete the Maven plugin to more finely manage the states of the service tested; - Update the documentation; - Call Maven to install the cross-compiled executables in the repositories (doable?); Apart extrema test cases to do and finishing the prunmgr GUI, this version is functional on my Windows 32/64 bits and Linux 32/64bits. I hope to finalize quickly (maybe 2 months, depending of my spare time).I would like to know if my contribution is compatible with the vision of the Apache foundation, and how it could be integrated in the future into the current Daemon project ? Best regards, Guillaume
