• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue of casting of remote reference

 
Fozan Zaidi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchians
Here I have Richard Monson-Haefel book in my hand Here I m finding a code Which is looking to b a bug .I want to ask EJBObject.getPrimaryKey() method returns an Object reference .If we call this method and then want to cast its return type to any sub type then I think it should be casted by first making use of PortableRemoteObject.narrow() method and then java casting should b applied bcz it is was a remote call .But here the writer has directly cast this return type which may b wrong .What do u think .M I right if not why? bcz objects returned as remote call should not b directly casted .Can some body plz explain .
(See the code : Richard Monson-Haefel 3rd edition ,page 136 , 338 , 339 and many)
Fozan Zaidi .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic