users@glassfish.java.net

Re: Deploying jruby + rails + spring on GlassfishV3 ?

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Thu, 13 Aug 2009 10:18:05 -0700

Hi Ijonas,

GlassFish supports pure rails application directory deployment. In your
case, it is mix of Servlet/Spring and Rails and this application needs
to be handled thru a Servlet container and typically would need to
follow WAR layout as you mentioned in your mail.

With Servlet 3.0 pluggability, a simplified WAR deployment is possible.
Here much of the details such as packaging as WAR or need to provide as
web.xml can be hidden from the user. This can be achieved by adding
Servlet 3.0 support to jruby-rack[1]. I have discussed this thing with
Nick Sieger and I even started some work on a jruby-rack git branch but
not much progress have been made there. It would be best to discuss this
issue on users_at_jruby and see if Nick or someone from jruby-rack
community can contribute to Servet 3.0 feature in jruby-rack to allow
agile development of Rails+JavaEE/Spring etc.

This has been discussed in GlassFish v3 functional spec[2] section
4.1.4. Or you can directly refer to JavaEE6 and Scripting alignment[3].

-vivek.

[1]http://kenai.com/projects/jruby-rack/
[2]http://wiki.glassfish.java.net/attach/V3FunctionalSpecs/Scripting-one-pager.html#41
[3]http://wiki.glassfish.java.net/attach/V3FunctionalSpecs/ScriptingAndJavaEE6Alignment.html

Ijonas Kisselbach wrote:
> Hi,
>
> Apologies if you read this on the JRuby mailing list... its a
> half-JRuby half-Glassfish question...
>
> I've got a JRuby On Rails application which has a dependency on Spring
> and JMS. I've got it happily deploying as a WAR file and as an
> "exploded WAR", i.e. a folder, inside JBoss proving both database,
> Spring, and JMS connectivity.
>
> However I'd like to be able to develop the Rails app similarly to
> developing MRI-based Rails using Webrick/Mongrel, i.e. with the
> ability to edit controllers and views and see those changes by a mere
> refresh of the browser and not as is currently the case by going
> through a webapp-redeploy process.
>
> From reading and messing about with Glassfish V3, it seems this is my
> best option to get the desired kind of development environment setup.
> All the docs I've read on Kenai and Anul Gupta's blog deal with the
> "simple" or typical Rails app, i.e. standard MVC with no dependency on
> Spring.
>
> My question is: is my "desired" setup currently possible using
> Glassfish V3? If so, can someone point me to some docs that explain
> how to achieve this ? For example, I'm not sure if I should deploy as
> a Rails app or as WEB-INF/Servlet app inside Glassfish V3 ?
>
> Many thanks,
> Ijonas Kisselbach.