Search your topic in Java2share
Home > SCBCD > SCBCD Question Bank
eXTReMe Tracker


1. EJB 3.0 Overview (SCBCD)

Q: 1 Given the following statements about an EJB deployment descriptor for
which the metadata-complete attribute is not specified:
I. The EJB deployment descriptor can provide additional metadata to bean class annotations.
II. The EJB deployment descriptor can partially override bean class annotations.
III. The EJB deployment descriptor can entirely override bean class annotations.
Which is true?

A. Only statement I is correct.
B. Only statement II is correct.
C. Only statement III is correct.
D. Both statements I and II are correct.
E. Both statements I and III are correct.

Answer: D

Q: 02 Given:
5. public interface MrB1 {
6. public interface MrB2 {
A java class is defined as:
11. @Stateless
12. public class MrBean implements MrB1,MrB2 {
Which two statements are correct for making this code work as a stateless session bean, considering that
this session bean is NOT defined in a deployment descriptor and the interfaces do NOT have
annotations? (Choose two.)

A. Only the inteface for remote usage must be annotated.
B. The interfaces MrB1 and MrB2 can only be used locally without changing the code.
C. Both interfaces MrB1 and MrB2 must be annotated to make this a working stateless session bean.
D. The interfaces MrB1 and MrB2 can be annotated differently, one with @Local and the other with
@Remote.

Answer: C, D

Q: 03 Which three statements are true about EJB 3.0 containers? (Choose three.)
A. Remote argument passing semantics conform to Java RMI-IIOP.
B. The JAXB 2.0 API is guaranteed to be available for all bean types.
C. The Java 2D API is guaranteed to be available for session beans.
D. javax.naming.InitialContext is guaranteed to provide a JNDI name space.
E. The Java Telephony API is guaranteed to be available for session and message beans.
F. javax.transaction.UserTransaction cannot be used by beans when bean-managed transaction demarcation is
used.

Answer: A, B, D

Q: 04 Which statement about the combination of mapping defaults, annotations,
and XML descriptors is correct?

A. All mapping annotations must always be processed by the persistence provider.
B. Some annotations, like the @Entity annotation, must always be processed by the persistence provider.
C. The mapping information for an entity class specified by annotations and in XML descriptors must be
distinct.
D. If multiple entity listeners are defined, the order in which they are invoked can be defined or overwritten in
the XML descriptor.

Answer: D