users@glassfish.java.net

Re: Deployment contexts with GF v3 Prelude

From: Bill Kocik <bkocik_at_gmail.com>
Date: Sun, 9 Nov 2008 11:12:42 -0500

On 9 Nov, 2008, at 1:16 AM, Peter Williams wrote:

> Can you try this: Ensure the app is properly deployed in one form,
> server running, etc. Stop the server, toggle the deploy at "/"
> property, then manually start the server and wait until it says the
> Rails app is ready again (about 8-12 seconds depending on
> hardware). Only then, choose <Run> from the project menu and see if
> it works properly.

Sure. Incidentally, last night I switched this project and NetBeans'
settings to use the bundled JRuby 1.1.4. There were simply too many
things I couldn't get to work with 1.1.5 (like debugging). So here's
what I did:

1) Server is running. Application is deployed at "/". Root context
setting is on.
2) Stopped server. Turned root context setting off.
3) Started GlassFish independently of my application (Services ->
Servers -> GlassFish v3 Prelude -> Start)
4) Waited until I saw this:

INFO: Jruby version is: 1.1.4
INFO: Starting Rails instances
INFO: New instance created in 12,128 milliseconds
INFO: Loading Rails application twittertracks at /
INFO: Loading twittertracks Application done is 12616 ms
INFO: GlassFish v3 Prelude startup time : Felix(1915ms) startup
services(13954ms) total(15869ms)

5) Right-clicked my application and chose "Run"
6) The line "INFO: Started bundle org.glassfish.admin.monitoring-core
[55]" is added to the server log, and my browser is sent to http://localhost:8080/twittertracks/
, where I get:

Routing Error
No route matches "/twittertracks/" with {:method=>:get}

I can repeat step 5 as many times as I like, and all that happens is
that my browser is sent to the URL NetBeans thinks my app should be
at; but it's not there. I can, however, access it at "/". If I restart
the server (apart from the application), 2nd time's the charm, as I've
been seeing:

INFO: Jruby version is: 1.1.4
INFO: Starting Rails instances
INFO: New instance created in 11,922 milliseconds
INFO: Loading Rails application twittertracks at /twittertracks

--
Bill Kocik