5/22/2006

EJB3 Quiz from Sun

Questions cover various major changes in EJB3 Simplified API, are tricky questions. If you are familiar with EJB 2.x but new to EJB3, you may be surprised by some answers. So go ahead test your EJB3 knowledge here.

These are some take-away points after I took the quiz:

  • Directly Use Object.equals(Object other) to compare EJB3 session bean references. No more isIdentical(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.
Tags: , , , ,