There's something I'm have trouble with. I was going through an sample question in HFEJB to do with what could access what and it messed me up. To paraphrase:
You have a remote client 'R', that has valid references to session beans 'A' and 'B'. A is a local client to B.
Apparently, R can pass its reference for A to B. The handle(?) for A gets serialized and passed to B. I can live with that.
I'm assuming that R is in a different VM to A and B (remote), and that A and B share a VM (local). A has a local view of B.
Now what's just happened is that R has passed its remote view of A to B, presumably so that B can do something with A. Given that you can't mix remote and local syntax, B therefore has to reference A as a remote object, going through stub, EJBObject and then to the bean itself in order to call a method.
Firstly - is this actually legal? My impression was that you had to use a local view within the same VM. And if it is, why not just handle every bean via the remote syntax? Narrowing and checking for a RemoteExceptions doesn't seem like that big a price to pay for a standard way of handling all EJBs.
I'm definitely missing something here...
<- I couldn't wait to use one of these things