A good workman is known by his tools.
A good workman is known by his tools.
Originally posted by Marc Peabody:
[QB]Question about the isIdentical() method of EJBObject:
I was initially confused about this isIdentical() method too. My questions (which I later answered) were as follows:
Q: Does EJBObject.isIdentical() only compare the object references? Or the contents of the objects?
A: Compares the object itself for if they are "meaningfully equivalent" (defined further by the Q & A's below)
Q: This should never be true on session beans then, right?
A: STATEFUL: this will never be true. STATELESS: will be true if reference came from the same Home.
Q: Who cares if this returns true on entity beans? When would that even be useful information?
A: True on entity beans if stubs refer to entities with the same primary key.
A good workman is known by his tools.
Originally posted by gayle craig:
Why does the Home interface that we write (the one that implements EJBHome) have to define a no-arg create() method? I mean, why didn't they just put that in EJBHome so that our Home doesn't have to define the same exact thing every time? (similar to the way EJBObject defines a no-arg remove() method for us).
A good workman is known by his tools.
Originally posted by Marc Peabody:
If it did, we could not override it and add our own application exceptions to the throws clause. Also, we would be forced to cast and narrow because it would return Object (although doing so would be consistent with everything else.
There are probably other reasons for it as well.
A good workman is known by his tools.
Regards,<br />Subhash Bhushan.
The examples they use about serializing, save to disk, move to different computer, deserialize and continue shopping, that seems unrealistic
- How would you get into the code to get the object and serialize it if you didn't write the code?
- And if you did write the code, then you're probably not a "user"?
- When in real-life apps would you need to do this really?
Regards,<br />Subhash Bhushan.
Coffee Cram - p 170-171
Question 3: Given a remote client "R" that has valid references to session beans "A" and "B", and given that A is a local client to B, which statements are true?
I wasn't sure about answers A and B. I thought either both would be true, or both would be false. The explanation for B says "You can't give a remote client a local reference, A sees B through a local reference."
How, then, can R pass his reference for A to B? Isn't the reference that R has for A still "remote reference" which would mean nothing to B?
Regards,<br />Subhash Bhushan.
Originally posted by Agni Vartula:
[/b]
...
Does this satisfy you?
A good workman is known by his tools.
Regards,<br />Subhash Bhushan.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |