dev@glassfish.java.net

Re: GlassFish gem feature requests/bugs

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Mon, 10 Sep 2007 20:49:28 -0700

On Sep 10, 2007, at 3:24 PM, Charles Oliver Nutter wrote:

> A few thoughts:
>
> - If you specify an app at the command line it should deploy to
> root by default. This is how most people would expect it to work,
> since you're creating a new server with only one app in it...i.e.
> the root app. The equivalent mongrel command deploys at root by
> default but allows you to specify a specific context if you want to.
that's not how glassfish traditionally worked, we do the other way
around... not sure how I will want to fix this right now, this will
have to wait a bit.
>
> - The startup script should be a normal Ruby script rather than a
> shell script; then we do all the hassle of locating JRuby and Java
> for you, as well as processing normal JRuby command-line logic.
> Here's the script I came up with:
>
cool, I just tried it, it works, starts much faster too. I will push
a new gem soon.

jerome

> bin/glassfish_rails:
>
> <CODE>
> #!/usr/bin/env jruby
> require 'java'
> require 'rubygems'
> require 'glassfish'
>
> GlassFish.startup(ARGV)
> </CODE>
>
> And inside the gem under lib, glassfish.rb:
>
> <CODE>
> require 'glassfish-10.0-SNAPSHOT.jar'
>
> module GlassFish
> import com.sun.enterprise.glassfish.bootstrap.Main
> def startup(args)
> Main.main(args.to_java(:string))
> end
>
> module_function :startup
> end
> </CODE>
>
> More thoughts as they arrive.
>
> - Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>