6 Replies Latest reply on Dec 11, 2013 9:11 AM by rssole

    Configure resource adpater as module

    t.dot

      Hi,

       

      we're using Jboss 7.1.2 Final and deployed a resource-adapter by putting it in the deployments folder and using the config in the standalone.xml.

       

      My question is: Can we create a module for the resource adapter instead of a deployment?

       

      The only thing I found was this resolved issue: https://issues.jboss.org/browse/AS7-5768 but using <module>com.test.myadapter</module> instead of <archive>myadapter.rar</archive> doesn't work.

       

      Thanks for your help,

      Regards Thomas

       

       

      [edit] I just read that the issue described should be solved in 7.2.0.CR1, so if there's no other option I have to wait.

       

      Message was edited by: t.dot

        • 1. Re: Configure resource adpater as module
          raviteja457

          Hi Dot

           

          Can you tell me how to configure resource adapter using using Jboss 7.1.2 Final and standalone.xml file (sample)

          • 2. Re: Configure resource adpater as module
            jesper.pedersen
            • 3. Re: Configure resource adpater as module
              hwellmann.de

              Jesper, do you mean to say that resource adapters cannot be installed as modules, or that resource adapters should preferably be deployed as archives? If so, what is the advantage of using deployments? For JDBC drivers, modules are usually recommended over deployments - then why would this be different for resource adapters?

               

              Thomas, I managed to install the ActiveMQ resource adapter as a module on JBoss AS 7.2.0 as follows:

               

              Create directory modules/system/layers/base/org/apache/activemq/main/

               

              Unpack activemq-rar-5.7.0.rar in that directory (Compressed RARs do not work, as noted in AS7-5768.

               

              Add a file module.xml with the following contents:

               

              <module xmlns="urn:jboss:module:1.0" name="org.apache.activemq">
                <resources>
                  <resource-root path="."/>
                  <resource-root path="activemq-core-5.7.0.jar"/>
                  <resource-root path="activemq-protobuf-1.1.jar"/>
                  <resource-root path="activemq-ra-5.7.0.jar"/>
                  <resource-root path="aopalliance-1.0.jar"/>
                  <resource-root path="commons-logging-1.1.1.jar"/>
                  <resource-root path="commons-net-3.1.jar"/>
                  <resource-root path="geronimo-j2ee-management_1.1_spec-1.0.1.jar"/>
                  <resource-root path="hawtbuf-1.9.jar"/>
                  <resource-root path="hawtdispatch-1.11.jar"/>
                  <resource-root path="hawtdispatch-transport-1.11.jar"/>
                  <resource-root path="jasypt-1.9.0.jar"/>
                  <resource-root path="kahadb-5.7.0.jar"/>
                  <resource-root path="log4j-1.2.17.jar"/>
                  <resource-root path="mqtt-client-1.3.jar"/>
                  <resource-root path="slf4j-api-1.6.6.jar"/>
                  <resource-root path="slf4j-log4j12-1.6.6.jar"/>
                  <resource-root path="spring-aop-3.0.7.RELEASE.jar"/>
                  <resource-root path="spring-asm-3.0.7.RELEASE.jar"/>
                  <resource-root path="spring-beans-3.0.7.RELEASE.jar"/>
                  <resource-root path="spring-context-3.0.7.RELEASE.jar"/>
                  <resource-root path="spring-core-3.0.7.RELEASE.jar"/>
                  <resource-root path="spring-expression-3.0.7.RELEASE.jar"/>
                  <resource-root path="xbean-spring-3.11.1.jar"/>
                </resources>
                <dependencies>
                  <module name="javax.api"/>
                  <module name="javax.resource.api"/>
                  <module name="javax.validation.api"/>
                  <module name="org.jboss.ironjacamar.api"/>
                  <module name="javax.jms.api" />
                </dependencies>
              </module>

              • 4. Re: Configure resource adpater as module
                jbertram

                What does your <resource-adapter> section look like?

                • 5. Re: Configure resource adpater as module
                  hwellmann.de

                  Oops, I forgot:

                          <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
                              <resource-adapters>
                                  <resource-adapter id="activemq">
                                      <module id="org.apache.activemq"/>
                                      <transaction-support>XATransaction</transaction-support>
                                      <config-property name="UseInboundSession">
                                          false
                                      </config-property>
                                      <config-property name="ServerUrl">
                                          tcp://localhost:61616
                                      </config-property>
                                      <connection-definitions>
                                          <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:jboss/exported/jms/ConnectionFactory" enabled="true" use-java-context="true" pool-name="ConnectionFactory"/>
                                      </connection-definitions>
                                  </resource-adapter>
                              </resource-adapters>
                          </subsystem>
                   

                  • 6. Re: Configure resource adpater as module
                    rssole

                    I know that this is quite old discussion but I've wrote blog on how to achieve exactly this.
                    To deploy resource adapter as module.

                     

                    Here it is:

                    http://rastkososkic.blogspot.com/2013/12/deploying-activemq-590-resource-adapter.html