To be more clear, The object(stub) that is in the JNDI Naming space has been implemented in a language that is different from JAVA but a Java Application(EJB Container) wants to make use of it, had it been java a simple cast would have served the purpose but when the remote object(stub) has been implemented in a different language and was made available through Corba, there is much more one has to do (cast wont work) to check if that exported object can act as our EJBHome and then convert the stub into a class which can act like a normal java-stub and this is exactly what happens in the implementation of the the PortableRemoteObject.narrow(...) method, after it checking if casting would work. Since we dont know the type of the exported stub we need to have a util method which can tell us if that exported stub can act as our EJBHome Stub and then to convert it accordingly and that method is what our PortableRemoteObject.narrow(...) Hope this helps !
Regards, kris -----Original Message----- From: Ashwani Kalra [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 4:03 PM To: [EMAIL PROTECTED] Subject: PortableRemoteObject.narrow Hi, Why its asked to use PortableRemoteObject.narrow(home, home.class) instead of just downcasting. The specs mention it is due to rmi-iiop compatibility. Can any body explain in more details about it. TIA Ashwani Kalra =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".