rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: James Tucker <jftucker@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: GlassFish gem Rack handler
Date: Fri, 18 Dec 2009 16:03:27 +0000	[thread overview]
Message-ID: <4D2C51C5-1EFA-43E8-9E62-AB7B356F46A5@gmail.com> (raw)
In-Reply-To: <d38669d10912180737m12340fb4y94cdda3865756c5b@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]


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:

http://github.com/rack/rack/blob/master/lib/rack/handler.rb#L19-21

> 
> 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.
> 
> 
> On Fri, Dec 18, 2009 at 4:52 AM, Christian Neukirchen <chneukirchen@gmail.com> wrote:
> On Fri, Dec 18, 2009 at 11:37 AM, James Tucker <jftucker@gmail.com> wrote:
> >
> > On 17 Dec 2009, at 21:24, vivek wrote:
> >
> >> 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.
> >
> > 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.
> 
> Just ship it with the glassfish gem?
> 
> --
> Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org
> 


[-- Attachment #2: Type: text/html, Size: 3752 bytes --]

  reply	other threads:[~2009-12-18 16:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17 21:24 GlassFish gem Rack handler vivek
2009-12-18 10:37 ` James Tucker
2009-12-18 12:52   ` Christian Neukirchen
2009-12-18 15:37     ` Vivek Pandey
2009-12-18 16:03       ` James Tucker [this message]
2009-12-18 16:51         ` Vivek Pandey
2009-12-22 16:04           ` Vivek Pandey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D2C51C5-1EFA-43E8-9E62-AB7B356F46A5@gmail.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).