• Post Reply Bookmark Topic Watch Topic
  • New Topic

Method - Object getPrimaryKey()

 
Ashok Ambati
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When invoking the above method on an EJB object using a stub, why is it OK to just cast the returned object to the appropriate type and not narrow and cast it?
 
Keerthi P
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because primary keys are neither network aware nor do they extend from java.rmi.Remote. They are not same as stubs.
[ August 20, 2004: Message edited by: Keerthi P ]
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!