Skip to main content

New and improved GlassFish gem

Posted by vivekp on November 7, 2008 at 3:55 PM PST

I am
pleased to announce a long awaited href="">GlassFish
ver 0.9.0, it
is based on GlassFish v3 Prelude nucleus. This release of GlassFish gem
has everything that GlassFish v3 Prelude has to offer plus some new
features. See my href="">post
on JRuby on Rails support in GlassFish v3 Prelude.


jruby -S gem install

style="width: 607px; height: 121px;" alt="gfgem-install.png"

Key features

  • Based on GlassFish v3
    Prelude nucleus
    • GlassFish v3 Prelude is a
      production quality application server and the nucleus is based on this
      final version.
  • Rack based
    • GlassFish gem is Rack
      based. This means it would be pretty easy to add any Ruby based web
      frameworks, such as Merb, Camping, Sinatra, etc.
  • href="">Merb
    • Not just Rails, you can
      start running your Merb applications, simply type glassfish
      in your
      Merb application directory.
  • Autodetection of application
    • Simply type glassfish
      and it will detect what app you are running, whether Rails or Merb
    • It means you have to know
      about only one command style="font-weight: bold;">glassfish. glassfish_rails
      is deprected and supported for now due to backward compatibility
  • style="font-weight: bold;">-port
    or -p
    option to specify on which port your application run style="font-weight: bold;">s
  • style="font-weight: bold;">-environment or style="font-weight: bold;"> -e option
    to specify
    the Rails development
    environment, such as production, development or test
  •  JRuby runtime pool
    • Much needed for scaling
      when running Rails 2.1.x applications
    • Not required if running
      Edge Rails (2.2). Because it is
      supposed to be MT or atleast MT safe.
    • Also, not required for Merb

style="font-weight: bold;">Issues Resolved

Provide -port option to specify port for v3 gem

HTTP keep-alive not honored

glassfish_rails command should attempt to load the current directory if
none specified

Jruby on Rails show request header in page

Issues reported at rubyforge

How to use?

Simply type glassfish in
your application directory. If not sure see help:

jruby -S glassfish -h

height="476" width="554">

You can see the GlassFish gem documentation href="">here.
Try it out and send your feedback to the href="">forum
issues at the href="">issue
tracker. style="font-weight: bold;">

Related Topics >>


The options remain the same. This has been fixed in GlassFish gem release 0.9.1.

glassfish-0.9.0-universal-java/modules% grep '\-\-runtime' command_line_parser.rb | head -n 3 [ '--runtimes', '-n', GetoptLong::REQUIRED_ARGUMENT ], [ '--runtimes_min', GetoptLong::REQUIRED_ARGUMENT ], [ '--runtimes_max', GetoptLong::REQUIRED_ARGUMENT ], the options are --runtimes_{min,max} - the help file should be updated

Missing URL,

Also see Jacob's post