While we can use the ApplicationContext for Internationalization, we may also need the functionality to be available to normal beans.
Search This Blog
Sunday, 8 July 2012
Thursday, 5 July 2012
Reloadable MessageSources
As we saw in the previous post, the ResourceBundleMessageSource uses underlying JDK's ResourceBundle implementation. The java.util.ResourceBundle loads locale specific files or bundles only once. It caches loaded bundles forever: Reloading a bundle during program execution is not possible. As this MessageSource relies on ResourceBundle, it faces the same limitation.So we are stuck with the same set of values. Spring provides us with an alternative implementation - ReloadableResourceBundleMessageSource.
Tuesday, 3 July 2012
Spring and Message Loading
One of the advantages of using the application context is that we can load locale specific messages using the ApplicationContext. More simply put Spring includes Localization and Internationalization support.
Sunday, 1 July 2012
Lazily loading beans ?
One of the differences between BeanFactory and ApplicationContext is their method of loading beans. The beanfactory lazily loads beans. It creates the bean only when the getBean() method is called.
Saturday, 30 June 2012
Intercepting Events in Hibernate
Much of what Hibernate does, happens in the background and the application is not aware of the same. For example dirty checking of entities and scheduling sql update queries for the modified objects is something that Hibernate manages on its own.This is very good in a way, because it removes the amount of code we need to write.
Subscribe to:
Posts (Atom)