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 (
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.