6 Replies Latest reply on Aug 3, 2012 3:55 PM by Justin Bertram

    Missing service jboss.ra.hornetq-ra and @ResourceAdapter problem

    lancerx Newbie

      I try to run JMS using MDB, JBoss AS 7, Eclipse and Jboss Tools.

      But MDB can not be deployed:

      @MessageDriven(activationConfig = {
              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
              @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/myQueue"),
              @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })
      
      public class JMSTest implements MessageListener {
          public void onMessage(Message msg) {
              System.out.println(this.getClass().getName() + " called...");
              try {
                  System.out.println(msg.getStringProperty("myStrVar"));
              } catch (JMSException e) {  }
          }
      }
      

      Result:

      JBAS014775: New missing/unsatisfied dependencies

      service jboss.ra.hornetq-ra (missing) dependents: [service jboss.deployment.subunit."TourEAR.ear"."TourJSF.war".component.JMSTest.CREATE]

      {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"TourEAR.ear\".\"TourJSF.war\".component.JMSTest.CREATEjboss.ra.hornetq-raMissing[jboss.deployment.subunit.\"TourEAR.ear\".\"TourJSF.war\".component.JMSTest.CREATEjboss.ra.hornetq-ra]"]}}}

       

      In standalone.xml

      <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

      .....

      <mdb>

                 <resource-adapter-ref resource-adapter-name="hornetq-ra"/>

                 <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

      </mdb>

      .....

       

      I don't know if @ResourceAdapter("hornetq-ra.rar") is needed. If it is not necessary what could be wrong whit this?

       

      I tried to add @ResourceAdapter "cannot be resolved to a type".

      Here http://docs.jboss.org/hornetq/2.2.2.Final/user-manual/en/html/appserver-integration.html I read

      The ResourceAdapter annotation is used to specify which adaptor should be used. To use this you will need to import org.jboss.ejb3.annotation.ResourceAdapter for JBoss AS 5.X and later version which can be found in the jboss-ejb3-ext-api.jar which can be found in the JBoss repository.

      But jboss-ejb3-ext-api.jar can not be added as dependency in maven.

      Please for help.