• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI-IIOP and Local Home & Component Interfaces

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been reviewing the spec and the Head First book, and it is clear that the remote component interface and home methods in the remote home interface have to be RMI-IIOP compliant.
This restriction is not noted in the corresponding local component and local home interface sections. It is logical to assume that the restriction does not apply to local interfaces (since objects won't be passed over the wire) but I just wanted to be sure.
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're absolutely right -- local interfaces don't have that restriction because for local interfaces, plain old Java language rules apply... and everything is passed by value/copy (i.e. a copy of the bits in the variable are passed... either a copy of a primitive, or a copy of a reference).
Which is perhaps one of the most significant issues related to local vs. Remote interfaces... with local interfaces, a business method is passed a reference to an existing object on the heap, and thus the business method might *change* the object in some way. With Remote interfaces, the business method is passed its very own *copy* of the whole object itself, and any changes made to the object don't affect the original object that was passed.
Good question. Never hurts to be certain about your assumptions, no matter how obvious they might seem. There are no dumb questions
(except the ones you're too afraid to ask)
Cheers,
Kathy
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic