dev@glassfish.java.net

Rapid Deployment Woes: need an article

From: Ed Burns <ed.burns_at_sun.com>
Date: Mon, 1 Aug 2005 08:37:54 -0700

Summary:

I plea for a guide to getting the lowest turnaround time on the
'edit->compile->debug' lifecycle when developing webapps on glassfish.

Detail:

Hello glassfishers,

We've been having a discussion on a Sun internal list that I think would
be better discussed out here.

I've noticed that one of the reasons people love Ruby on Rails is that
*all* changes made to the deployed application are *immediately* visible
to users without a redeployment step [1]. With Java Web apps, this
feature is usually limited to when you change a JSP, which forces a
re-compilation of the JSP. However, when developing JSF apps, you need
more dynamism. For example, if you change the java code of a custom
component used in the app, you don't want to have to redeploy.

I wasn't sure even if this was possible in the java platform so I
asked. Turns out it is:

>>>>>>> On Thu, 28 Jul 2005 17:45:15 -0700, Kenneth Russell said:

KR> Java's dynamic class loading already supports this. New
KR> implementations of a particular base class or interface can be
KR> loaded into newly-created class loaders and instantiated. When a
KR> redefinition is desired, a new class loader can be created, the new
KR> class loaded and instantiated, and the references to the old
KR> instances merely lost. The old class loader and class definition
KR> will be garbage collected automatically. This is the best and most
KR> supported way (it's been available since JDK 1.2) to implement the
KR> functionality you're requesting.

So now the problem is: how is this implemented in Glassfish. Our
stalwart Jeanfrancois stated:

JA> The WebContainer has that feature, but that feature isn't supported in
JA> SJSAS because deployment isn't handled by the WebContainer, but by the
JA> DOL (Deployment Object Layer). But once you have deployed your app using
JA> the CLI/ADMIN-GUI, you can use JMX to enable the feature (it will not be
JA> as fast as RoR, but if we really need that feature, I can investigate
JA> and see what it will take to have it optional. Just take a look at:

JA> glassfish/appserv-tests/devtests/web/jsr77startstop

I'd like to say here that *yes* I want this feature.

Furthermore, can someone please point me to a definitive guide that
answers the question, "how do I get the fastest turnaround time for the
'edit->compile->debug' cycle using Glassfish?" If such a guide doesn't
exist, could someone please write it? In fact, if someone who knows the
answer to the question could spend some time with me, I'll write the
article and credit it largley to you!

Thanks,

Ed

[1] http://www.theserverside.com/news/thread.tss?thread_id=35538

| ed.burns_at_sun.com | {home: 407 869 9587, office: 408 884 9519 OR x31640}
| homepage: | http://purl.oclc.org/NET/edburns/
| aim: edburns0sunw | iim: ed.burns_at_sun.com