GlassFish gem Rack handler

7 views
Skip to first unread message

vivek

unread,
Dec 17, 2009, 4:24:21 PM12/17/09
to Rack Development
Hi,

GlassFish gem is a gem that runs Ruby/Rack/Rails applications and
requires JRuby.

GlassFish gem 1.0 is fully Rack compliant. See
http://blogs.sun.com/vivekpandey/entry/glassfish_gem_1_0_0.

I quickly coded up a glassfish handler: https://gist.github.com/13fe0cb1b99b470b0929
and placing it inside rack 1.0.1 gem (lib/rack/handler) makes

'rackup -s glassfish' runs a rackup script successfully.

I am wondering if a default glassfish handler could be added with
Rack. Similar to mongrel, thin etc.

I guess http://rack.rubyforge.org/doc/ should also mention GlassFish
as the supported web server. BTW, GlassFish gem has an inbuilt rack
handler as well.

-vivek.


James Tucker

unread,
Dec 18, 2009, 5:37:28 AM12/18/09
to rack-...@googlegroups.com

Given that this would add a test and maintenance dependency on not just the handler, but its dependencies (java6, jruby, and glassfish), it's best left in the external gem. I doubt any of the rack-core team want to have to maintain this handler.

Christian Neukirchen

unread,
Dec 18, 2009, 7:52:31 AM12/18/09
to rack-...@googlegroups.com

Just ship it with the glassfish gem?

--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org

Vivek Pandey

unread,
Dec 18, 2009, 10:37:20 AM12/18/09
to rack-...@googlegroups.com
I can definitely ship it as part of the gem. But how is  'rackup -s glassfish' going to work? Right now, I have it working by modifying lib/rack/handler.rb:

>autoload :GlassFish, "rack/handler/glassfish"
>register 'glassfish', 'Rack::Handler::GlassFish'

Right way to do will be to have an API that I could use to register dynamically. 

Also, how about supported rack handlers listed at http://rack.rubyforge.org/doc/? Since GlassFish can run rackup scripts, should it not be mentioned there?

-vivek.

James Tucker

unread,
Dec 18, 2009, 11:03:27 AM12/18/09
to rack-...@googlegroups.com
On 18 Dec 2009, at 15:37, Vivek Pandey wrote:

I can definitely ship it as part of the gem. But how is  'rackup -s glassfish' going to work? Right now, I have it working by modifying lib/rack/handler.rb:

>autoload :GlassFish, "rack/handler/glassfish"
>register 'glassfish', 'Rack::Handler::GlassFish'

You don't ned to register anything, rack will try to load it using standard naming conventions:



Right way to do will be to have an API that I could use to register dynamically. 

Also, how about supported rack handlers listed at http://rack.rubyforge.org/doc/? Since GlassFish can run rackup scripts, should it not be mentioned there?

Supply doc patch, or ticket in the tracker, or poke me after work and I'll do it for you.

Vivek Pandey

unread,
Dec 18, 2009, 11:51:15 AM12/18/09
to rack-...@googlegroups.com

On Fri, Dec 18, 2009 at 8:03 AM, James Tucker <jftu...@gmail.com> wrote:

On 18 Dec 2009, at 15:37, Vivek Pandey wrote:

I can definitely ship it as part of the gem. But how is  'rackup -s glassfish' going to work? Right now, I have it working by modifying lib/rack/handler.rb:

>autoload :GlassFish, "rack/handler/glassfish"
>register 'glassfish', 'Rack::Handler::GlassFish'

You don't ned to register anything, rack will try to load it using standard naming conventions:



Excellent!
 

Right way to do will be to have an API that I could use to register dynamically. 

Also, how about supported rack handlers listed at http://rack.rubyforge.org/doc/? Since GlassFish can run rackup scripts, should it not be mentioned there?

Supply doc patch, or ticket in the tracker, or poke me after work and I'll do it for you.


I will provide a doc patch.

thanks,

-vivek. 

Vivek Pandey

unread,
Dec 22, 2009, 11:04:33 AM12/22/09
to rack-...@googlegroups.com
On Fri, Dec 18, 2009 at 8:51 AM, Vivek Pandey <vivek....@gmail.com> wrote:


Also, how about supported rack handlers listed at http://rack.rubyforge.org/doc/? Since GlassFish can run rackup scripts, should it not be mentioned there?

Supply doc patch, or ticket in the tracker, or poke me after work and I'll do it for you.


I will provide a doc patch.


I could not find the source for http://rack.rubyforge.org/doc/ to provide a patch. So opened a ticket#86, http://bit.ly/6GdnPM.

thanks,

-vivek.


 
thanks,

-vivek. 

Reply all
Reply to author
Forward
0 new messages