This is the scenario I'm facing on:
I have a configuration screen where I need to show/update some configuration parameters that are read from DB with one query.
This is how I'd like to do it, after the backing bean (with request scope) is created then read the parameters from DB and initialize the bean members so when the page gets rendered everything is in place. I could do this in the bean constructor but I need to use a static call to get the DB connection. I would rather use dependency injection for this, that means after the connection has been set then to do the query and initialize the bean. Although this would work my gut feeling says it is not right. I would prefer to have some event handler that I could implement and that would be called after the bean has been created and all the dependency set. I couldn't find anything like that, and all other solutions do not seem right.
Is it something that I'm missing here? Can this be implemented in another way elegantly?
Thanks.
Marius.