----- Original Message -----
From: Rafizan Baharum <[EMAIL PROTECTED]>
> 6 Registrant reg = (Registrant)
> 7 PortableRemoteObject.narrow(pkRef,
Registrant.class);
> im 100000% sure that line 1 actually retrieves primaryKey (BigDecimal)
from
> Registrant Entity Bean but why do i have to cast it to Registrant (line 7)
first
> in order to get the primaryKey.
PortableRemoteObject.narrow is defined as:
public static Object narrow(Object narrowFrom,
Class narrowTo)
throws ClassCastException
which as you can see returns type Object which then (as Java is such a
strongly typed language) MUST be cast back to the class you have narrowed
down to...
Hope this helps, and I havent misunderstood your question...
Good luck,
Tim.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]