These are some take-away points after I took the quiz:
- Directly Use
Object.equals(Object other)to compare EJB3 session bean references. No moreisIdentical(EJBObject other). - EJB3 lifecycle methods, interceptor methods, and injection fields/methods can be of any access type: public, protected, private, or default.
- Use
SessionContext.lookup(String name)to lookup EJB and resources, e.g.,sctx.lookup("jdbc/defaultDB");Note the name has no prefix"java:comp/env". This prefix is still required in regular JNDI lookup. - A EJB3 session bean can have any number of local and remote business interfaces. But an interface cannot serve as both the remote and local interface for a bean.