Java Reference
In-Depth Information
JSF Managed Beans have been, for long, the actual glue between the application
view and the business methods. Since the Release 2.0 of JSF, you can declare JSF
Managed Beans via an annotation and the scopes are expanded with a view scope
and the ability to create custom scopes. However, apart from the view scope, there
is very little still going for JSF Managed Beans, which can be replaced by CDI Beans
that are much more flexible and allow a better integration with other Java EE com-
ponents.
On the other hand, EJBs, even using a less flexible injection mechanism, still main-
tain some unique features such as schedulable timers, asynchronous operations,
declarative transactional execution, and pooling, that are essential for throttling and
the prevention of denial of service attacks.
So it's likely that EJBs are not disappearing from our code. Rather it is likely (and de-
sirable too) that they will continue to be used for some of their unique features, while
for the remaining part, its functionality will be exposed via CDI instead of EJB's own
annotations such as @Stateless and @EJB .
Search WWH ::




Custom Search