You’re a client. You have a reference to the AdviceBean’s component interface. You know you can call getAdvice(). But now that you’ve gone to all the trouble of getting the stub, are there other things you might want to do?
What YOU write:
EJBObject (the bean’s bodyguard for business methods)
What the CLIENT sees:
Remember, the container implements your component interface and matching stub.
The container must implement EVERYTHING from Advice and EJBObject.
You better know these other methods inside and out.
The exam expects you to know all five of the methods in EJBObject. You have to know that they’re available to Remote clients, and exactly how they’re used!
If you’re a client, and you want to...
get the primary key of an entity bean
We won’t go into this now, since we have 10 million pages on entity beans coming up. Just know that this does not apply to session beans, which don’t have a unique identity exposed to the client. But if the client somehow gets a reference to an entity bean (maybe by searching on a customer’s name) and wants the actual primary key, this is the method to call. Try it on a session bean, and ...