Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 57856 invoked from network); 15 Jan 2009 08:53:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2009 08:53:25 -0000 Received: (qmail 35225 invoked by uid 500); 15 Jan 2009 08:53:24 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 35146 invoked by uid 500); 15 Jan 2009 08:53:24 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 35137 invoked by uid 99); 15 Jan 2009 08:53:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2009 00:53:24 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.136.44.62] (HELO smtp107.prem.mail.sp1.yahoo.com) (98.136.44.62) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 15 Jan 2009 08:53:14 +0000 Received: (qmail 50188 invoked from network); 15 Jan 2009 08:52:52 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Mime-Version:Subject:Date:References:X-Mailer; b=HkRaSNkRGOazdmQinsAwiU/D1gsbPuouIuhKsHYtUwW8N1ERAYaDV/fmjwyoNUeaD5M4oaWO2bqFnd9mMRY2sC4cSXafO79HwPB9Gf6AofLRbaIanIkIDBSqaMsbxQO7bjGJR+nN/Zl+NRUR7IRF03Su3i2hrEJdhC6P2JSQa7w= ; Received: from unknown (HELO ?10.11.55.43?) (david_jencks@76.76.148.215 with plain) by smtp107.prem.mail.sp1.yahoo.com with SMTP; 15 Jan 2009 08:52:52 -0000 X-YMail-OSG: ZYLPkh0VM1mhn5QPITStlS8RJatmZgx2mtsAC83LlcvkSXf3juJMrobw22AiZwcaTL9D_CHrRefTBIPolCfuLINGDidDO3EbrxtM4.pdWIY0LP3_InTmlG7V_Ilb.shm959aM_pov1VmQvcAKC0pG3iEBTsci2seFLOxFX0uFFwySdUf9RigcyTNgs2GRlS9vrBJUdlLDbF7UrB4b5EZe_75uHf_iA4- X-Yahoo-Newman-Property: ymail-3 Message-Id: <09471763-7068-452A-9076-55DBEC2FB438@yahoo.com> From: David Jencks To: user@geronimo.apache.org In-Reply-To: <5e7fd1eb0901150012t63463420h47d5048cfc422cdc@mail.gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-30-299300774 Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Geronimo Cannot Auto-reload class File Date: Thu, 15 Jan 2009 00:52:51 -0800 References: <6563e7b70901142236s2bee244chf9bbc6c1fcf641d9@mail.gmail.com> <98a659de0901142242h2f00a0d8vc51211da18671d63@mail.gmail.com> <45f744e40901142301l39eba226q70425fd240592320@mail.gmail.com> <5e7fd1eb0901150012t63463420h47d5048cfc422cdc@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-30-299300774 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit I really doubt that pursuing this will turn out to be a good use of our time -- I fear that it is likely to introduce hard-to-find and fix problems -- but if anyone wants to look into it.... -- a tomcat flag is unlikely to work in geronimo since we are not using any tomcat class loaders. -- I would investigate what tomcat does from this flag and if eclipse has a similar feature and find out how they work. -- I think I recall a jvm feature that lets you replace class definitions in some circumstances. I've never used it and don't know when it can be used. Basically I don't see how you can reliably replace one class - say a servlet class - in a web app without restarting the whole web app. There is going to be at least one instance of the servlet class created, so you need to stop and recreate the servlet. Assuming it has load-on-startup == 0..... you have to start the whole web app. If people have different perspectives I'd like to hear them :-) From a user perspective what I do is to set up a maven build that builds my app, uses the car-maven-plugin to build it into a geronimo plugin, use the car-maven-plugin again to build a micro server including my app, and use selenium to run tests against it in the micro server. thanks david jencks On Jan 15, 2009, at 12:12 AM, Jack Cai wrote: > I also agree that it's nice to have that. But I guess it's not as > easy as just exposing the attribute. As David J. pointed out in > another thread, we are dealing with two containers here. I did a > small experiment by adding a context.xml in Tomcat's conf folder, > and set "reloadable=true". Then Tomcat reports a > NullPointerException each time it wants to do class reload. We need > to look deeper into this. > > -Jack > > 2009/1/15 Ivan > Currently, it seems that the reload attribute of the context is not > exported by the TomcatWebAppContext GBean, shall we add this > attribute to allow the user to set it in the config.xml ? > Thanks ! > > 2009/1/15 chi runhua > > Try deploy --inPlace , here is the doc for your > information > > http://cwiki.apache.org/GMOxDOC22/deploy.html#deploy-Deploy > > Jeff C > > > On Thu, Jan 15, 2009 at 2:36 PM, Kai Fei wrote: > Hello, > > My name is Kai, a new geronimo user. I met a small problem when > develope a web application on geronimo. It seems that geronimo won't > reload the java class file when it is replaced. > Here is what I did: > After I deploied a war file, I wanted to change a java class, so I > replaced the old one with a new one, but the application didn't make > any changes. Then I restart the war application, it works. > Is there any way to make geronimo reload the java class file > automaticly? > > I expect that there could be a config file which can enable this > function, but I didn't find... > > Would anyone help? > > > > > -- > Ivan > --Apple-Mail-30-299300774 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
I really doubt that = pursuing this will turn out to be a good use of our time -- I fear that = it is likely to introduce hard-to-find and fix problems -- but if anyone = wants to look into it....

-- a tomcat flag is = unlikely to work in geronimo since we are not using any tomcat class = loaders.

-- I would investigate what tomcat = does from this flag and if eclipse has a similar feature and find out = how they work.

-- I think I recall a jvm = feature that lets you replace class definitions in some circumstances. =  I've never used it and don't know when it can be = used.

Basically I don't see how you can = reliably replace one class - say a servlet class - in a web app without = restarting the whole web app.  There is going to be at least one = instance of the servlet class created, so you need to stop and recreate = the servlet.  Assuming it has load-on-startup =3D=3D 0..... you = have to start the whole web app.

If people have = different perspectives I'd like to hear them = :-)

=46rom a user perspective what I do is to = set up a maven build that builds my app, uses the car-maven-plugin to = build it into a geronimo plugin, use the car-maven-plugin again to build = a micro server including my app, and use selenium to run tests against = it in the micro server.

thanks
david = jencks

On Jan 15, 2009, at 12:12 AM, Jack Cai = wrote:

I also agree that it's nice to have that. But I guess it's = not as easy as just exposing the attribute. As David J. pointed out in = another thread, we are dealing with two containers here. I did a small = experiment by adding a context.xml in Tomcat's conf folder, and set = "reloadable=3Dtrue". Then Tomcat reports a NullPointerException each = time it wants to do class reload. We need to look deeper into this.
=
-Jack

2009/1/15 Ivan <xhhsld@gmail.com>
Currently, it = seems that the reload attribute of the context is not exported by the = TomcatWebAppContext GBean, shall we add this attribute to allow the user = to set it in the config.xml ?
Thanks !

2009/1/15 chi runhua <chirunhua@gmail.com>

Try deploy --inPlace = <yourAppHome>,    here is the doc for your = information

http://cwiki.apache.org/GMOxDOC22/deploy.html#deploy-Dep= loy

Jeff C


On Thu, Jan 15, 2009 at 2:36 PM, Kai Fei <boyate@gmail.com> wrote:
=
Hello,
 
My name is Kai, a new geronimo user. I met a = small problem when develope a web application on geronimo. It seems that = geronimo won't reload the java class file when it is replaced.
=
Here is what I did: 
After I deploied a war file, I = wanted to change a java class, so I replaced the old one with a new one, = but the application didn't make any changes. Then I restart the war = application, it works.
Is there any way to make geronimo reload the = java class file automaticly?
 
I expect that there could be = a config file which can enable this function, but I didn't = find...
 
Would anyone help?

=



-- =
Ivan
=


= --Apple-Mail-30-299300774--