Skip to main content

Embeddable GlassFish v3 in Grails

Posted by kohsuke on May 2, 2008 at 7:49 AM PDT

As another proof of concept for the embeddable GlassFish v3 that I discussed a few days ago, Vivek and I wrote a little addition to Grails so that you can use GlassFish v3 instead of Jetty (As Vivek noted, I was quite happy with the ease of integration.)

Vivek's posting has more details about internal working, but here's how you can use it:

  1. Pick up the latest *-overlay.zip from here. Extract this on top of your grails installation. I tested with 1.0.2.
  2. Whereas you normally run grails run-app, you can run grails run-app-gf

The bundle currently contains the full-blown GlassFish v3, so it's bigger than it should be. But thanks to Maven, it should be easy to come up with a smaller bundle.

But in the mean time, there are several obvious benefits. This will bring you the full-brown JavaEE capabilities to your Grails app (such as JMS, web services, etc., although those are not yet in the technology preview 2.) Developers can now also run the application on the same container that they'll use in the production system, too.

Related Topics >>