I'm new to Java EE and I have a task to do but no idea how to do it. I need to create a manged bean that will be scoped on the application. Everytime we start the application, the bean needs to load a list of data from database. So, according to my research on the web, I need:
- Create a managed Bean.
- Add the bean name to faces-config as an application scoped bean.
- On the bean, add all the methods to load the datas.
So how to set loading at the application start-up ? And then how to get these loaded datas from anywhere in the app?