What is the difference between Context, InitialContext and Session Context? How they are used?
javax.naming.Context is an interface that provides methods for binding a name to an object. It's much like the RMI Naming.bind() method.
javax.naming.InitialContext is a Context and provides implementation for methods available in the Context interface.
There is EntityContext too which is also and EJBContext object that'll be provided to an EntityBean for the purpose of the EntityBean accessing the container details.
In general, the EJBContext (SessionContext and EntityContext), AppletContext and ServletContext help the corresponding Java objects in knowing about its 'context' [environment in which they run], and to access particular information and/or service.
Whereas, the javax.naming.Context is for the purpose of 'NAMING' [by the way of referring to] an object.