Skip to main content

GlassFish gem 1.0.0 is available

Posted by vivekp on December 10, 2009 at 10:44 AM PST
This is 1.0.0 release of GlassFish gem. This release is based on GlassFish v3 final release. Unlike other gem releases which used to get posted on the RubyForge gem repo. Now its pushed to Gemcutter. The end result is pushing is easy and the gem is available moments after its pushed. Also now I can see how many of each release get downloaded.

To install, simply type the following on a JRuby installation:

$ gem install glassfish

New features in this release

  • Implemented using GlassFish v3 embedded API.
  • Startup time improvement. Almost 15-18% faster startup.
  • Full Rack compliance
  • Support for running GlassFish gem by passing code block

     GlassFish::Server.start(:address=>"127.0.0.1", :port=>4000) do

       use Rack::CommonLogger

       use Rack::ShowExceptions

       map "/hello" do

         use Rack::Lint

         run Proc.new {[200, {"Content-Type" => "text/html"}, "Hello"]}

       end

     end
 
In the code above, GlassFish is started on port 4000 and it binds to port 127.0.0.1. After it starts up and when the first request arrives it runs the given code block. The code block is using Rack middlewares such as CommonLogger and ShowException for better debugging during development. The actual Rack application code is minimalistic which returns "Hello" as content body with HTTP status code 200 and HTTP header ContentType.
  • Lots of fixes for Sinatra support (extensions, middleware etc.)
  • New -a CLI switch to bind to a given IP address
  • Improved support for running Rackup scripts   
  • Grizzly (NIO based HTTP library) configuration thru glassfish.yml
          $ gfrake config
 

          Below is the default Grizzly configuration for GlassFish gem.

Grizzly Config

 

Bug fixes  

25812  ActionController::Request.remote_ip is not set
26147  Setting Hostname IP Address Incorrectly
26149  Glassfish Gem fails to load Rails application in the production environment
26208  Can't get glassfish to start rails in thread-safe mode
26821  Error when running rack app
26866  JVM crash probably due to log file running over limit
26935  rack.run_once not getting set
27030  Extending CLASSPATH poisons glassfish gem?
27125  Application Environment not passed to Sinatra

Checkout the release notes and as always keep using it and send us feedback either at RubyForge or to users@glassfish.dev.java.net

 
 
 
 
Related Topics >>