Monday, January 31, 2011



>both have been deprecated recently.

Since the Oracle WebLogic release on 15 Jan 2011 - EJB injection on a JSF managed bean can be accomplished by pure annotation. For example, here is part of the Collatz Distributed project where we inject a @Stateless session bean into an @ManagedBean JSF 2.0 managed bean. The Stateless session bean is itself dependency injected with a JPA 2.0 @PersistenceContext EntityManager for ORM JTA transactions either via standard Java EE 5 EJB tier JTA container managed transactions or even in the Web container using EJB 3.1 Lite and JTA 1.1 as part of the Web Profile.

@Stateless(mappedName = "ejb/CollatzFacade")
public class CollatzFacade implements CollatzFacadeRemote, CollatzFacadeLocal {

    @PersistenceContext(unitName = "CollatzGF-ejbPU", type=PersistenceContextType.TRANSACTION)
    private EntityManager entityManager;

public class MonitorManagedBean {
    private CollatzFacadeLocal collatzFacade;

Total Pageviews