EJB @MessageDriven

Javadoc

The @MessageDriven annotation signals to the EJB runtime that the specified class is a Message Bean.

  @MessageDriven(activationConfig =
  {
    @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
    @ActivationConfigProperty(propertyName="destination",     propertyValue="dispatcherQueue")
  })
  public class Dispatcher implements MessageListener {
    public void onMessage(Message message)
    {
    }
  }