In the grace-boot module, you can find two classes to create files that are often useful for process monitoring:
GrailsApplicationPidFileWriter creates a file that contains the application PID (by default, in the application directory with a file name of grails.pid).
GrailsWebServerPortFileWriter creates a file (or files) that contain the ports of the running web server (by default, in the application directory with a file name of grails.port).
By default, these writers are not activated, but you can enable them:
In the META-INF/spring.factories file, you can activate the listener (or listeners) that writes a PID file:
org.springframework.context.ApplicationListener=\
org.grails.boot.context.GrailsApplicationPidFileWriter,\
org.grails.boot.context.web.GrailsWebServerPortFileWriter
In the
grace-bootmodule, you can find two classes to create files that are often useful for process monitoring:GrailsApplicationPidFileWritercreates a file that contains the application PID (by default, in the application directory with a file name of grails.pid).GrailsWebServerPortFileWritercreates a file (or files) that contain the ports of the running web server (by default, in the application directory with a file name of grails.port).By default, these writers are not activated, but you can enable them:
In the
META-INF/spring.factoriesfile, you can activate the listener (or listeners) that writes a PID file: