This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am preparing questions for an SCJA exam study group for fellow employees. The following questions have been peer reviewed and they disagree with the answers. Please give me your opinions.
Q1: SMTP is used to do which of the following?
A. It is an XML-based registry used by businesses to make their services and general business descriptions available through the Internet.
B. It is a protocol used for information exchange within a decentralized and distributed environment.
C. It is a protocol used to send electronic mail.
D. It is an API used to build remote procedure calls in order to build web services and clients
C is correct. SMTP stands for Simple Mail Transfer Protocol. This protocol is used to send electronic mail.
A, B, and D are incorrect. A is incorrect because the answer is describing the Web Service Definition Language. B is incorrect because the answer is describing the Simple Object Access Protocol (SOAP). D is incorrect because the answer is describing the Java API for XML-based Remote Procedure Call (JAX-RPC).
Q2: 11. Which type of Enterprise JavaBean is persistent?
A. Entity bean
B. Session bean
C. Message-driven bean
D. Message-oriented bean
A is correct. Entity beans are persistent.
B, C, and D are incorrect. Session and message-driven beans are not persistent. There is no such thing as a message-oriented bean.
Q1: I would change answer B. One could argue that sending mail is a form of information exchange in a distributed and de-centralized environment.
Q2: I would clarify the meaning of “persistent”. A session bean is persistent across multiple web requests/responses, as is an entity bean. Only the entity bean might be persistent across multiple sessions. On the other hand, is the bean really persistent, or can it just be easily re-created from the underlying persistent (e.g. RDBMS) data?