2 Replies Latest reply on Nov 12, 2009 7:41 AM by s0d0

    JBoss AS 5.10: @ResourceAdapter annotation not working

      If I specify @ResourceAdapter("sonic-jms-ra.rar") annotation to MDB,
      JBoss still tries to use DefaultJMSProvider and ra is null (ra=null)


      @MessageDriven(name="AS2MessageListener" , activationConfig =
      
       {
       @ActivationConfigProperty(propertyName = "messagingType", propertyValue = "javax.jms.MessageListener"),
       @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
       @ActivationConfigProperty(propertyName = "destination", propertyValue = "SonicJMS/Queues/toas2"),
       @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "AUTO_ACKNOWLEGDE"),
       @ActivationConfigProperty(propertyName = "connectionFactory", propertyValue = "SonicJMS/default/MDBQueueConnectionFactory")
       }
      )
      @ResourceAdapter(value = "sonic-jms-ra.rar")
      @TransactionAttribute(TransactionAttributeType.REQUIRED)
      public class MessageListenerBean implements MessageListener {
      




      DEPLOYMENTS IN ERROR:
       Deployment "jboss.j2ee:ear=AS2Service-EAR.ear,jar=AS2Service-EJB.jar,name=AS2MessageListener,service=EJB3" is in error due to the following reason(s): java.beans.IntrospectionException: No property found for: connectionFactory on JavaBean: org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@a3c7ef(ra=null destination=SonicJMS/Queues/toas2 destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandlerDLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      

      
      


        • 1. Re: JBoss AS 5.10: @ResourceAdapter annotation not working
          jaikiran

           

          If I specify @ResourceAdapter("sonic-jms-ra.rar") annotation to MDB,
          JBoss still tries to use DefaultJMSProvider and ra is null (ra=null)


          You probably aren't using the correct import statement. In JBoss AS-5 the JBoss EJB3 specific annotations have moved to org.jboss.ejb3.annotation.*

          So you should have:

          import org.jboss.ejb3.annotation.ResourceAdapter;
          
          ...
          @ResourceAdapter(value = "sonic-jms-ra.rar")
          ...
          public class MessageListenerBean implements MessageListener {
          


          We have tests and tutorials where we use @ResourceAdapter to override the default, and those are passing :)


          • 2. Re: JBoss AS 5.10: @ResourceAdapter annotation not working

            Thanks for quick response. It works now :)