experiences from the field and basic observations on other cloud deployments

Spring Bootloader: Part 1

On a recent project, I was asked to write a wrapper for GemFire to make it Spring enabled. We did this so we could deploy custom applications using Spring Data GemFire as an extension to GemFire proper. We could also use other Spring conventions when talking to a database as a typical L2 cache using POJOs to map the data into GemFire. So I went down the path of doing a typical Java application that loads Spring in the main method.

cache.properties

Although this code will run, it is not very clean. To run on a typical Linux machine there is no log location, no pid file, no init script. Oh, and don’t even me started if I wanted to run this as a service on Windows. Enter

apache-commons-daemon

Our modified file is located here GemFireRunner.java. Running this file will now run in a properly contained Thread using Runnable and we have a number of facilities at our disposal. To verify everything is running properly you should see the following when you run the class.