title: Working MDB example in JBoss 7.0.1?
body: <p>Here's an EJB3 MDB that used to work for me in JBoss 5.1:</p>
  
  <pre><code>@TransactionAttribute( TransactionAttributeType.NOT_SUPPORTED )
  @org.jboss.ejb3.annotation.Depends("jboss.messaging.destination:service=Topic,name=IncomingArticleNotifications")
  @MessageDriven(
      activationConfig = {
          @ActivationConfigProperty( propertyName="destinationType", propertyValue="javax.jms.Topic"),
          @ActivationConfigProperty( propertyName="destination", propertyValue="topic/IncomingArticleNotificationsDest"),
          @ActivationConfigProperty( propertyName="subscriptionDurability", propertyValue="Durable"),
          @ActivationConfigProperty( propertyName="messageSelector", propertyValue ="type='IncomingArticleNotification'")
      }
  )
  public class IncomingArticleHandler implements MessageListener
  {
      [...]
  }
  </code></pre>
  
  <p>Try as I might, I can't migrate this to JBoss <strong>7.0.1</strong>. JMS is set up OK, and I can publish to the destination OK (from my main JAR), but my EJB listener just isn't listening. I get <strong>no deploy or runtime errors</strong> for my EJB / WAR / EAR:</p>
  
  <pre><code>01:02:40,600 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "product-ear-1.0-SNAPSHOT.ear"
  01:02:41,752 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "product-ejb-1.0-SNAPSHOT.jar"
  01:02:41,753 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "product.war"
  </code></pre>
  
  <p>I've also fixed the <strong>JNDI names</strong>, as per instructions, so here's what I have now:</p>
  
  <pre><code>// Ignore for now: @TransactionAttribute( TransactionAttributeType.NOT_SUPPORTED )
  @ResourceAdapter("ejb3-rar.rar")    // ??? As per docs. No idea what this should be, an attempt to get something working.
  @MessageDriven(
      activationConfig = {
          @ActivationConfigProperty( propertyName="destinationType", propertyValue="javax.jms.Topic"),
          @ActivationConfigProperty( propertyName="destination", propertyValue="java:/topic/IncomingArticleNotificationsDest"),    // updated
          @ActivationConfigProperty( propertyName="subscriptionDurability", propertyValue="Durable")
          // Ignore for now: @ActivationConfigProperty( propertyName="messageSelector", propertyValue ="type='IncomingArticleNotification'")
      }
  )
  public class IncomingArticleHandler implements MessageListener
  {
      [...]
  }
  </code></pre>
  
  <p>Setting all loggers to <code>ALL</code> before deploying reveals that the only time my MDB classes are mentioned is when the <code>org.jboss.vfs.util.SuffixMatchFilter</code> sees them - that can't be good.</p>
  
  <p>I've been following the issue of <a href="https://issues.jboss.org/browse/AS7-455" rel="nofollow">MDB support since 7.0.0</a> and have read through dozens of JIRAs, not to mention the migration guide, EJB3 docs and so on, but I'm left confused. I know MDBs <em>should</em> work in 7.0.1, but is the above doable? I think mine is quite a simple case, so does anyone have a simple working example, a single document that states exactly what does / doesn't work in 7.0.1, or a migration guide?</p>
  
  <p>Edit: just thought I'd add that this is my only EJB, so this is probably as much an EJB problem as a JMS/MDB one.</p>
  
  <p><strong>Updates:</strong></p>
  
  <p>I can deploy a dummy <code>@Stateless</code> with no problems, but no combination of <code>@MessageDriven</code>/<code>@ActivationConfigProperty</code> has had any effect at all (bodging the <code>destinationType</code> to <code>javax.jms.XXX</code> produces no errors!). I've tried setting the destination property to all possible JNDI combinations.</p>
  
  <p>I've checked my <code>standalone.xml</code> against <code>standalone-preview.xml</code> and there are no substantial differences.</p>
  
  <p>The nearest I get to any kind of error is this:</p>
  
  <pre><code>00:53:25,886 DEBUG [org.hornetq.ra.Util] (MSC service thread 1-4) org.jboss.as.messaging.jms.TransactionManagerLocator from [Module "org.hornetq.ra:main" from local module loader @15a62c31 (roots: /Users/andrewregan/Desktop/jboss-as-7.0.1.Final/modules)]: java.lang.ClassNotFoundException: org.jboss.as.messaging.jms.TransactionManagerLocator from [Module "org.hornetq.ra:main" from local module loader @15a62c31 (roots: /Users/andrewregan/Desktop/jboss-as-7.0.1.Final/modules)]
  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
  at org.hornetq.ra.Util.locateTM(Util.java:261) [hornetq-ra-2.2.7.Final.jar:]
  at org.hornetq.ra.HornetQResourceAdapter.locateTM(HornetQResourceAdapter.java:1555) [hornetq-ra-2.2.7.Final.jar:]
  at org.hornetq.ra.HornetQResourceAdapter.start(HornetQResourceAdapter.java:210) [hornetq-ra-2.2.7.Final.jar:]
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]
  at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]
  at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.startContext(AbstractResourceAdapterDeployer.java:339) [ironjacamar-deployers-common-1.0.3.Final.jar:1.0.3.Final]
  at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1883) [ironjacamar-deployers-common-1.0.3.Final.jar:1.0.3.Final]
  at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:825) [ironjacamar-deployers-common-1.0.3.Final.jar:1.0.3.Final]
  at org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator.doDeploy(ResourceAdapterActivatorService.java:140) [jboss-as-connector-7.0.1.Final.jar:7.0.1.Final]
  at org.jboss.as.connector.services.ResourceAdapterActivatorService.start(ResourceAdapterActivatorService.java:93) [jboss-as-connector-7.0.1.Final.jar:7.0.1.Final]
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) [jboss-msc-1.0.0.GA.jar:1.0.0.GA]
  at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) [jboss-msc-1.0.0.GA.jar:1.0.0.GA]
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
  at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]
  </code></pre>
  
  <p>Might that be a problem? I get that by adding <code>@ResourceAdapter(value="hornetq-ra.rar")</code> as I've seen suggested elsewhere.</p>