struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4266) resource reloading does not work in IBM JVM
Date Fri, 28 Feb 2014 09:45:20 GMT

    [ https://issues.apache.org/jira/browse/WW-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915606#comment-13915606
] 

Hudson commented on WW-4266:
----------------------------

SUCCESS: Integrated in Struts-JDK6-develop #7 (See [https://builds.apache.org/job/Struts-JDK6-develop/7/])
WW-4266 Adds support for IBM JVM to reload resources (lukaszlenart: rev 9c5177c961fb850b80089ef4113a17d361c23fa6)
* xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java


> resource reloading does not work in IBM JVM
> -------------------------------------------
>
>                 Key: WW-4266
>                 URL: https://issues.apache.org/jira/browse/WW-4266
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.16
>         Environment: WAS 8.5 with IBM JVM 6
>            Reporter: Christoph Nenning
>            Assignee: Lukasz Lenart
>            Priority: Trivial
>             Fix For: 2.3.17
>
>         Attachments: struts2-fix-resources-reloading-in-ibm-jvm.patch
>
>
> When resources reloading is enabled, LocalizedTextUtil uses reflection to clear a private
static map of the ResourceBundle class. The member name of that map is "cacheList".
> The IBM JVM has a different impl of ResourceBundle which does not have the "cacheList"
member. That causes a lot of NoSuchFieldExceptions in log and resource reloading does not
work.
> To fix it the patch catches NoSuchFieldException and uses clearMap() to clear the cache
of that IBM ResourceBundle (which is just called "cache").
> Notes:
> - Javadoc indicates that that IBM code is based on the Apache Harmony project
> - The type of that cache member is:
> WeakHashMap<ClassLoader, Hashtable<String, ResourceBundleSoftRef>>
> So one could argue that the patch clears too much, but IMHO that is OK as it is intended
for development mode anyway.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message