This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

two objects implementing same remote interface  RSS feed

 
vijay kumar
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If two or morethan one object implements the same remote interface ,

are those objects equal.do they can not have different data.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Even if the same implementation is bound as another name in the RMI registery, each can hold different data.

Another problem is with the "equals" method - if a client calls "equals" on two stubs, the default "equals" method that tests object identity is used, which isn't going to return true unless you have the exact same stub. "equals" isn't going to test actual data equality on the server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!