Posted By

narkisr on 01/28/08


Tagged

JBoss MDB annotations


Versions (?)

Simple annotation based MDB in JBoss


 / Published in: Java
 

An example of an annotated MDB in JBoss with some interesting. options

  1. @MessageDriven(
  2. activationConfig = {
  3. @ActivationConfigProperty(
  4. propertyName = "destinationType",
  5. propertyValue = "javax.jms.Queue"),
  6. @ActivationConfigProperty(propertyName = "destination",
  7. propertyValue = "queue/DummyQueue"),
  8. @ActivationConfigProperty(propertyName = "MaxPoolSize",
  9. propertyValue = "3"),
  10. @ActivationConfigProperty(
  11. propertyName = "acknowledgeMode",
  12. propertyValue = "Auto-acknowledge")})
  13. public class DummyMDBean implements MessageListener {
  14.  
  15.  
  16. public void onMessage(final Message message) {
  17. // your logic goes here
  18. }
  19.  
  20. }

Report this snippet  

You need to login to post a comment.