From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs340729wff; Fri, 18 Dec 2009 08:51:41 -0800 (PST) Received: from mr.google.com ([10.91.49.3]) by 10.91.49.3 with SMTP id b3mr2019509agk.23.1261155100958 (num_hops = 1); Fri, 18 Dec 2009 08:51:40 -0800 (PST) Received: by 10.91.49.3 with SMTP id b3mr293008agk.23.1261155099518; Fri, 18 Dec 2009 08:51:39 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.231.42.78 with SMTP id r14ls5205ibe.2.p; Fri, 18 Dec 2009 08:51:36 -0800 (PST) Received: by 10.231.8.214 with SMTP id i22mr281354ibi.23.1261155096585; Fri, 18 Dec 2009 08:51:36 -0800 (PST) Received: by 10.231.8.214 with SMTP id i22mr281353ibi.23.1261155096520; Fri, 18 Dec 2009 08:51:36 -0800 (PST) Return-Path: Received: from mail-iw0-f179.google.com (mail-iw0-f179.google.com [209.85.223.179]) by gmr-mx.google.com with ESMTP id 25si345714iwn.2.2009.12.18.08.51.35; Fri, 18 Dec 2009 08:51:35 -0800 (PST) Received-SPF: pass (google.com: domain of vivek.pandey@gmail.com designates 209.85.223.179 as permitted sender) client-ip=209.85.223.179; Received: by iwn9 with SMTP id 9so2288798iwn.6 for ; Fri, 18 Dec 2009 08:51:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.157.131 with SMTP id b3mr244874ibx.19.1261155095302; Fri, 18 Dec 2009 08:51:35 -0800 (PST) Reply-To: rack-devel@googlegroups.com In-Reply-To: <4D2C51C5-1EFA-43E8-9E62-AB7B356F46A5@gmail.com> References: <51F64AFC-7938-4555-BA6F-277A8671BE78@gmail.com> <4D2C51C5-1EFA-43E8-9E62-AB7B356F46A5@gmail.com> From: Vivek Pandey Date: Fri, 18 Dec 2009 08:51:15 -0800 Message-ID: Subject: Re: GlassFish gem Rack handler To: rack-devel@googlegroups.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vivek.pandey@gmail.com designates 209.85.223.179 as permitted sender) smtp.mail=vivek.pandey@gmail.com; dkim=pass (test mode) header.i=@gmail.com X-Original-Sender: vivek.pandey@gmail.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/9a1691a438a3c0e1 X-Message-Url: http://groups.google.com/group/rack-devel/msg/be77e0c800f9b17 Sender: rack-devel@googlegroups.com List-Unsubscribe: , List-Subscribe: , Content-Type: multipart/alternative; boundary=0050450167407654eb047b038dbc --0050450167407654eb047b038dbc Content-Type: text/plain; charset=ISO-8859-1 On Fri, Dec 18, 2009 at 8:03 AM, James Tucker 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: > > http://github.com/rack/rack/blob/master/lib/rack/handler.rb#L19-21 > > 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. > > > 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 >> 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 http://chneukirchen.org >> > > > --0050450167407654eb047b038dbc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Fri, Dec 18, 2009 at 8:03 AM, James Tucker <jftucker@gmail.com> wrote:=

On 18 D= ec 2009, at 15:37, Vivek Pandey wrote:

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

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

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



Excellent!
=A0

Right way to do will be to ha= ve an API that I could use to register dynamically.=A0

=




thanks,

-vivek.=A0

-vivek.


On Fri, Dec 18, 2009 at 4:52 AM, Christian Neukirchen = <chneukirche= n@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<= br> >> requires JRuby.
>>
>> GlassFish gem 1.0 =A0is 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/13= fe0cb1b99b470b0929
>> 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<= br> >> 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 rac= k
>> handler as well.
>
> Given that this would add a test and maintenance dependency on not jus= t 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 h= ave to maintain this handler.

Just ship it with the glassfish gem?

--
Christian Neukirchen =A0<chneukirchen@gmail.com> =A0http://chneukirchen.org



--0050450167407654eb047b038dbc--