Howdy -- this is kind of a confusing exercise, because not all pieces are shown in the picture. On the instructions on page 107, it says, "Note: not all the pieces are here, so when you're done, if you can think of other things that should into the picture (classes or objects) draw them in!"
So you are RIGHT -- the client and server MUST have the
EJB object stub class as well as the interface. We just didn't show the EJB object stub class in the diagram (so that you could figure that out
The other thing that we did not show is the Home interface, which also must be on BOTH the client and server.
Those are the things that
you should draw into the picture yourself:
* EJBObject stub class (put it on both the client and server)
* Home interface (put it on both the cilent and server)
So... the story is;
CLIENT:
Besides the client code, needs the home and component interfaces at both compile and runtime, and the home and component interface 'stub' classes at runtime. The cilent will also need the home and component interface stub OBJECTS at runtime (but that's why the stub classes have to be there, one way or another).
SERVER:
Needs everything that the client needs except the client class, BUT it will also have the implementation classes for the home and component interfaces (i.e. the *things* the stubs can communicate with).
Remember, these diagrams and concepts are about how it *appears* to work. What the Container really does can be different. The most important thing to know is that without the home and component interfaces, the client cannot even compile, and that without the stub classes, the client will fail at runtime.
However, some Containers provide this capability dynamically. So whether YOU as the Bean Provider must hand-deliver the stub classes to the client really depends on your Container. With the J2EE R.I., the client MUST have the stub classes *before* you try to run the client, while other servers can send the classes dynamically using one of several mechanisms (you don't have to know ANYTHING about dynamic proxies or dynamic code downloading for the exam!)
cheers,
Kathy