## Message Drive Beans

This example shows you how to implement an MDB with EJB 3.0.

You configure properties by using the <message-driven> element and sub elements which correspond to the @ActivationConfigProperty annotation. All properties that you can set are defined in the ejb-jar.xml and jboss.xml deployment descriptors.

MDBConfig.java

Take a look at ExampleMDB.java.

The queue-example-service.xml file defines the queue. This is the same in regular JBoss.

#### Building and Running

To build and run the example, make sure you have `ejb3.deployer` installed in JBoss 4.0.x and have JBoss running. See the reference manual on how to install EJB 3.0.

    Unix:    $ export JBOSS_HOME=<where your jboss 4.0 distribution is>
    Windows: $ set JBOSS_HOME=<where your jboss 4.0 distribution is>
    $ ant
    $ ant run

Look in the console window to determine that the message was sent.

    01:01:20,828 INFO  [STDOUT] ----------------
    01:01:20,828 INFO  [STDOUT] Received message
    01:01:20,828 INFO  [STDOUT] ----------------