This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi guys, my question is when we are using EL FUNCTIONS for internationalization we are making use of tat static function to read the message properties file and locale and get the things accoridng to the locale from the properties.... my doubt is,is it possible to retrieve the datas from a database which we usually get from the properties file using the functions present in facesContext...if its possible, is ther any defualt functions available for doing the same as we hav for message property files....
Nothing specific to JSF. You can probably find some samples of utility classes that overload the Properties load() method using a database as a source.
There are 2 main reasons why nothing specific to DBMS's:
First, because you can arrange the properties in the DBMS however you like and different people like different ways. There's no "one-size-fits-all" solution.
Secondly, flat files and DBMS's aren't the only ways to get properties. I could use LDAP, a web service, even the Fairy Courier Delivery Service. So rather than try for every possible specific solution, they made the Properties class extensible.
A DBMS-loaded Properties class shouldn't be too difficult. Just extend java.util.Properties and overload the load() method with one that opens the connection to the DBMS, reads the key/value pairs and does a "this.setProperty()" against each. And closes the connection when you're done, of course.