Bistro!
Alexis Moussine-Pouchkine's Weblog
public enum Topic { Java, GlassFish, Tools, Sun, InFrenchInZeText, SDPY }

20080926 vendredi septembre 26, 2008

Bundling GlassFish v3 Prelude - XWiki (Part 1)

In previous blog posts about XWiki and GlassFish, I explained how to expose XWiki on the GlassFish v2 update center and how to deploy XWiki in a GlassFish container.

Recent XWiki and GlassFish evolution.

This was a while back and XWiki, now a GlassFish partner, has nicely moved forward to version 1.5.2 (Stable). At the same time GlassFish released an embedded API and will soon ship GlassFish v3 Prelude, a lightweight container.

Shipping XWiki and GlassFish v3 Prelude together actually makes sense. The download is much smaller (21MB) than it would have been with GlassFish v2 (65MB), but having now an embedded API for the GlassFish makes it a reasonable Jetty alternative. It can for instance be used to implement an evaluation bundle (similar to what the OpenSSO folks did: 85Mb, Java Web Start deployment included).

Simple XWiki and GlassFish packaging.

Using JavaDB this time (no need to add driver in XWiki's WEB-INF/lib directory): simply edit WEB-INF/hibernate.cfg.xml to uncomment and adjust the JavaDB section, add a sun-web.xml file with a context-root set to /xwiki and update the WAR archive (xwiki-enterprise-web-1.5.2.war in my case).

Using GlassFish v3 Prelude promoted build #25 (Sept 19th), I could easily deploy by copying the archive in the auto-deploy directory (domains/domain1/autodeploy).

This can lead to a simple ZIP archive with GlassFish v3 + XWiki 1.5.2 war sitting in the auto-deploy directory. Make sure also that you nuke the domains/domain1/.felix bundle cache to avoid OSGi bundle symbolic name issues. Unzipping, starting GlassFish and pointing to http://localhost:8080/xwiki does the job (simple enough for testing/evaluating). Startup with XWiki in the autodeploy directory takes 15 seconds on my machine. Starting with Xwiki already deployed takes 8 seconds.

To be continued...

The next step is to start using the GlassFish embedded API.

Thanks to XWiki CTO Vincent Massol for the quick turnaround answering my questions and bug reports.

( sept. 26 2008, 05:48:08 PM CEST ) Permalink

Comments:

Post a Comment:

Comments are closed for this entry.

GlassFish Podcast
Get GlassFish V3 Preview
Support GlassFish Enterprise

Today's Page Hits: 906





Get the Source Get OpenSolaris
bea conference glassfish groovy ips java javaee javafx javaone jbi jug metro mysql netbeans openesb openoffice opensource paris performance podcast presentation sdpy sun swing techdays tips updatecenter v3 webservices wsit
Links