The
EJB specification requires the EJB container to enable CORBA clients, even if not written in
Java, to make EJB calls. The protocol used is RMI-IIOP which makes RMI-IIOP CORBA compatible.
When the client makes a JNDI lookup for the home stub, the object returned will not implement your remote home interface if it is a CORBA client. Therefore, the narrow method is supplied by the EJB server provider to convert the object so that it implements your remote interface.
If the container is not using RMI-IIOP as the underlying communication transport, then the narrow would not be needed. However, it costs little to do the narrow, so it should always be done in your example.