A developer wants to create a JMS message-driven bean that responds to
javax.jms.TextMessage messages. Which two statements are true? (Choose two.)
A. The developer must implement the ejbCreate method.
B. The developer does NOT need to create a business interface for the bean.
C. The developer must implement a method that declares javax.jms.TextMessage as an
D. The message-driven bean class must implement methods of the javax.jms.MessageListener
E. The message-driven bean class must implement methods of the javax. ejb.
Answer(s): B, D
A Reader entity has a one-to-many, bidirectional relationship with a Book entity. Two Reader
entities are persisted, each having two Book entities associated with them. For example,
readeM has booka and bookb, while reader2 has bookc and bookd. Which query returns a
Collection of fewer than four elements?
A. SELECT b.reader FROM Book b
B. SELECT r FROM BookbINNER JOINb.readerr
C. SELECTrFROM Reader r INNER JOIN r.booksb
D. SELECTrfrom BookbLEFT JOIN b.readerr LEFTJOINFETCHr.books
A session bean's business method throws an exception during execution.
Which two are responsibilities of the Bean Provider when throwing the exception? (Choose
A. For application exceptions, ensure that if the current transaction commits there will be no loss
of data integrity.
B. For application exceptions, ensurethatthe current transaction wil commit.
C. For system errors, when the client is remote, throw a java.rmi.RemoteException that wraps
the original exception.
D. For checked exceptions from which the bean cannot recover, throw an EJBException that
wraps the original exception.
Answer(s): A, D