Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding new locale support dynamically - is possible?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • 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???
 
Lars Behnke
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • 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: 3830
  • Mark post as helpful
  • send pies
  • 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:
 
Newman Huang
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • 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: 3830
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!