Quantcast

Reloading i18n on demand

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Reloading i18n on demand

heikki
hello,

I've read that Wicket in Development Mode reloads changes to property files on the fly, but not in Production Mode, when they are "heavily cached".

Is there a way to reload property files such as those used for i18n in Production Mode, either on the fly or on demand ?

I would suppose it could be possible that they're re-loaded on demand, after which the heavy caching could take place again. But I haven't found any information on this.

Anyone have a suggestion ?

thanks in advance
Heikki Doeleman
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Reloading i18n on demand

Martin Grigorov-4
See how org.apache.wicket.util.watch.ModificationWatcher resets the caches.

On Thu, Sep 8, 2011 at 2:43 PM, heikki <[hidden email]> wrote:

> hello,
>
> I've read that Wicket in Development Mode reloads changes to property files
> on the fly, but not in Production Mode, when they are "heavily cached".
>
> Is there a way to reload property files such as those used for i18n in
> Production Mode, either on the fly or on demand ?
>
> I would suppose it could be possible that they're re-loaded on demand, after
> which the heavy caching could take place again. But I haven't found any
> information on this.
>
> Anyone have a suggestion ?
>
> thanks in advance
> Heikki Doeleman
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Reloading-i18n-on-demand-tp3798545p3798545.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Reloading i18n on demand

heikki
hi Martin,

thanks for the pointer.

Having taking a quick look at the source, it looks like one very easy way to preserve reloading on the fly is to add a line like this in my Application's init() method:


        getResourceSettings().setResourcePollFrequency(Duration.minutes(2));

this'll serve my purpose for the moment just fine -- as soon as I have time I'll investigate more how to achieve actual on demand reloading (without polling).

thanks and kind regards
Heikki Doeleman
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Reloading i18n on demand

Gabriel Landon
Maybe it's a bit "too much" but I use the following to reload the properties files :

Application.get().getResourceSettings().getLocalizer().clearCache();
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Reloading i18n on demand

robmcguinness
In reply to this post by heikki
unless things have changed I used to use the JMX panel to destroy the Wicket caches during production.  worked like a charm when I need to replace the markup on the fly without redeploying.
Loading...