AFAIK, the whole purpose of JBoss Seam is to integrate EJB and JSF.
The book Seam in Action says that:
By design, EJB components cannot be bound directly to a JSF view. It’s great that EJB components are scalable, transactional, thread-safe, and secure, but it doesn’t do much good if they are completely isolated from the web tier, accessible only through a JSF backing bean acting as an intermediary.
But I couldn't find the reason/motive of such impossibility, why are they isolated from the web tier? Why can't I use an EJB as a backing bean? Care to enlighten me?
But I couldn't find the reason/motive of such impossibility, why are they isolated from the web tier?
Traditionally this was done to enforce the separation between business logic and view related code. Intermixing those is what most every beginner does and it always leads to systems that are hard to maintain in the long run.
By allowing EJBs to be directly used as backing beans, people are going to put FacesMessages in them, and formatters specific for one particular page, and rendering code and so on.
Strict isolation prevents these mistakes to be made. However, this also raises the bar for those very same beginners to get started with EJB and gave EJB the reputation of being somewhat difficult (although with EJB3 this is not really the case). In the latest Java EE 6 release, a lot of intermixing is made possible by allowing EJBs to be defined without interfaces in the web module. With CDI annotations they are directly useable as backing beans.
Depending on your view, this is a step forward (easier, less constraints, less required artifacts), but it could also be seen as a step backward (promotes mixing of view and business logic again, something which deprecating scriptlets on JSP tried to prevent).