You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Woonsan Ko (JIRA)" <je...@portals.apache.org> on 2010/01/07 16:58:54 UTC

[jira] Created: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Reloading resource bundle of portlet definition at runtime
----------------------------------------------------------

                 Key: JS2-1094
                 URL: https://issues.apache.org/jira/browse/JS2-1094
             Project: Jetspeed 2
          Issue Type: Wish
          Components: Portlet Registry
    Affects Versions: 2.2.0
            Reporter: Woonsan Ko


Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko updated JS2-1094:
----------------------------

    Fix Version/s: 2.2.1

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835235#action_12835235 ] 

Ate Douma commented on JS2-1094:
--------------------------------

I think this is the same as JS2-1045 (reported as bug).

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835251#action_12835251 ] 

Woonsan Ko commented on JS2-1094:
---------------------------------

In JS2-1045, it is mentioned, "If I change the properties and redeploy, the changes will not be shown". 
So, I have thought that he meant another problem, not taking the new resource bundle, even if he redeployed the portlet application.
Meanwhile, this issue seems slightly different to me because this covers dynamic reloading on resource bundles, even though the portlet application is not redeployed.

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840727#action_12840727 ] 

Woonsan Ko edited comment on JS2-1094 at 3/3/10 5:50 PM:
---------------------------------------------------------

Fixed by implementing a reloadable property resource bundle class and levering it in portlet factory.

Administrator can reload resource bundles for a portlet application or a portlet definition in Portlet Application Manager portlet. In each detail tab pane, you can find "Reload" button for resource bundle field.

By the way, I'd like to mention that JSTL fmt:setBundle tag does not use portletConfig.getResourceBundle(). Instead, it invokes ResourceBundle.getResourceBundle() directly, which cannot be controlled in Jetspeed.
So, if you want to have the portlet resource bundle reloaded in admin UI, then the portlet should have access to "portletConfig" object like javax.portlet.PortletConfig#getResourceBundle(renderRequest.getLocale()).

Also, there's one limitation:
The portlet info keys ("javax.portlet.title", "javax.porlet.short-title" and "javax.portlet.keywords") are never reloaded because those must be properly registered during deployment time.
So, if you want to reload those, you must re-deploy the portlet application.

      was (Author: woon_san):
    Fixed by implementing a reloadable property resource bundle class and levering it in portlet factory.

Administrator can reload resource bundles for a portlet application or a portlet definition in Portlet Application Manager portlet. In each detail tab pane, you can find "Reload" button for resource bundle field.

By the way, I'd like to mention that JSTL fmt:setBundle tag caches the resource bundle. So, if you want to have the portlet resource bundle reloaded in admin UI, then the portlet should have access to "portletConfig" object like javax.portlet.PortletConfig#getResourceBundle(renderRequest.getLocale()).

Also, there's one limitation:
The portlet info keys ("javax.portlet.title", "javax.porlet.short-title" and "javax.portlet.keywords") are never reloaded because those must be properly registered during deployment time.
So, if you want to reload those, you must re-deploy the portlet application.
  
> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835254#action_12835254 ] 

Ate Douma commented on JS2-1094:
--------------------------------

I agree Woonsan, but once we have support for dynamic reloading on resource bundles, the problem in JS2-1045 might be dealt with too :)

If I understand the report from Frank Otto correctly, he *only* modified the resource bundle and on redeployment those changes were not picked up.
Which would be correct as currently we run a checksum on only web.xml, portlet.xml and jetspeed-portlet.xml, so with those still matching up we simply assume no changes.
If the only thing Frank wants is merging resource bundle changes, dynamic reloading from an admin UI would do the trick for him just as well.

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840842#action_12840842 ] 

Woonsan Ko commented on JS2-1094:
---------------------------------

By the way, the portlet info keys ("javax.portlet.title", "javax.porlet.short-title" and "javax.portlet.keywords") could be changed at runtime by using "Language" tab in the portlet definition management portlet.

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko resolved JS2-1094.
-----------------------------

    Resolution: Fixed

Fixed by implementing a reloadable property resource bundle class and levering it in portlet factory.

By the way, I'd like to mention that JSTL fmt:setBundle tag caches the resource bundle. So, if you want to have the portlet resource bundle reloaded in admin UI, then the portlet should have access to "portletConfig" object like javax.portlet.PortletConfig#getResourceBundle(renderRequest.getLocale()).

Also, there's one limitation:
The portlet info keys ("javax.portlet.title", "javax.porlet.short-title" and "javax.portlet.keywords") are never reloaded because those must be properly registered during deployment time.
So, if you want to reload those, you must re-deploy the portlet application.

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko reassigned JS2-1094:
-------------------------------

    Assignee: Woonsan Ko

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852431#action_12852431 ] 

Woonsan Ko edited comment on JS2-1094 at 4/1/10 4:08 PM:
---------------------------------------------------------

A support tag to set localization context based on portlet config is added. 
Please see http://issues.apache.org/jira/browse/APA-34 for detail. 

Here's one test scenario to test resource bundle reloading with the demo::PickANumberPortlet example: 

(1) Navigate to the default page (http://localhost:8080/jetspeed/ui/default-page.psml) of the portal which contains demo::PickANumberPortlet. 
     You can see the button, "Guess" or other localized string. 
(2) Open the resource bundle properties files in /demo/WEB-INF/classes/org/apache/portals/applications/demo/simple/resources/ folder. 
     For example, you can open PickANumberResources_en.properties and edit the the property like this: 

         pickanumber.label.guess=Guess a number 

(3) Navigate to http://localhost:8080/jetspeed/ui/Administrative/pam.psml 
     And, select demo application and PickANumber portlet ("Pick a number game"). 
(4) Find the "PortletDetailsManager - PickANumberPortlet" portlet window. 
      In the "Details" tab, you can find the "Resource" row and the "Reload" button. 
      Click "Reload" and continue. 
(5) Navigate to the default page (http://localhost:8080/jetspeed/ui/default-page.psml) again. 
     Confirm that the label of the button of PickANumberPortlet changed to "Guess a number". 

Additional Note: If you want to leverage this feature with JSTL fmt tag in jsp pages, you should use <fmt-portlet:setBundle /> instead of <fmt:setBundle .../>. Please see the example in /demo/WEB-INF/demo/simple/PickANumber.jsp. 

Cheers, Woonsan

      was (Author: woon_san):
    If you wish to use the comment text you have typed (shown below), please copy it now. This text will be lost when you leave this screen.
A support tag to set localization context based on portlet config is added. 
Please see http://issues.apache.org/jira/browse/APA-34 for detail. 

Here's one test scenario to test resource bundle reloading with the demo::PickANumberPortlet example: 

(1) Navigate to the default page (http://localhost:8080/jetspeed/ui/default-page.psml) of the portal which contains demo::PickANumberPortlet. 
     You can see the button, "Guess" or other localized string. 
(2) Open the resource bundle properties files in /demo/WEB-INF/classes/org/apache/portals/applications/demo/simple/resources/ folder. 
     For example, you can open PickANumberResources_en.properties and edit the the property like this: 

         pickanumber.label.guess=Guess a number 

(3) Navigate to http://localhost:8080/jetspeed/ui/Administrative/pam.psml 
     And, select demo application and PickANumber portlet ("Pick a number game"). 
(4) Find the "PortletDetailsManager - PickANumberPortlet" portlet window. 
      In the "Details" tab, you can find the "Resource" row and the "Reload" button. 
      Click "Reload" and continue. 
(5) Navigate to the default page (http://localhost:8080/jetspeed/ui/default-page.psml) again. 
     Confirm that the label of the button of PickANumberPortlet changed to "Guess a number". 

Additional Note: If you want to leverage this feature with JSTL fmt tag in jsp pages, you should use <fmt-portlet:setBundle /> instead of <fmt:setBundle .../>. Please see the example in /demo/WEB-INF/demo/simple/PickANumber.jsp. 

Cheers, Woonsan
  
> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835783#action_12835783 ] 

Woonsan Ko commented on JS2-1094:
---------------------------------

FYI, it doesn't seem to work with ResourceBundle.clearCache(...) methods in Tomcat in my testing. :-(
Also, please refer to the following page for the problem:

    http://forums.sun.com/thread.jspa?threadID=5304834

I will try to find a solution a little later.

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852431#action_12852431 ] 

Woonsan Ko commented on JS2-1094:
---------------------------------

If you wish to use the comment text you have typed (shown below), please copy it now. This text will be lost when you leave this screen.
A support tag to set localization context based on portlet config is added. 
Please see http://issues.apache.org/jira/browse/APA-34 for detail. 

Here's one test scenario to test resource bundle reloading with the demo::PickANumberPortlet example: 

(1) Navigate to the default page (http://localhost:8080/jetspeed/ui/default-page.psml) of the portal which contains demo::PickANumberPortlet. 
     You can see the button, "Guess" or other localized string. 
(2) Open the resource bundle properties files in /demo/WEB-INF/classes/org/apache/portals/applications/demo/simple/resources/ folder. 
     For example, you can open PickANumberResources_en.properties and edit the the property like this: 

         pickanumber.label.guess=Guess a number 

(3) Navigate to http://localhost:8080/jetspeed/ui/Administrative/pam.psml 
     And, select demo application and PickANumber portlet ("Pick a number game"). 
(4) Find the "PortletDetailsManager - PickANumberPortlet" portlet window. 
      In the "Details" tab, you can find the "Resource" row and the "Reload" button. 
      Click "Reload" and continue. 
(5) Navigate to the default page (http://localhost:8080/jetspeed/ui/default-page.psml) again. 
     Confirm that the label of the button of PickANumberPortlet changed to "Guess a number". 

Additional Note: If you want to leverage this feature with JSTL fmt tag in jsp pages, you should use <fmt-portlet:setBundle /> instead of <fmt:setBundle .../>. Please see the example in /demo/WEB-INF/demo/simple/PickANumber.jsp. 

Cheers, Woonsan

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840727#action_12840727 ] 

Woonsan Ko edited comment on JS2-1094 at 3/3/10 4:58 PM:
---------------------------------------------------------

Fixed by implementing a reloadable property resource bundle class and levering it in portlet factory.

Administrator can reload resource bundles for a portlet application or a portlet definition in Portlet Application Manager portlet. In each detail tab pane, you can find "Reload" button for resource bundle field.

By the way, I'd like to mention that JSTL fmt:setBundle tag caches the resource bundle. So, if you want to have the portlet resource bundle reloaded in admin UI, then the portlet should have access to "portletConfig" object like javax.portlet.PortletConfig#getResourceBundle(renderRequest.getLocale()).

Also, there's one limitation:
The portlet info keys ("javax.portlet.title", "javax.porlet.short-title" and "javax.portlet.keywords") are never reloaded because those must be properly registered during deployment time.
So, if you want to reload those, you must re-deploy the portlet application.

      was (Author: woon_san):
    Fixed by implementing a reloadable property resource bundle class and levering it in portlet factory.

By the way, I'd like to mention that JSTL fmt:setBundle tag caches the resource bundle. So, if you want to have the portlet resource bundle reloaded in admin UI, then the portlet should have access to "portletConfig" object like javax.portlet.PortletConfig#getResourceBundle(renderRequest.getLocale()).

Also, there's one limitation:
The portlet info keys ("javax.portlet.title", "javax.porlet.short-title" and "javax.portlet.keywords") are never reloaded because those must be properly registered during deployment time.
So, if you want to reload those, you must re-deploy the portlet application.
  
> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (JS2-1094) Reloading resource bundle of portlet definition at runtime

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/JS2-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835680#action_12835680 ] 

Woonsan Ko commented on JS2-1094:
---------------------------------

Hi All,

I've tried to find a proper solution for dynamic reloading of resource bundles, but with JVM 1.5 or earlier, it is not possible to refresh the internal cache in java.util.ResourceBundle.

One possible trick is to not depend on the classloader, but to use separate loading mechanism from a other location than the classpath. 
You can find this style for a solution in the springframework. (Please have a look at org.springframework.context.support.ReloadableResourceBundleMessageSource if you're interested in.)
However, I think this kind of technique is kind of overkilling and risky for our specific case.

On the other hand, Java 1.6 or later now provides java.util.ResourceBundle.clearCache(ClassLoader) operation to clear all resource bundle cache from the classloader.
I think this is very simple and good enough to refresh resource bundles for a portlet application.
We can simply add a button to clear all resource bundles of a portlet application in a j2-admin portlet.

Therefore, I'd like to add the functionality in the portlet application management portlet with a limitation, "Java 1.6 or higher for this". Otherwise, it will just ignore the operation.
I'd like to implement this in this simple way for v2.2.1.

Any comment would be appreciated.

Regards, Woonsan

> Reloading resource bundle of portlet definition at runtime
> ----------------------------------------------------------
>
>                 Key: JS2-1094
>                 URL: https://issues.apache.org/jira/browse/JS2-1094
>             Project: Jetspeed 2
>          Issue Type: Wish
>          Components: Portlet Registry
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> Currently, the resource bundle defined in the portlet descriptor for a portlet definition cannot be reloaded at runtime.
> It would be great if it is possible in admin UI.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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