Self executing war files

Easy installation: Just java -jar hudson.war, or deploy it in a servlet container. No additional install, no database.

This is what I just read from the hudson's website this morning.
If it is so easy to run an application everyone wants to try it. So I did: just downloaded and run. It took 5 minutes, and it kept the promise.
No database: for simple applications there are many alternatives to require the user to install a database and to configure it: flat files, embedded database, sometime a source control management (cvs/svn) could apply, etc.

I just looked some details, I see that hudson is using maven to get packaged into this hybrid war-jar. Looking inside you can see that there is a Main.class in the root of the war (and a JNLPMain.class that surely is used for Java WebStart) and a servlet engine called winstone.jar at the same level. Cool: the container is also contained!
Also winstone is built with maven.
I've not looked in detail how the magic is done, but after a quick run, it seems that the main class, unpacks the war (~/.hudson) and then runs the servlet engine against the unpacked application itself.
Also it would be interesting to see how the maven pom file of hudson looks like to realize this.

Some days ago I noticed that jetty is capable to run war files in similar way: it's called Jetty Runner.

I am sure that this magic can be done also with jetty.

That's how things should be! I can't tell you how many weeks are needed, and how many persons, to deploy the application that I am working on now...


One Response to “Self executing war files”  

  1. 1 Ken Lee

    Hi Luigi,

    But i would reckon this would only be used for demos, presentations instead of production based apps. Since each web-app will run on its on container, and your server may have multiple apps. But nevertheless a really convenient way to deploy standalone apps.

    Ken.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



Calendar

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening