I don't think you can narrow something that is not itself remote. The API states that PortableRemoteObject.narrow:
Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type
It states that you would get a ClassCastException if narrowFrom cannot be cast to narrowTo. If narrowFrom (i.e. your object that doesn't need to be narrowed) is not a Remote interface, I am guessing you would get a ClassCastException. I'm not quite sure what they mean by an abstract interface type...aren't all interfaces abstract? If that's the case, then perhaps you can narrow to anything as long as it implements the interface you are using to do the narrow?
You could verify this for certain by either trying it yourself, or cracking open the code for PortableRemoteObject and seeing what it really does.
Cheers, Jason [ August 13, 2004: Message edited by: Jason Mowat ]
Whatever you say buddy! And I believe this tiny ad too:
a bit of art, as a gift, that will fit in a stocking