Why can't I have a bean session as JSF bean support in Java EE 5

AFAIK, the whole goal of JBoss Seam is to integrate EJB and JSF.

The Seam in Action book says:

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 well if they are completely isolated from the web tier, accessible only through JSF bean support, acting as an intermediary.

But I could not find the reason / motive for this impossibility, why are they isolated from the web level? Why can't I use EJB as a bean support? Mention me?

+3
source share
2 answers

/ , -?

- . - , , , .

EJB beans, FacesMessages , , ..

. , , EJB EJB ( EJB3 ). Java EE 6 EJB -. CDI beans.

(, , ), ( -, -, JSP ).

+2

. CDI (Weld), . CDI @Inject EJB JSF bean. ( , CDI, CDI JavaEE6, @EJB private RemoteInterface bean)

JPA. JPA EJB, "Entity beans", EJB, EJB JPA, . JPA - ORM. EJB - /.

@Entity EntityManager. ejb, , CDI. , , . . CDI/EJB/Seam , , .

0
source

Source: https://habr.com/ru/post/1788003/


All Articles