Howdy -- good question
The ONLY things that must be narrowed are remote stubs!! Nothing else retrieved from an RMI-IIOP call must be narrowed.
And in fact, the *only* stubs that need to be narrowed are those for which the declared return type does not match the interface to which you are casting it. Thus:
* The home stub needs to be narrowed, because it is coming from a method with a return type of Object.
* The EJBObject stub that you get from create() (or find) does NOT need to be narrowed, because the return type of create already specifies the EXACT interface type to which you would be casting.
So, think of narrowing as a form of exotic casting for stubs. It you don't need to cast the stub, then you don't need to narrow it. If you DO need to cast the stub, then you probably need to narrow it as well. But if it is NOT a stub, then you do not need to narrow it, regardless of whether it needs to be cast, and regardless of whether it is coming from a remote call.
For your other question, yes, it *is* true that the stub could be implemented in such a way that it does internal processing and not all calls (like getPrimaryKey()) are remote. But yes YOU are to always assume that *every* call is remote, because according to the spec, the vendor is free to use plain old RMI-IIOP stubs as generated by rmic, and those stubs will not contain any other logic other than knowing how to send the call over the wire to whatever is waiting to receive it on the other side.
Mostly, you'll find narrowing here:
* ALL JNDI lookups of the remote home interface (your initial lookup of the bean's home)
* ALL calls to getHandle() or getHomeHandle() (because they always return a remote stub)
You will NOT find narrowing here:
* Lookups of a *local* home interface
* ALL calls to create() or find(), regardless of whether it is remote or local
* ALL other remote calls *unless* the remote business method is returning a remote stub, and only if the return type of the method is NOT the same as the interface type to which you intend to cast it.
Hope that helps... I'm still a little brain-dead
Cheers,
Kathy