users@glassfish.java.net

Re: Deployment contexts with GF v3 Prelude

From: Bill Kocik <bkocik_at_gmail.com>
Date: Sun, 9 Nov 2008 20:23:44 -0500

On 9 Nov, 2008, at 6:48 PM, Peter Williams wrote:

> Weird. I can't reproduce this at all. Would you do this for me
> please -- modify netbeans.conf to add "-J-Dglassfish.level=FINE".
> Reproduce the problem once or twice. File an issue against netbeans
> (serverplugins/glassfish_v3) and attach the messages.log file from
> NetBeans. I want to see what's up.

15281 filed.

> Can you try this: do steps 1-3 again, but just do the context root
> setting change and the server start. Do NOT run the application.
> Now, in your browser, invoke this URL: http://localhost:4848/__asadmin/get?pattern=applications.application.twittertracks.*

Well, sort of. For this test I had to start with the app running in
its own context, instead of at the root context, since if I'd gone the
other way around those steps would have left the Rails app at
"/" (GlassFish issue 6746) and I'd have been unable to get to the URL
above. So my steps are these:

1) Begin with root context setting off, application running at /
twittertracks
2) Stop server. Turn root context setting on.
3) Start server from the "Services" panel in NetBeans:

INFO: Jruby version is: 1.1.4
INFO: Starting Rails instances
INFO: New instance created in 12,114 milliseconds
INFO: Loading Rails application twittertracks at /twittertracks
INFO: Loading twittertracks Application done is 12660 ms

At http://localhost:4848/__asadmin/get?pattern=applications.application.twittertracks.*
  I see this:

Exit Code : SUCCESS
null
applications.application.twittertracks.context-root=/twittertracks
applications.application.twittertracks.directory-deployed=true
applications.application.twittertracks.enabled=true
applications.application.twittertracks.location=file:/Users/bkocik/Dev/
twittertracks/
applications.application.twittertracks.name=twittertracks
applications.application.twittertracks.object-type=user
applications.application.twittertracks.engine.jruby.sniffer=jruby
applications.application.twittertracks.property.keepSessions=true

For good measure, at this point I right-clicked my app and chose
"Run". That URL now yields this (note the changed context-root):

Exit Code : SUCCESS
null
applications.application.twittertracks.context-root=/
applications.application.twittertracks.directory-deployed=true
applications.application.twittertracks.enabled=true
applications.application.twittertracks.location=file:/Users/bkocik/Dev/
twittertracks/
applications.application.twittertracks.name=twittertracks
applications.application.twittertracks.object-type=user
applications.application.twittertracks.engine.jruby.sniffer=jruby
applications.application.twittertracks.property.keepSessions=true

However my application is not available at http://localhost:8080/
(though NetBeans thinks it is, and sends my browser there). It is
still available at http://localhost:8080/twittertracks/

--
Bill Kocik