3 Replies Latest reply on Jul 28, 2014 1:52 AM by robert.panzer

    Issue in deploying inbound resource adapter in Jboss EAP 6.1

    gopalakrishnan.a

      When trying to deploy the application in Jboss EAP 6.1.

      The application uses MDB(Message Driven Bean) and Inbound Resource Adapter.

       

      Getting the following error in the server console.

       

       

      12:04:13,025 WARN  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016012: Deployment deployment "shares-eds-fares-intg.ear" contains CDI annotations but beans.xml was not found.

      12:04:13,293 INFO  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-2) IJ020002: Deployed: file:/C:/Softwares/jboss-eap-6.1.0/jboss-eap-6.1/standalone/tmp/vfs/deploymenta45fd183278a

      5d18/inbound-adapter.rar-dde3db3052d8e9d0/contents/

      12:04:13,307 INFO  [org.jboss.web] (ServerService Thread Pool -- 62) JBAS018210: Register web context:

      12:04:14,572 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 32) JBAS018559: Deployed "shares-eds-fares-intg.ear" (runtime-name : "shares-eds-fares-intg.ear")

      12:04:14,573 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.ra.inbound-adapter (missing) dependents: [service jboss.deployment.subunit."shares-eds-fares-intg.ear"."as-message-bean-mdb.jar".component.SharesMessageBean.CREATE]

       

       

      12:04:14,644 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management

      12:04:14,644 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

      12:04:14,646 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) started (with errors) in 19302ms - Started 497 of 594 services (8 services failed or

      missing dependencies, 88 services are passive or on-demand)

       

       

      How to fix this issue.

      What are all configurations needs to be done for mdb and resource adapter(inbound resource adapter) in Jboss EAP 6.1

      How to configure ironjacamar.xml for Inbound resource adapter?.  Where we will able to see samples for Inbound resource adapter.

       

      Thanks in Advance.

        • 1. Re: Issue in deploying inbound resource adapter in Jboss EAP 6.1
          robert.panzer

          Hi,

           

          you might want to take a look at robertpanzer/filesystemwatch-connector · GitHub

          It contains an example for an inbound ra and an MDB.

           

          Basically the MDB has to reference the RA in the jboss-ejb3.xml:

          <?xml version="1.0" encoding="UTF-8"?>

          <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:jee="http://java.sun.com/xml/ns/javaee"

          xmlns:mdb="urn:resource-adapter-binding" xmlns:security="urn:security">

           

          <jee:assembly-descriptor>

          <mdb:resource-adapter-binding>

          <jee:ejb-name>FSWatcherMDB</jee:ejb-name>

          <mdb:resource-adapter-name>test.ear#fswatcher.rar</mdb:resource-adapter-name>

          </mdb:resource-adapter-binding>

          </jee:assembly-descriptor>

          </jboss>

           

          (Or add a JBoss specific annotation to your MDB, but then you have compile dependencies on JBoss libs what I personally don't like)

          With JBoss EAP 6.1.0+ you specify the ID of the resource adapter in <mdb:resource-adapter-name>. That is the ID attribute of the <resource-adapter> tag if you define the resource adapter in your standalone-full.xml or the name <file name of ear>#<filename of rar> if you don't have it defined there.

           

          An ironjacamar.xml is not needed for an inbound-only resource adapter.

           

          Kind regards,

          Robert

          • 2. Re: Issue in deploying inbound resource adapter in Jboss EAP 6.1
            gopalakrishnan.a

            Hi Panzer,

             

            Thanks for your reply.

             

            In our application we have MDB but it is not getting deployed.

            And also i have done the sample MDB. It's getting deployed and also i have implemented the same logic as per my applciation then it's not working and getting endpointFactory object value is getting null. How the

             

            Do you have any code for MessageEndpointFactory and how to activate the MessageEndpointFactory. Any configurations needs done for activation EndpointFactory. How to set Activation Spec values. Any configuration needs to be done. How we will able to see the message driven bean(mdb) deployed in server log along with resource adapter(Any specific message from server).

             

            The below one is my code:

             

            MessageEndpointFactory endpointFactory = _inboundRA.getEndpointFactory();

             

                    ASMessageListener messageListener = null;

                    try

                    {

                  

                    _log.debug("Inside the try block");

                      messageListener = (ASMessageListener) endpointFactory.createEndpoint(null);

             

             

            Thanks in Advance.

            • 3. Re: Issue in deploying inbound resource adapter in Jboss EAP 6.1
              robert.panzer

              Hi,

               

              When the MDB gets deployed successfully you should see a message like this:

              07:44:03,430 INFO  [org.jboss.as.ejb3] (MSC service thread 1-1) JBAS014142: Started message driven bean 'FooListenerBean' with 'FooApplication.ear#FooResourceAdapter.rar' resource adapter

               

              There is no example code for the MessageEndpointFactory! ResourceAdapter.endpointActivation(MessageEndpointFactory, ActivationSpec) will be called once for every deployed MDB.

              The MessageEndpointFactory for that MDB will be passed by the Application Server.

              You as a ResourceAdapter have to store it somewhere to make invocations of the MDB.

               

              Activation configuration is either defined as part of the javax.ejb.MessageDriven annotation or in the ejb-jar.xml.

               

              Kind regards,

              Robert