Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8536477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:40:31+00:00 2026-06-11T10:40:31+00:00

What are the different ways to resolve UI messages and provide internalization support in

  • 0

What are the different ways to resolve UI messages and provide internalization support in an web application using spring framework?

We use property files and ResourceBundleMessageSource to resolve messages in Spring. Spring’s implementation causes an high cpu usage in our application. There are two problems with ResourceBundleMessageSource implementation.

  1. Locking contention – getResourceBundle() and getMessageFormat() are both synchronized.
  2. MissingResourceException – Resolving a message involves looping through all the resource bundles defined in the application and calling bundle.getString(key). bundle.getString(key) method call throws an MissingResourceException if the key is not found. Searching for the key until we find the message for the given key. Since exception construction is a slow process and could eat up the CPU (which is what I observed in our load tests) this looks like a bottleneck.

Though there are workarounds for both of the above problems (by extending the class and overridding the behavior) I wanted to know if there are other ways in spring framework to provide internationalization support to a web application.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:40:32+00:00Added an answer on June 11, 2026 at 10:40 am

    You can use the ReloadableResourceBundleMessageSource instead. It provides some internal caching.

    If that does not work, I would advise implementing your own MessageSource (It’s fairly straight forward). Spring provides AbstractMessageSource which may be helpful to start with.

    From there, you can implement some caching. More than likely, your localizations are not being updated frequently.

    You can read here on using the new Cacheable annotations in Spring 3.1

    spring 3.1 @Cacheable example

    I have done this already with success in applications that allow admins to override locales in the database. Your particular implementation however would obviously be very different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are the different ways to cache a web application data, developed using Java
I am looking into different ways to implement multi tenant application - one of
What are possible different ways using various language constructs to implement a Singleton pattern
I am looking into different ways to handle updating an ASP.NET application across many
I have researched different ways of creating arrays and how to use lists, but
There are different ways to invoke routes. I currently use Router.navigate( '/url', true )
Different database servers use different ways to quote and escape identifiers. E.g. foo bar
I have two different ways of displaying items in a WPF application. The first
I use two different ways to backup my mysql database. mysqldump with --all-databases is
I use agents in different ways, one of which consists of 100 agents monitoring

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.