Some more fodder for the beta studiers
Remember: It's not an open book
test!
IMPORTANT NOTE: I cheated a little by saying 'choose all that apply'. On the real exam you will ALWAYS be told how many answers are correct, I just wanted to toughen it up a little
1 Which statement about session beans is true?
a). The bean provider must write the method public void remove() in both stateless and stateful session classes.
b). Local clients can remove session beans by calling a method on the bean's home.
c). The ejbRemove() method in the component interface can be used only by remote clients.
d). To ask the EJBHome to remove a session bean, the client must provide the bean's handle.
2 Which statement about locating or using a session bean's home interface is true?
a). Acquiring an 'InitialContext' is required only for remote clients.
b). The 'InitialContext' must be narrowed before it can be used.
c). Once acquired by a client, a home interface can be used multiple times.
d). The client can acquire a handle for the bean's local home interface.
3 When comparing two session objects, what is true? (Choose all that apply.)
a). Using the 'isIdentical' method, stateless session beans from the same home will always return true.
b). Using the 'isIdentical' method, stateful session beans from the same home will always return true.
c). The 'isIdentical' method can be used only for remote object references.
d). Using the 'equals' method, stateless session beans from the same home will always return true.
e). Using the 'equals' method, stateful session beans from the same home will always return true.
4 Which method can be called by both remote and local clients on a reference to a session bean's component interface?
a). ejbCreate
b). getSessionContext
c). getPrimaryKey
d). getEJBHome
e). remove