Server-initiated Rendering: EJB -> FacesContext?

Posted by egbokul on Stack Overflow See other posts from Stack Overflow or by egbokul
Published on 2010-04-20T08:43:03Z Indexed on 2010/04/20 9:03 UTC
Read the original article Hit count: 316

Filed under:
|
|
|
|

I've already asked this question on the Icefaces forum, but meanwhile I realized that this is a more generic problem.

I'd like to update parts of a JSF page when I get a message in my MDB.

The problem is, how do I get the FacesContext from the EJB container?

In the message processing function FacesContext.getCurrentInstance() returns null.

I've also tried to make a JSF managed bean be a MDB, but I couldn't (it seems you can't have both in the same class?).

Since I'm a beginner in the JSF world I'm kind of stuck now. Is there a way to make it work?

(Glassfish v3 + Netbeans 6.8, JSF2 + Icefaces 2.0 alpha2)

© Stack Overflow or respective owner

Related posts about jsf2

Related posts about ejb3