2 Replies Latest reply on Nov 25, 2011 10:23 AM by mmusgrov

    Missing JAXR service dependency when configuring an XA datasource

    mmusgrov

      I configured an XA H2 datasource in standalone.xml (I am running on trunk, updated on 17th Nov) which fails with an unsatisfied service dependency:

       

      14:13:15,611 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.data-source.java:jboss/datasources/ExampleDS (missing) dependents: [service jboss.jaxr.as.bootstrap]

       

      14:13:15,618 ERROR [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.Alpha2-SNAPSHOT "Ahoy!" started (with errors) in 4061ms - Started 154 of 217 services (1 services failed or missing dependencies, 60 services are passive or on-demand)

      My XA datasorce is configured as follows:

       

                  <xa-datasource jndi-name="java:jboss/datasources/H2XADS" enabled="true"
                                 use-java-context="true" pool-name="H2XADS">
                      <xa-datasource-property name="URL">jdbc:h2:mem:test</xa-datasource-property>
                      <driver>h2</driver>
                      <xa-pool></xa-pool>
                      <security>
                          <user-name>sa</user-name>
                          <password>sa</password>
                      </security>
                  </xa-datasource>

       

      Do I need to configure the JAXR service in standalone.xml?

       

      Thanks

        • 1. Re: Missing JAXR service dependency when configuring an XA datasource
          mmusgrov

          This is working on jboss-as-7.1.0.Beta1 (but still not fixed on trunk). However, I now have an issue with security around XA datasource recovery.

           

          I generated an XA resource recovery record and the recovery system tries to recover it using the recovery helper ironjacamar registered. That in turn calls

           

          org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl getXAResources()

           

          which calls getSubject() but the returned subject is null and therefore the recovery fails. The XA datasource is configured as such: 

           

          <xa-datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="H2XADS">

                              <xa-datasource-property name="URL">jdbc:h2:mem:test1</xa-datasource-property>

                              <xa-datasource-class>

                                  org.h2.jdbcx.JdbcDataSource

                              </xa-datasource-class>

                              <driver>h2</driver>

                              <security>

                                  <user-name>sa</user-name>

                                  <password>sa</password>

                              </security>

                          </xa-datasource>

          • 2. Re: Missing JAXR service dependency when configuring an XA datasource
            mmusgrov

            Putting the debugger on the issue I see that the security issue arises because the "recoverSecurityDomain" and "subjectFactory" passed in during the xa datasource deployment are both null. Are there any properties that I can set on the xa-datasorce config to make sure these have a value?