From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs338028wff; Fri, 18 Dec 2009 08:04:14 -0800 (PST) Received: from mr.google.com ([10.91.84.17]) by 10.91.84.17 with SMTP id m17mr4409785agl.27.1261152248317 (num_hops = 1); Fri, 18 Dec 2009 08:04:08 -0800 (PST) Received: by 10.91.84.17 with SMTP id m17mr635661agl.27.1261152221381; Fri, 18 Dec 2009 08:03:41 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.90.20.3 with SMTP id 3ls24894agt.2.p; Fri, 18 Dec 2009 08:03:39 -0800 (PST) Received: by 10.91.50.27 with SMTP id c27mr1078459agk.2.1261152219555; Fri, 18 Dec 2009 08:03:39 -0800 (PST) Received: by 10.91.50.27 with SMTP id c27mr1078455agk.2.1261152219433; Fri, 18 Dec 2009 08:03:39 -0800 (PST) Return-Path: Received: from mail-gx0-f228.google.com (mail-gx0-f228.google.com [209.85.217.228]) by gmr-mx.google.com with ESMTP id 17si398415gxk.4.2009.12.18.08.03.38; Fri, 18 Dec 2009 08:03:38 -0800 (PST) Received-SPF: pass (google.com: domain of jftucker@gmail.com designates 209.85.217.228 as permitted sender) client-ip=209.85.217.228; Received: by gxk28 with SMTP id 28so3097486gxk.9 for ; Fri, 18 Dec 2009 08:03:38 -0800 (PST) Received: by 10.90.235.6 with SMTP id i6mr842270agh.81.1261152210766; Fri, 18 Dec 2009 08:03:30 -0800 (PST) Return-Path: Received: from ?192.168.101.102? ([199.172.234.251]) by mx.google.com with ESMTPS id 16sm1523220gxk.7.2009.12.18.08.03.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 18 Dec 2009 08:03:30 -0800 (PST) From: James Tucker Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: GlassFish gem Rack handler Date: Fri, 18 Dec 2009 16:03:27 +0000 In-Reply-To: To: rack-devel@googlegroups.com References: <51F64AFC-7938-4555-BA6F-277A8671BE78@gmail.com> Message-Id: <4D2C51C5-1EFA-43E8-9E62-AB7B356F46A5@gmail.com> X-Mailer: Apple Mail (2.1077) X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jftucker@gmail.com designates 209.85.217.228 as permitted sender) smtp.mail=jftucker@gmail.com; dkim=pass (test mode) header.i=@gmail.com X-Original-Sender: jftucker@gmail.com Reply-To: rack-devel@googlegroups.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/3740025485e588f5 Sender: rack-devel@googlegroups.com List-Unsubscribe: , List-Subscribe: , Content-Type: multipart/alternative; boundary=Apple-Mail-1--622834313 --Apple-Mail-1--622834313 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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: >=20 > >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 >=20 > Right way to do will be to have an API that I could use to register = dynamically.=20 >=20 > 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. >=20 > -vivek. >=20 >=20 > On Fri, Dec 18, 2009 at 4:52 AM, Christian Neukirchen = 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. >=20 > Just ship it with the glassfish gem? >=20 > -- > Christian Neukirchen = http://chneukirchen.org >=20 --Apple-Mail-1--622834313 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
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.


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


--Apple-Mail-1--622834313--