Session Bean Client can obtain a session bean's business interface via dependency Injection or JNDI lookup.
Using the interface, the client needs to obtain a stub object of the session bean via JNDI.
All calls made to the stub object are routed to the container and invoked against the managed bean instances.
For stateless session bean, a new stub can be obtained on every invocation/call.
For stateful session bean, the stub needs to be cached on the client side so that container knows to provide the same bean instance for each subsequent call.
A client Application that can access a session bean can be of 3 types
Remote Client
It runs in separate JVM and access the session bean through bean's remote business interface
It can be another EJB, a java client program or a java servlet.
Objects must be serialized and are passed by value.
Local Client
It runs in the same JVM and access the session bean through bean's local business interface .
It can be another EJB or web application using java servlets, JavaServer Pages(JSP) or JavaServer Faces(JSF).
Objects are passed by reference.
Web Service client
It can invoke stateless session bean published as web service.