[
https://issues.apache.org/jira/browse/WW-3602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040270#comment-13040270
]
Greg Huber commented on WW-3602:
--------------------------------
Hello, with this mod
private static void reloadBundles() {
..
bundlesMap.clear();
..
}
and mod and struts.devMode=true for me, my app is now so slow its unusable.
The reloadBundles() seems to get called many times per invocation.
I also needed to reload the messages but had to do a work around from my app to
call explicitly to remove the resource bundle only once.
LocalizedTextUtil.removeBundle("ApplicationResources_en_GB");
modified LocalizedTextUtil added method :
public static void removeBundle(String resourceBundle) {
if (reloadBundles) {
if (bundlesMap.containsKey(resourceBundle)) {
bundlesMap.remove(resourceBundle);
}
}
}
I could not fathom out how it was supposed to be done, and this was the only
way I could get the response to be quicker. Not sure why for me
reloadBundles() gets called so many times.
Cheers Greg.
> auto-reload of properties not working with jetty and struts 2.2.1.1
> -------------------------------------------------------------------
>
> Key: WW-3602
> URL: https://issues.apache.org/jira/browse/WW-3602
> Project: Struts 2
> Issue Type: Bug
> Components: Other
> Affects Versions: 2.2.1.1
> Environment: Linux samxps 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18
> 18:42:20 UTC 2011 x86_64 GNU/Linux
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
> Reporter: Sami Dalouche
> Assignee: Lukasz Lenart
> Fix For: 2.2.3
>
>
> Steps to reproduce:
> - Download Struts 2.2.1.1 : http://struts.apache.org/download.cgi#struts2211
> - Extract
> - cd src/apps/mailreader
> - change pom.xml: <scanIntervalSeconds>0</scanIntervalSeconds>
> - change src/main/java/struts.xml
> <constant name="struts.devMode" value="true" />
> <constant name="struts.i18n.reload" value="true" />
> <constant name="struts.configuration.xml.reload" value="true" />
> - mvn jetty:run
> - load http://localhost:8080/struts2-mailreader/Welcome.do
> - change ./target/classes/mailreader2/MailreaderSupport.properties
> index.heading=MailReader Demonstration Application Options CHANGED
> DYNAMICALLY
> - reload in the browser
> - => the displayed value does not reflect the change in
> ./target/classes/mailreader2/MailreaderSupport.properties
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira