When we execute a lookup to get the home interface of a bean, we normally use the lookup() method of the javax.naming.Context interface. This method will return an Object that needs to be casted to the home interface that we asked for. Unfortunately, this cannot be done using the normal casting [MyHome myHome = (MyHome)returnedObject]. The reason is related to CORBA.
For EJB, the communication between the server and the client is based on RMI (both remote and local interfaces, in fact, do implements the java.rmi.Remote interface). The underlying protocol that is used for the communication is IIOP, that is part of CORBA standards. So basically the communication protocol in EJB is Java RMI over IIOP.
IIOP has not been designed only for Java. It is for generic languages, and this means that there are some limitations. Some languages, in fact, do not have the concept of casting. Java RMI-IIOP provides a mechanism to narrow the Object received from our lookup, to the appropriate type. This is done through the javax.rmi.PortableRemoteObject class and, more specifically, using the narrow() method.
But when using EJB 2.0 Local Client API, we can do a direct/explicit cast from the looked up Object, to the interface type that we need.