activemq code example
Example: how to integrate the activemq with ejb
import org.jboss.annotation.ejb.ResourceAdapter;
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="FOO.TEST"),
@ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge")
})
@ResourceAdapter("activemq-rar-4.1.1.rar")
public class TestBean implements MessageListener {
public TestBean() {
}
public void onMessage(Message message) {
}
}