rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* GlassFish gem Rack handler
@ 2009-12-17 21:24 vivek
  2009-12-18 10:37 ` James Tucker
  0 siblings, 1 reply; 7+ messages in thread
From: vivek @ 2009-12-17 21:24 UTC (permalink / raw)
  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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GlassFish gem Rack handler
  2009-12-17 21:24 GlassFish gem Rack handler vivek
@ 2009-12-18 10:37 ` James Tucker
  2009-12-18 12:52   ` Christian Neukirchen
  0 siblings, 1 reply; 7+ messages in thread
From: James Tucker @ 2009-12-18 10:37 UTC (permalink / raw)
  To: rack-devel


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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GlassFish gem Rack handler
  2009-12-18 10:37 ` James Tucker
@ 2009-12-18 12:52   ` Christian Neukirchen
  2009-12-18 15:37     ` Vivek Pandey
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Neukirchen @ 2009-12-18 12:52 UTC (permalink / raw)
  To: rack-devel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GlassFish gem Rack handler
  2009-12-18 12:52   ` Christian Neukirchen
@ 2009-12-18 15:37     ` Vivek Pandey
  2009-12-18 16:03       ` James Tucker
  0 siblings, 1 reply; 7+ messages in thread
From: Vivek Pandey @ 2009-12-18 15:37 UTC (permalink / raw)
  To: rack-devel

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

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.


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: 3031 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GlassFish gem Rack handler
  2009-12-18 15:37     ` Vivek Pandey
@ 2009-12-18 16:03       ` James Tucker
  2009-12-18 16:51         ` Vivek Pandey
  0 siblings, 1 reply; 7+ messages in thread
From: James Tucker @ 2009-12-18 16:03 UTC (permalink / raw)
  To: rack-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GlassFish gem Rack handler
  2009-12-18 16:03       ` James Tucker
@ 2009-12-18 16:51         ` Vivek Pandey
  2009-12-22 16:04           ` Vivek Pandey
  0 siblings, 1 reply; 7+ messages in thread
From: Vivek Pandey @ 2009-12-18 16:51 UTC (permalink / raw)
  To: rack-devel

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

On Fri, Dec 18, 2009 at 8:03 AM, James Tucker <jftucker@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:
>
> 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 <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: 4676 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GlassFish gem Rack handler
  2009-12-18 16:51         ` Vivek Pandey
@ 2009-12-22 16:04           ` Vivek Pandey
  0 siblings, 0 replies; 7+ messages in thread
From: Vivek Pandey @ 2009-12-22 16:04 UTC (permalink / raw)
  To: rack-devel

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

On Fri, Dec 18, 2009 at 8:51 AM, Vivek Pandey <vivek.pandey@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.
>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-22 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2009-12-18 16:51         ` Vivek Pandey
2009-12-22 16:04           ` Vivek Pandey

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/rack.git

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).