3 Replies Latest reply on Dec 17, 2005 11:57 AM by Rudi Vankeirsbilck

    Use nested deployment for resource adapter

    Rudi Vankeirsbilck Newbie

      Hi all,

      I have looked at several examples now (including http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossJCAMessageInflowExample and the once that come with the commercial documentation) and these all deploy the .rar file separate from the actual components using the adapter.

      I was trying to add my .rar in my .ear file like:
      .ear
      .ear/APP-INF/lib/classes.jar (contains all .class files including the resource adapter)
      .ear/META-INF
      .ear/META-INF/application.xml
      .ear/META-INF/jboss-app.xml
      .ear/logic.jar (contains business logic components)
      .ear/message.jar (contains message driven beans that wil use the resource adapter)
      .ear/.rar
      .ear/.rar/META-INF/ra.xml

      When I deploy the ear file, I am not seeing any logging for the deployment of the resource adapter and also I am getting:


      14:47:52,510 ERROR [JBossMessageEndpointFactory] Starting failed jboss.j2ee:binding=message-inflow-driven-bean,jndiName=local/BlueSpaceSMTPListener@2070587,plugin=invoker,service=EJB
      org.jboss.deployment.DeploymentException: Cannot locate resource adapter deployment null; - nested throwable: (javax.management.InstanceNotFoundException: jboss.jca:name='null',service=RARDeployment is not registered.)

      which indicates that the resource adapter is not correctly deployed.

      I was wondering, is nested deployment for resource adapters supported at all?

      Have I used the appropriate structure that is required by nested deployment for resource adapters?

      Thank you,

      Rudi.

        • 1. Re: Use nested deployment for resource adapter
          Rudi Vankeirsbilck Newbie

          Actually, the structure of the ear is:
          .ear
          .ear/APP-INF/lib/classes.jar (contains all .class files including the resource adapter)
          .ear/META-INF
          .ear/META-INF/application.xml
          .ear/META-INF/jboss-app.xml
          .ear/logic.jar (contains business logic components)
          .ear/message.jar (contains message driven beans that wil use the resource adapter)
          .ear/bluespace-ds.xml
          .ear/bluespace-jms-ds.xml
          .ear/ra-ds.xml
          .ear/.rar
          .ear/.rar/META-INF/ra.xml

          and jboss.app.xml is:

          <jboss-app>
           <module>
           <service>bluespace-ds.xml</service>
           </module>
           <module>
           <service>bluespace-jms-ds.xml</service>
           </module>
           <module>
           <service>ra-ds.xml</service>
           </module>
          </jboss-app>
          


          and ra.xml is:
          <connection-factories>
           <no-tx-connection-factory>
           <jndi-name>BlueSpace/POP3</jndi-name>
           <adapter-display-name>BlueSpace POP3 Adapter</adapter-display-name>
           <config-property name="PollingInterval" type="java.lang.Integer">60000</config-property>
           </no-tx-connection-factory>
          </connection-factories>
          


          • 2. Re: Use nested deployment for resource adapter
            Adrian Brock Master

            And where exactly in the JBoss docs or the spec for that matter
            did you find APP-INF?

            • 3. Re: Use nested deployment for resource adapter
              Rudi Vankeirsbilck Newbie

              Dunno actually. My build script has done that for the last 2 years I guess and it has always worked. The APP-INF/lib/classes.jar contains all classes I need in the nested deployed jars. So in fact, the nested .jar (and also .war that I did not mention) only contain the deployment descriptors for the session beans.

              I have made some progress since... had a typo in a setter method of one of the properties of the resource adapter. I discovered that when I used the same structure as the examples (i.e. not use nested deployment).

              Currently, the app deploys but I cannot see my MDB connecting to the resource adapter, although I have logging in the activtion method.

              Rudi.