Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: remove bit about security, as it's related to the chain of method calls, and the container, not the context.

...

  • Server side beans should access other beans on the server via the default no args constructor (EJB 3 spec 15.3.1 Bean Provider's Responsibilities), in order to propagate the security .
  • Container side lookup names must be preceded with java:comp/env, as in java:comp/env/myBean. e.g.
    Code Block
    initialContext.lookup("java:comp/env/beanName")
  • note that java:comp/env/ is empty by default, and you need to declare your references, whether via xml or annotations
    • Declared via annotations
      Code Block
      @EJB(name="myBean", beanInterface = IMyBean.class)
      public class DependentBean ....
    • Declared via xml INCOMPLETE
  • Clients is a good reference for more complex lookups, including authentication.

...