3 Replies Latest reply: Mar 12, 2012 8:41 AM by Jesper Pedersen RSS

    Is there a working sample JCA 1.6 connector outbound and inbound

    Dirk Weil Newbie

      The IrronJacamar guides contain samples for outbound connectors only. I am looking for a bidirectional one. Is there any sample, documentation, ... for a working connector using JCA 1.6, preferably working on JBoss 7.1 ?

       

      Thanks a lot!

      Dirk

        • 1. Re: Is there a working sample JCA 1.6 connector outbound and inbound
          Jesper Pedersen Master

          Download IronJacamar 1.1.0.Alpha6 and use the code generator - http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/codegenerator.html - the resulting resource adapter can be deployed on AS7 7.1.1.

          • 2. Re: Is there a working sample JCA 1.6 connector outbound and inbound
            Dirk Weil Newbie

            Jesper,

             

            that is great - thank you very much. I was able to deploy an inbound connector on JBoss 7.1, but whe I try to connect a MDB with it, I get an error message I'm not sure of understanding.

             

            The connector is deployed as part of an EAR with the name DemoInboundConnector-rar-1.0.0-SNAPSHOT.rar. The same EAR contains a web application with the following MDB:

             

            @MessageDriven(messageListenerInterface = DemoInboundMessageListener.class)

            public class TestMdb implements DemoInboundMessageListener

            {

              @Override

              public void onMessage(String msg)

              {

                System.out.println(msg);

              }

            }

             

            I tried to connect it to the adapter with WEB-INF/jboss-ejb3.xml:

            <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>TestMdb</jee:ejb-name>

                        <mdb:resource-adapter-name>DemoInboundConnector-rar-1.0.0-SNAPSHOT.rar</mdb:resource-adapter-name>

                    </mdb:resource-adapter-binding>

                </jee:assembly-descriptor>

            </jboss>

             

            When deploying the EAR I get the error message:

            09:13:01,819 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"DemoInboundConnector-ear.ear\".\"DemoInboundConnector-test-1.0.0-SNAPSHOT.war\".component.TestMdb.CREATEjboss.ra.\"DemoInboundConnector-rar-1.0.0-SNAPSHOT\"Missing[jboss.deployment.subunit.\"DemoInboundConnector-ear.ear\".\"DemoInboundConnector-test-1.0.0-SNAPSHOT.war\".component.TestMdb.CREATEjboss.ra.\"DemoInboundConnector-rar-1.0.0-SNAPSHOT\"]"]}}}

             

            I tried with <mdb:resource-adapter-name>../DemoInboundConnector-rar-1.0.0-SNAPSHOT.rar</mdb:resource-adapter-name> without success.

             

            What am I missing?

             

            Thanks

            Dirk

            • 3. Re: Is there a working sample JCA 1.6 connector outbound and inbound
              Jesper Pedersen Master

              When a .rar is inside an .ear it should be referenced as <archive>earname#rarname</archive>.

               

              The rest belongs in the AS7 User Forum - https://community.jboss.org/en/jbossas7