struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kent SĂžlvsten Rasmussen <k...@aarhusmail.dk>
Subject Re: Re: Reloading struts-config form-property
Date Mon, 05 May 2003 16:43:22 GMT
Wouldn't it be possible to solve the first issue by using the "FastMap" implementations in
commons-collections?

But anyway, toying with class reloading inside Struts is not a good idea, I guess. (I suppose
I am not the only one having fun with classloaders and commons-logging, and these challenges
are not likely to become less, if Struts starts using its own classloader).

Kent


Craig R. McClanahan <craigmcc@apache.org> wrote:
> 
> 
> On Mon, 5 May 2003, Brandon Goodin wrote:
> 
> > Date: Mon, 5 May 2003 07:40:39 -0600
> > From: Brandon Goodin <mail@phase.ws>
> > Reply-To: Struts Developers List
> <struts-dev@jakarta.apache.org>
> > To: Struts Dev <struts-dev@jakarta.apache.org>
> > Subject: Reloading struts-config  form-property
> >
> > I know there are some issues regarding reloading the
> struts-config.xml
> > without a restart of the server. But, would there be any
> issues in regards
> > to reloading the form-bean and form-property configuration
> elements?
> 
> Two major ones:
> 
> * We'd have to synchronize all accesses to the config
> structures,
>   thereby slowing down all the lookups.
> 
> * Even if we allowed you to modify struts-config.xml
> dynamically,
>   that wouldn't enable access to new or replaced classes
> (actions,
>   form beans, etc.) that might have come along at the same
> time.
>   Doing half a change would be *much* more confusing than
> not doing
>   it at all.
> 
> > The
> > only reason why I ask is regards to testing. Often when I
> am hardcoding
> > ActionForm classes I don't have to restart the server when
> I make changes to
> > the class.
> 
> > But, if  I am using the form-property in the
> struts-config.xml, I
> > have to restart the server each time. I would be more than
> happy to explore
> > a patch. But, I was just wondering what the developer's
> experties would
> > advise. This would really entail repopulating the
> FormBeanConfig and
> > FormPropertyConfig.
> >
> 
> If we allow dynamic reloads of the config, people are going
> to expect
> dynamic reloads of the classes as well.  That is not
> something Struts can
> provide -- that's the container's issue.
> 
> Sounds like you should investigate the dynamic application
> reload
> facilities of your servlet container.  I use Tomcat very
> heavily for
> development, taking advantage of the Manager webapp and its
> support for
> custom Ant tasks:
> 
>  
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howt
> o.html
> 
> and the only time I ever restart Tomcat is to switch
> versions.  A typical
> "ant reload" command for a big Struts app takes less than 3
> seconds.
> 
> > Brandon Goodin
> 
> Craig
> 
> ------------------------------------------------------------
> ---------
> To unsubscribe, e-mail:
> struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
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