Sunday Feb 13, 2011

GlassFish deploy using REST. Get it? No, Post it!

The RESTful admin interface for GlassFish was introduced with the release of version 3.0, back in December 2009 but it seems that most people still see it as a monitoring tool only. Jason has just POSTed a blog entry on how to deploy applications to GlassFish using cURL to prove it's more than that.
To explore many more possibilities, just point your browser to http://localhost:4848/management/domain/

Original photo from http://www.flickr.com/photos/neezhom/4323903163/

While this entry details the options for a proper POST request with cURL to deploy or undeploy a WAR file, any HTTP client will do and that is what makes this RESTful admin interesting - there is virtually no software to install on the client admin side. In GlassFish 3.1, this feature has been enhanced both in terms of API (well, URI really) and implementation.

If you add to the mix the asadmin CLI, JMX, and the often-appraised web console, you can really pick your weapon of choice!