Using the GlassFish Update Center to reach out to thousands of developers

The GlassFish Update Center is a tool that lets you deploy extra features, libraries, or even applications to an existing installation in a very user-friendly fashion. It is part of every copy of GlassFish, Sun Java System Application Server and the Java EE 5 SDK (3.5M+ downloads). The following describes the simplest GlassFish Update Center module who's only job is to deploy a self-contained web application (no database dependency in particular).

To follow-up on a previous post, I'll use XWiki which has since hit version 1.0 with 1.1.1 being the latest. I've tweaked their WAR distribution to use HSQL (as already described in the previous post) so that it has no dependency on external resources. Making this XWiki distribution available via the GlassFish Update Center requires 2 easy steps:

1/ Package the WAR artifact into a module file (default extension is .nbm but anything can be used as it is really only a ZIP file) with info/info.xml and module/xwiki.war as the only two entries. I've actually called the file xwiki.gfz for no particular reason and posted it here.

2/ Author an Update Center catalog file compliant with this DTD describing the module - download size, module author, license, short/long description, etc... This XML file is the only server-side component needed. I've created and posted the file here (so you can try it). The key line here is :
     Module-Type="APPLICATION"
which basically tells the update center that the module is a Java EE artifact (WAR, EAR, RAR) which will cause the updater to copy it to GlassFish's autodeploy directory. Other valid values for Module-Type are ADDON_INSTALLER, ADDON_CONFIGURATOR, and ARCHIVE.

The user experience then looks like this :
•  Start the Update Center client located in GLASSFISH_INSTALL/updatecenter/bin.
•  Add an Update Center definition in the "Preferences" tab using this URL - http://blogs.sun.com/alexismp/resource/xwiki-gfuc.xml
•  Install the update after agreeing to the license (download, unpack and install all happens under the cover)
•  Launch the application (no restart)

Steps are illustrated on this other page

This is an easy way for the many web applications out there to be easily made available to the large number of people downloading GlassFish. Of course not every application is self-contained like the one I used and in that case you would have to use a custom installer and configurator as explained by Manveen here and here. It allows for the Update Center to install bits (libraries, config files, ...), modify existing file (i.e. domain.xml) and create the appropriate resources in the application server (connection pools for instance).

Interested in packaging your application for the GlassFish Update Center? Try this out and post comments here!

Comments:

Thanks Alexis for pitching XWiki :)

I've added a link to this blog on the XWiki installation page for Glassfish: http://www.xwiki.org/xwiki/bin/view/AdminGuide/InstallationGlassFish

Cheers,
-Vincent

Posted by Vincent Massol on octobre 22, 2007 at 05:03 AM CEST #

Wonderful! We are currently planning an XWiki Glassfish install with another colleague, so this is quite helpful in our testing phase ;-)

Posted by Julien Ponge on octobre 24, 2007 at 11:45 AM CEST #

Nice! Do we want to host this on the repository?

Posted by Nazrul on octobre 24, 2007 at 09:49 PM CEST #

Post a Comment:
Comments are closed for this entry.
About

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« avril 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
Blogroll

No bookmarks in folder

News

No bookmarks in folder