I have a JSF 2.0 app that runs on multiple domains and serves up different content based on the domain running. I have a table in the database that contains the domain names, along with an id. I have a header and footer bean and want to be able to access the domain id in both these beans, but I only want to retrieve the domain id once. Should I create a common bean? If so, how do I ensure this bean is executed when the session starts? How do I access the domain id in the common bean from the header and footer bean?
问问题
45 次