After we implemented the session beans, we should be able to access it.
EJB interactions:
A client for and EJB can be:
- Java EE Application Client
- Java EE component (JSP,Servlet,JSF,EJB)
- Any java object
- Java application
Client finds a proxy to interact with an EJB using:
- Java naming and directory interfaces(JDNI)
- Dependency Injection(used most of the time)
Steps for interacting with with and EJB(3-step plan)
- Declare the reference for the EJB interface
- Get the EJB “instance”
- using JNDI for remote clients or legacy EJBs
- using DI for local clients or application clients
- Invoke methods on the interface