• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

adding new locale support dynamically - is possible?

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the Study Guide:


Internationalized enterprise application will have the following characteristics:

Recompilation is not required to support a new language. It can be localized quickly by the addition of the new language property file entries.



I agree that recompilation is not needed while adding a new properties file for a new language but we must restart the server to get that locale.

So anyway that is going to stop application for a while. Isn't right???
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rathi,

This sounds like a quite uncommon requirement if you ask me.

Anyway, what about implementing an own ResourceBundle class that reads localized information from a database dynamically? There would be no need to restart the server.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lars Behnke:
Hi Rathi,

This sounds like a quite uncommon requirement if you ask me.

Anyway, what about implementing an own ResourceBundle class that reads localized information from a database dynamically? There would be no need to restart the server.



What about performance???

Reading from DB is very time consming and costly than file, IMO.
:roll:
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how about cache these i18n information? once the locale configuration is changed, refresh the cache.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Newman Huang:
how about cache these i18n information? once the locale configuration is changed, refresh the cache.



Where to cache this bunch of information??? :roll:
 
Lars Behnke
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Caching would be a viable solution to solve performance issues. You can use the cache for instance on the web tier. There are good caching frameworks available(see ehcache or JBossCache) for that purpose.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic