Saturday, October 10, 2009

Just bundle it..

I used to work at the operations department. These days I work in the software development department. So I'm in a situation where I deliver products to my old co-workers and because of this I usually think an extra step when it's time for product delivery. I want the product to install smoothly and any upgrades should be simple to perform. Finding bugs/problems during deployment is never fun. Service windows are short.

For the application I'm working on right now I'm toying with the thought of bundling everything in the war-file. What we have is a fairly simple web application with a number of servlets, service classes etc. There are also a number of batch jobs and some JMX MBeans and it's all wired up so that it relies on the application server providing a transaction handler. There are also a ton of configuration strings stored in the database and sprinkled out through a few configuration files.

I'm thinking it would be cool, and possibly useful, to distribute a self-contained war file that comes with it's own datasources and transaction handler (Atomikos), it's own batch processing stuff (Quartz) and a built in JMX-server (not sure which one to use) and the whole thing even comes with a built in servlet engine (Winstone) With all of that in place the operation staff only has to do the following to run it

$ java -jar application.war


Possibly with a few added environment variables to point out external configuration files. Things like database URLs, usernames, passwords, AJP ports etc are probably best left outside the war file.

If I was still in operations I would be delighted to see an application designed like this. I know Hudson (CI software) works like this and I think it's really neat.

0 comments: