Wednesday, September 28, 2011

Some JSF 2 rules to remember

  1. Request Bean can hold a reference to a Session Bean. Not vice versa, because a session bean has a longer life than a request bean and the rule is that longer scoped beans can't hold shorter scoped beans but vice versa is allowed.
  2. Cyclic references are a strict no. That is a request bean refers to a session bean which in turn holds a reference to the previous request bean is not allowed.