may be, this question want to test the knowledge of full qualified name of MessageListener rather than usage of @MessageDriven annotation.
Also, one more reason that i can think of is that may be you are solving the questions based on EJB 2.1 (or less) version where EJB annotations were not present.
Oracle certified Java 8 Programmer I (1Z0-808), Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
Joined: Feb 18, 2007
Supposing that I am aware of the MessageListener's class' fully qualified name, still according to the question, I don't think any snippet correctly defines a MDB. Especially since no xml descriptor is present, which can define the POJO to be an MDB.
I think, specifying the @MessageDriven annotation is also equally important, other than implement MessageListener to call a POJO as an MDB.
Hi guys, I most agree with Prasad, the answer 1 is nearly correct but it does not have any kind of information about the MDB environment (e.g. the destination type, acknowledge, mesageSelector) and, I presume that there is dd somewhere.
The Question is to fuzzy and if I use use the information what they provide then none of the answers are correct - for 1 it mss the info about the mdb.