I have a question about EJB.

Why do we have to narrow the object when obtaining a reference to the remote interface (EJB) in a servlet (from a web application)?

Object result = getContext().lookup(StoreAccessHome.JNDI_NAME);
return ((StoreAccessHome) PortableRemoteObject.narrow(result,StoreAccessHome .class));

I never narrowed it when testing my EJB from a test class, y just did:
return (StoreAccessHome) getContext().lookup(StoreAccessHome.JNDI_NAME);

What is the diference?

Thanks in advance,