Monday, November 19, 2001 12:52 AM
javax.naming.Context is an interface
that provides methods for binding a name
to an object. It's much like the RMI
javax.naming.InitialContext is a Context
and provides implementation for methods
available in the Context interface.
Where as SessionContext is an EJBContext
object that is provided by the EJB
container to a SessionBean in order for
the SessionBean to access the information and/or services or the container.
There is EntityContext too which is also
and EJBContext object that'll be provided to an EntityBean for the purpose of the EntityBean
In general, the EJBContext (SessionContext and EntityContext), AppletContext and
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.