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
posted 12 years ago
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
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads