Oracle
1Z0-860 · Question #21
Given this code snippet from a JMS message-driven bean class X: 11. public XQ { System, out. print("1 "); } 12. public void onMessagefMessage m) throws Java. rmi. RemoteException 13. try { 14…
The correct answer is F. This is NOT an EJB 3.0 compliant bean. See the full explanation below for the reasoning.
Question
Given this code snippet from a JMS message-driven bean class X: 11. public XQ { System, out. print("1 "); } 12. public void onMessagefMessage m) throws Java. rmi. RemoteException 13. try { 14. TextMessage tm = (TextMessage) m; 15. String text = tm.getText0; 16. System, out. print("2 "); 17. } catch (JMSException e) { 18. throw new java. rmi. RemoteExceptionQ; 19.} 20.} When this bean class handles a message, which is correct?
Options
- AAfter a message delivery the result is 1.
- BAfter a message delivery the result is 2.
- CAfter a message delivery the result is 12.
- DAfter a message delivery an exception is thrown.
- EAfter a message delivery the result is unpredictable.
- FThis is NOT an EJB 3.0 compliant bean.
How the community answered
(68 responses)- A12% (8)
- B1% (1)
- C1% (1)
- D7% (5)
- E3% (2)
- F75% (51)
Community Discussion
No community discussion yet for this question.