Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A Question in PortableRemoteObejct.narrow()  RSS feed

 
Vasantha Prabha
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi can any one tell me How does the below code works,
Initialcontext ck=new InitialContext()
Object obref=ck.lookup("Hello");
HelloHome hHello=(HelloHome)PortableRemoteObject.narraw(obref,HelloHome.class); --> can any tell me what does this narrow
do ?
Regards,
Sangeetha
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sangeetha
Following link might be helpful,
http://www.jguru.com/faq/view.jsp?EID=734137
Regards
Maulin
 
Maulin Vasavada
Ranch Hand
Posts: 1873
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question Vasantha!.....

Maulin's links provide the correct answers. This is in fact an interview question in EJBs
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!