You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Travis McCauley <tw...@virginia.edu> on 2003/03/05 16:50:00 UTC

Restart, Reset, or Reload?

I'm working on my first Tapestry application and I wonder if it's 
advisable to be reloading the web-app in the servlet container after 
every change.

I think I understand that Tapestry's "restart" service clears out a 
session, and "reset" clears cached templates and specifications. I 
assume that if you've called the "reset" service you don't need to 
reload the entire application context to see changes made to your 
java classes. Is that correct?

If it makes any difference, I'm running Tapestry in tomcat 4.1.12 
(JVM 1.3.1 for Mac OS X ).

Sincerely,
Travis McCauley

RE: Restart, Reset, or Reload?

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
I've noticed this too; I do some testing with Tomcat.  Every once and a
while, Tomcat can't see the classes in the framework, even though the
libraries are in WEB-INF/lib.  I haven't been able to reproduce it on demand
well enough to report the bug.  I suspect there's a timing issue ... perhaps
Tomcat doesn't like that the servlet is in a JAR, not in WEB-INF/classes?

We could test that hypothesis by subclassing ApplicationServlet and uses
that as the app servlet.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Travis McCauley [mailto:twm4g@virginia.edu] 
> Sent: Thursday, March 06, 2003 9:28 AM
> To: Tapestry users
> Subject: Re: Restart, Reset, or Reload?
> 
> 
> Reloading my Tapestry app in Tomcat then Restarting frequently causes 
> tomcat to crash. I can't identify any regular pattern to this. Do I 
> need to reload? What do most people do after they make some changes 
> to a class file? Do you reload the web-app? If people here mainly use 
> non-tomcat containers like jBoss and Jetty do those even have reload 
> commands? I'm used to writing jsps and reloading after every change. 
> I'm a little bit confused as to what the best practices are to 
> refresh a tapestry app under development to make sure you will see 
> your changes the next time you load it. What do most people do here?
> 
> Sincerely,
> Travis McCauley
> 
> >I'm working on my first Tapestry application and I wonder if it's
> >advisable to be reloading the web-app in the servlet container after 
> >every change.
> >
> >I think I understand that Tapestry's "restart" service clears out a
> >session, and "reset" clears cached templates and specifications. I 
> >assume that if you've called the "reset" service you don't need to 
> >reload the entire application context to see changes made to your 
> >java classes. Is that correct?
> >
> >If it makes any difference, I'm running Tapestry in tomcat 4.1.12
> >(JVM 1.3.1 for Mac OS X ).
> >
> >Sincerely,
> >Travis McCauley
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


RE: Restart, Reset, or Reload?

Posted by Torsten Juergeleit <tj...@yahoo.de>.
If you are looking for a convenient way to
launch/debug  Tapestry applications via Jetty +
Eclipse then try the Web Application Plugin
(http://blueskytime.sourceforge.net/).

It adds generic support for web containers to Eclipse.
Its shipped with Tomcat and Jetty.

Torsten

--- "Howard M. Lewis Ship" <hl...@attbi.com> wrote:
> My general approach to building and testing
> applications is to use Jetty in
> the presentation layer and run JBoss or WebLogic as
> its own process.  The
> EJBs and such inside the app server generally don't
> change nearly so often
> as the artifacts in the presentation layer, and
> redeployment is better
> understood in the app server.
> 
> It's also really good if you expect to use
> clustering because it exercises a
> real separation of presentation and application
> layers.
> 
> There are examples in the distros of how to
> configure and run Jetty
> embedded.  In the Vlib example, this includes
> setting up classpath and JVM
> system properties to talk to a running JBoss.
> 
> If you have to stop and restart Jetty to pick up
> code changes (or even spec
> and template changes) its fast ... a couple of
> seconds.  You lose some
> context (i.e., have to relogin to app).  Used this
> way, the presentation
> layer will use the exact files that are in your
> workspace.  Without this,
> you often either edit the files inside your app
> server's webapps directory
> and have to copy changes backwards, or have to
> constantly use ant to
> redeploy your application ... both tedious and error
> prone.
> 
> I usually do development with
> -Dorg.apache.tapestry.disable-caching=true and
> just deal with the time penalty on each request. 
> Even complex Tapestry apps
> come up much, much faster than a first-time JSP.
> 
> I use Eclipse and can set break points inside the
> presentation layer JVM
> and/or the application layer JVM.
> 
> Again, this is not only fast and convienient, but it
> also locates potential
> errors in your app layer (such as having
> non-serializable value objects)
> early.
> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/proposals/tapestry
> 
> 
> 
> > -----Original Message-----
> > From: Ivanhoe Abrahams
> [mailto:mwiabrah@mweb.co.za] 
> > Sent: Thursday, March 06, 2003 12:30 PM
> > To: Tapestry users
> > Subject: RE: Restart, Reset, or Reload?
> > 
> > 
> > I switched to JBoss/Jetty after I had the same
> issues as you 
> > Now I compile (ant script which makes a EAR file
> and copies 
> > it to the deploy directory in JBoss) and
> everything is just dandy
> > 
> > PS. Jetty seems much snappier as well.
> > Ivanhoe
> > 
> > -----Original Message-----
> > From: Travis McCauley [mailto:twm4g@virginia.edu]
> > Sent: 06 March 2003 04:28
> > To: Tapestry users
> > Subject: Re: Restart, Reset, or Reload?
> > 
> > 
> > Reloading my Tapestry app in Tomcat then
> Restarting 
> > frequently causes tomcat to crash. I can't
> identify any 
> > regular pattern to this. Do I need to reload? What
> do most 
> > people do after they make some changes to a class
> file? Do 
> > you reload the web-app? If people here mainly use
> non-tomcat 
> > containers like jBoss and Jetty do those even have
> reload 
> > commands? I'm used to writing jsps and reloading
> after every 
> > change. I'm a little bit confused as to what the
> best 
> > practices are to refresh a tapestry app under
> development to 
> > make sure you will see your changes the next time
> you load 
> > it. What do most people do here?
> > 
> > Sincerely,
> > Travis McCauley
> > 
> > >I'm working on my first Tapestry application and
> I wonder if it's 
> > >advisable to be reloading the web-app in the
> servlet container after 
> > >every change.
> > >
> > >I think I understand that Tapestry's "restart"
> service clears out a 
> > >session, and "reset" clears cached templates and
> specifications. I 
> > >assume that if you've called the "reset" service
> you don't need to 
> > >reload the entire application context to see
> changes made to 
> > your java 
> > >classes. Is that correct?
> > >
> > >If it makes any difference, I'm running Tapestry
> in tomcat 
> > 4.1.12 (JVM 
> > >1.3.1 for Mac OS X ).
> > >
> > >Sincerely,
> > >Travis McCauley
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > 
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system
> (http://www.grisoft.com).
> > Version: 6.0.459 / Virus Database: 258 - Release
> Date: 2003/02/25
> > 
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system
> (http://www.grisoft.com).
> > Version: 6.0.459 / Virus Database: 258 - Release
> Date: 2003/02/25
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

RE: Restart, Reset, or Reload?

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
My general approach to building and testing applications is to use Jetty in
the presentation layer and run JBoss or WebLogic as its own process.  The
EJBs and such inside the app server generally don't change nearly so often
as the artifacts in the presentation layer, and redeployment is better
understood in the app server.

It's also really good if you expect to use clustering because it exercises a
real separation of presentation and application layers.

There are examples in the distros of how to configure and run Jetty
embedded.  In the Vlib example, this includes setting up classpath and JVM
system properties to talk to a running JBoss.

If you have to stop and restart Jetty to pick up code changes (or even spec
and template changes) its fast ... a couple of seconds.  You lose some
context (i.e., have to relogin to app).  Used this way, the presentation
layer will use the exact files that are in your workspace.  Without this,
you often either edit the files inside your app server's webapps directory
and have to copy changes backwards, or have to constantly use ant to
redeploy your application ... both tedious and error prone.

I usually do development with -Dorg.apache.tapestry.disable-caching=true and
just deal with the time penalty on each request.  Even complex Tapestry apps
come up much, much faster than a first-time JSP.

I use Eclipse and can set break points inside the presentation layer JVM
and/or the application layer JVM.

Again, this is not only fast and convienient, but it also locates potential
errors in your app layer (such as having non-serializable value objects)
early.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Ivanhoe Abrahams [mailto:mwiabrah@mweb.co.za] 
> Sent: Thursday, March 06, 2003 12:30 PM
> To: Tapestry users
> Subject: RE: Restart, Reset, or Reload?
> 
> 
> I switched to JBoss/Jetty after I had the same issues as you 
> Now I compile (ant script which makes a EAR file and copies 
> it to the deploy directory in JBoss) and everything is just dandy
> 
> PS. Jetty seems much snappier as well.
> Ivanhoe
> 
> -----Original Message-----
> From: Travis McCauley [mailto:twm4g@virginia.edu]
> Sent: 06 March 2003 04:28
> To: Tapestry users
> Subject: Re: Restart, Reset, or Reload?
> 
> 
> Reloading my Tapestry app in Tomcat then Restarting 
> frequently causes tomcat to crash. I can't identify any 
> regular pattern to this. Do I need to reload? What do most 
> people do after they make some changes to a class file? Do 
> you reload the web-app? If people here mainly use non-tomcat 
> containers like jBoss and Jetty do those even have reload 
> commands? I'm used to writing jsps and reloading after every 
> change. I'm a little bit confused as to what the best 
> practices are to refresh a tapestry app under development to 
> make sure you will see your changes the next time you load 
> it. What do most people do here?
> 
> Sincerely,
> Travis McCauley
> 
> >I'm working on my first Tapestry application and I wonder if it's 
> >advisable to be reloading the web-app in the servlet container after 
> >every change.
> >
> >I think I understand that Tapestry's "restart" service clears out a 
> >session, and "reset" clears cached templates and specifications. I 
> >assume that if you've called the "reset" service you don't need to 
> >reload the entire application context to see changes made to 
> your java 
> >classes. Is that correct?
> >
> >If it makes any difference, I'm running Tapestry in tomcat 
> 4.1.12 (JVM 
> >1.3.1 for Mac OS X ).
> >
> >Sincerely,
> >Travis McCauley
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.459 / Virus Database: 258 - Release Date: 2003/02/25
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.459 / Virus Database: 258 - Release Date: 2003/02/25
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


RE: Restart, Reset, or Reload?

Posted by Ivanhoe Abrahams <mw...@mweb.co.za>.
I switched to JBoss/Jetty after I had the same issues as you
Now I compile (ant script which makes a EAR file and copies it to the deploy
directory in JBoss) and everything
is just dandy

PS. Jetty seems much snappier as well.
Ivanhoe

-----Original Message-----
From: Travis McCauley [mailto:twm4g@virginia.edu]
Sent: 06 March 2003 04:28
To: Tapestry users
Subject: Re: Restart, Reset, or Reload?


Reloading my Tapestry app in Tomcat then Restarting frequently causes
tomcat to crash. I can't identify any regular pattern to this. Do I
need to reload? What do most people do after they make some changes
to a class file? Do you reload the web-app? If people here mainly use
non-tomcat containers like jBoss and Jetty do those even have reload
commands? I'm used to writing jsps and reloading after every change.
I'm a little bit confused as to what the best practices are to
refresh a tapestry app under development to make sure you will see
your changes the next time you load it. What do most people do here?

Sincerely,
Travis McCauley

>I'm working on my first Tapestry application and I wonder if it's
>advisable to be reloading the web-app in the servlet container after
>every change.
>
>I think I understand that Tapestry's "restart" service clears out a
>session, and "reset" clears cached templates and specifications. I
>assume that if you've called the "reset" service you don't need to
>reload the entire application context to see changes made to your
>java classes. Is that correct?
>
>If it makes any difference, I'm running Tapestry in tomcat 4.1.12
>(JVM 1.3.1 for Mac OS X ).
>
>Sincerely,
>Travis McCauley


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2003/02/25

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2003/02/25


Re: Restart, Reset, or Reload?

Posted by Travis McCauley <tw...@virginia.edu>.
Reloading my Tapestry app in Tomcat then Restarting frequently causes 
tomcat to crash. I can't identify any regular pattern to this. Do I 
need to reload? What do most people do after they make some changes 
to a class file? Do you reload the web-app? If people here mainly use 
non-tomcat containers like jBoss and Jetty do those even have reload 
commands? I'm used to writing jsps and reloading after every change. 
I'm a little bit confused as to what the best practices are to 
refresh a tapestry app under development to make sure you will see 
your changes the next time you load it. What do most people do here?

Sincerely,
Travis McCauley

>I'm working on my first Tapestry application and I wonder if it's 
>advisable to be reloading the web-app in the servlet container after 
>every change.
>
>I think I understand that Tapestry's "restart" service clears out a 
>session, and "reset" clears cached templates and specifications. I 
>assume that if you've called the "reset" service you don't need to 
>reload the entire application context to see changes made to your 
>java classes. Is that correct?
>
>If it makes any difference, I'm running Tapestry in tomcat 4.1.12 
>(JVM 1.3.1 for Mac OS X ).
>
>Sincerely,
>Travis McCauley


RE: Restart, Reset, or Reload?

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Yes, the reset service discards all cached templates, specs, pages, etc.

Also, you can disable caching in general with a JVM system propery. See the
docs.  This is good for development.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Travis McCauley [mailto:twm4g@virginia.edu] 
> Sent: Wednesday, March 05, 2003 10:50 AM
> To: Tapestry users
> Subject: Restart, Reset, or Reload?
> 
> 
> I'm working on my first Tapestry application and I wonder if it's 
> advisable to be reloading the web-app in the servlet container after 
> every change.
> 
> I think I understand that Tapestry's "restart" service clears out a 
> session, and "reset" clears cached templates and specifications. I 
> assume that if you've called the "reset" service you don't need to 
> reload the entire application context to see changes made to your 
> java classes. Is that correct?
> 
> If it makes any difference, I'm running Tapestry in tomcat 4.1.12 
> (JVM 1.3.1 for Mac OS X ).
> 
> Sincerely,
> Travis McCauley
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>