struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: Reloading struts-config form-property
Date Mon, 19 May 2003 20:30:20 GMT


On Mon, 19 May 2003, Snow, Skip wrote:

> Date: Mon, 19 May 2003 13:00:52 -0400
> From: "Snow, Skip" <skip.snow@citigroup.com>
> Reply-To: Struts Developers List <struts-dev@jakarta.apache.org>
> To: Struts Developers List <struts-dev@jakarta.apache.org>
> Subject: RE: Reloading struts-config form-property
>
> What would people think about a patch to reload the configuration at runtime?
>

-1, for a couple of reasons:

* This would violate the current runtime assumption that the configuration
  data cannot be modified after startup.  To be safe, then, we'd have to
  start synching the underlying data structures on every call -- and that
  is a useless waste of cpu cycles.

* Changing the struts-config.xml file is only one of a large number of
  changes that developers make to apps they are working on.  In
  particular, it's not at all unusual to add or recompile classes -- and
  it is totally out of the control of Struts, or any other portable
  framework, to convince the container that it should recognize the
  updated classes.

The right answer during development is to use the dynamic reload
capabilities of your container.  For example, the "reload" command on
Tomcat (which *does* pick up new/recompiled classes as well as rereads
struts-config.xml as a side effect) takes less than two seconds on my
typical Struts based apps.  That's plenty fast, along with the fact that
it's guaranteed to pick up *all* my changes instead of just some of them.

> Skip Snow

Craig McClanahan

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


Mime
View raw message