5 Replies Latest reply on Oct 12, 2006 5:26 AM by peyrusaubes

    Fail to deploy mdb

    peyrusaubes

      Can't find any documentation on the MDB deployment...
      Heres is my configuration:

      @MessageDriven(activationConfig = {
      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
      @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/A") })


      Here is the problem...


      Reason: java.lang.RuntimeException: You did not specify a @Resource.mappedName
      ) on javax.jms.Queue com.valtech.servicebancaire.BanqueBean.emailQueue and ther
      is no binding for that enc name in XML

      what is this mappedName ????

      Thank u !

        • 1. Re: Fail to deploy mdb
          bill.burke

          Are you using the @Resource annotation someplace in your MDB bean class?

          • 2. Re: Fail to deploy mdb
            peyrusaubes

            Code (can't be esaier):

            
            
            @MessageDriven(activationConfig = {
             @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
             @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/A") })
            public class MailSender implements MessageListener {
            
             public void onMessage(Message m) {
             try {
             TextMessage tm = (TextMessage) m;
             System.out.println(tm.getText());
             } catch (JMSException e) {
             e.printStackTrace();
             }
            
             }
            
            }
            


            • 3. Re: Fail to deploy mdb
              wolfgangknauf

              I have managed to create a MDB with exactly the same annotations as you used (using EJB3 RC9).

              Only difference in my sample: I configured a custom queue in %JBOSS_HOME%\server\default\deploy\jms\jbossmq-destinations-service.xml:


              <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
              queue/MessageBeanQueue


              The MDB annotation declares the property "destination" with the value "queue/MessageBeanQueue".

              The only difference I see is the the declaration of queue/A does not declare a JNDIName property. Maybe this causes the error.

              • 4. Re: Fail to deploy mdb
                wolfgangknauf

                Darn, it eat my XML:

                <mbean code="org.jboss.mq.server.jmx.Queue"
                 name="knauf:service=Queue,name=MessageBeanQueue">
                 <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
                 <attribute name="JNDIName">queue/MessageBeanQueue</attribute>
                 </mbean>
                


                • 5. Re: Fail to deploy mdb
                  peyrusaubes

                  thanks for your response, I've tried this, but still the same problems :-(