title: MDB connected to Oracle AQ via a datasource
body: <p>Im trying to create a MDB (JBoss AS 6) that connect to an Oracle AD queue.</p>
  
  <p>I got the following example to work:</p>
  
  <pre><code>@MessageDriven(name = "TestMdb", activationConfig = {
      @ActivationConfigProperty(propertyName="destinationType", propertyValue = "javax.jms.Queue"),
      @ActivationConfigProperty(propertyName="connectionFactoryProperties", propertyValue="jdbc_connect_string=jdbc:oracle:thin:XXXXX@XXX:1521:XXX,host=XXXX,user=XXXX,password=XXXX,port=XXXX,sid=XXXX,driver=XXXX"),
      @ActivationConfigProperty(propertyName="destinationProperties", propertyValue="owner=XXXXX,name=jms_text_que"),
      @ActivationConfigProperty(propertyName="userName", propertyValue="XXXX"),
      @ActivationConfigProperty(propertyName="password", propertyValue="XXXX"),
      @ActivationConfigProperty(propertyName="ConnectionFactoryClassName", propertyValue="oracle.jms.AQjmsConnectionFactory"),
      @ActivationConfigProperty(propertyName="QueueConnectionFactoryClassName", propertyValue="oracle.jms.AQjmsQueueConnectionFactory")
      })
  @ResourceAdapter("XXXXXX-ear.ear#genericjmsra.rar")
  @TransactionManagement(TransactionManagementType.BEAN)
  public class TestMdb  implements MessageListener {
  
      public void onMessage(Message message) {
      ...
      }
  }
  </code></pre>
  
  <p>The problem is that I need to specify the connection properties directly in the code (including DB host, username and password).
  Does anyone know a way to use a datasource from a jndi lookup?</p>
  
  <p>Thanks</p>