It doesn't actually re-parse the configuration XML file every time. The
ConfigurationManager calls provider.needsReload() on every
ConfigurationProvider to see if that config provider thinks it needs to
reload (so any custom ConfigurationProvider can implement this in its
own way). The XmlConfigurationProvider, which parses xwork.xml or any
file using that DTD, uses the FileManager from OSCore which I wrote
(stole from some of Hani's code :-) )... That utility maintains a
reference to the file and checks its timestamp vs. the time stamp the
last time we read it to see if the file timestamp has changed. 

Note that if you set this flag the same check will be done for all
validation files and conversion property files, although not for text
bundles (complain to Sun, it's their PropertyResourceBundle). 

Jason

> -----Original Message-----
> From: Craig Raw [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 08, 2004 7:37 AM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] XWork, Webwork and reloading xml
> 
> 
> Hi,
> 
> I have run into issues surrounding xwork and the reloading of 
> classes using hot deploy. My 
> deployment environment is JBoss, where I am sharing the 
> webwork/xwork libraries between ears (to 
> keep the ear file size down) and using a separate loader 
> repository for each ear (to keep the 
> configurations separated by classloader namespace).
> 
> The problem comes with the flag, 
> webwork.configuration.xml.reload. When set to false, xwork holds on 
> the xwork.xml file (loaded by a classloader) even after a hot 
> redeploy. This causes all the classes 
> loaded by that classloader to remain accessible as well, and 
> the hot redeploy fails in the sense 
> that the deployed classes do not change, and neither does the 
> xwork configuration. (This would not 
> happen if I bundled the xwork/webwork libraries into the 
> ear/war, at the cost of a much larger ear 
> file size.)
> 
> If the flag is true, hot redeploy works fine, but 
> com.opensymphony.work.config.ConfigurationManager 
> reloads xwork.xml on every request to the server.
> 
> I would like to be in a situation where I can hot deploy to a 
> production server, to avoid having to 
> drop all the deployments and restart the server just to 
> update one. However, I am concerned as to 
> the additional load caused by constantly reloading xwork.xml. 
> I see that there is a comment in the 
> class mentioned above, on line 127:
> 
>   @todo it currently appears that the reload strategy is to 
> check on each call to 
> getConfiguration().  this seems extremely burdensome.  a 
> caching mechanism should be implemented
> 
> Is it possible to have the best of both worlds, and have the 
> xwork.xml reloaded only on redeploy?
> 
> TIA,
> Craig
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President 
> and CEO of GenToo technologies. Learn everything from 
> fundamentals to system 
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Opensymphony-webwork mailing list 
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to