0 Replies Latest reply on Sep 2, 2014 12:15 PM by gopalakrishnan A

    Custom MessageListener in Inbound Resource Adapter

    gopalakrishnan A Newbie

      Hi,

       

      In our application we are using Inbound Resource Adapter (i.e. Resource adapter and Message Driven Bean) and trying to deploy in JBOSS EAP 6.1.

       

      1)    In Mdb class if we are extending the Message Listener then JBAS014142: Started message driven bean 'SharesMessageBean' with 'shares-fares-intg#inbound-adapter' resource adapter it is recognising the

      1. mdb.

       

       

      Mdb Class:

      @MessageDriven

      (name="SharesMessageBean",messageListenerInterface=com.as.mdb.ASMessageListener.class,

      activationConfig = {

        @ActivationConfigProperty(propertyName="messagingType", propertyValue="com.eds.as.mdb.ASMessageListener"),

              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),

              @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:/queue/com..as.adapter.inbound.shares"),

              //@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),

              //@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "0")

              })

      @Depends("as-message-bean-mdb.jar")

      @ResourceAdapter("shares-fares-intg.ear#inbound-adapter.rar")

       

      public class SharesMessageBean extends ASProcess implements MessageListener

       

       

      JBOSS SERVER CONSOLE LOG:

       

      11:49:54,899 INFO  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-6) IJ020002: Deployed: file:/C:/Softwares/jboss-eap-6.1.0/jboss-eap-6.1/standalone/tmp/vfs/deployment4c0a568898d2c34c/inbound-adapter.rar-560df16e6d247d3b/contents/

      11:49:55,344 INFO  [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014142: Started message driven bean 'SharesMessageBean' with 'shares-fares-intg#inbound-adapter' resource adapter

      11:49:55,421 INFO  [org.jboss.ejb.client] (ServerService Thread Pool -- 58) JBoss EJB Client version 1.0.21.Final-redhat-1

      11:49:55,714 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 32) JBAS018559: Deployed "shares-fares-intg.ear" (runtime-name : "shares-fares-intg.ear")

       

       

       

       

      2)   In Mdb class if we are extending the custom  ASMessage Listener, then JBAS014142: Started message driven bean 'SharesMessageBean' with 'shares-fares-intg#inbound-adapter' resource adapter it is not recognizing the mdb.

       

      Caused by: java.lang.IllegalStateException: JBAS014521: No message listener of type com.as.mdb.ASMessageListener found in resource adapter shares-fares-intg.ear#inbound-adapter

        at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:105)

        at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:89)

       

      Here we are not using the Jboss-ejb3.xml. Here we are using Annotations.

       

      Any configurations we need to make for custom Message Listener.

       

      Please suggest some suggestion on this.

       

      Thanks in Advance.

      1. Gopal.