Annotations works only on Java EE 5 (e.g. glassfish v2).
But if you are using J2EE 1.4 (e.g. Sun Application Server 8.2) you have to create an ejb-jar.xml file which declares your MDB. For an example you can take a look at http://www.onjava.com/pub/a/onjava/2001/05/22/ejb_msg.html?page=3 but your favourite IDE can certainly guide you to achieve this.