Message Drive Beans

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

You configure properties by using the @MessageDriven(activationConfig) attribute with a bunch of @ActivationConfigProperty. All properties that you can set are defined in this file. Internally this is the class that is created to hold config information.

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] ----------------