title: JBoss EAP 7: xa transaction warning “No security domain defined for crash recovery” even with a security domain
body: <p>I have a JBoss EAP 7.1 with some XA datasource.</p>
  
  <p>The datasource has a security domain:</p>
  
  <pre><code>                &lt;security&gt;
                      &lt;security-domain&gt;encrypted-ds&lt;/security-domain&gt;
                  &lt;/security&gt;
  </code></pre>
  
  <p>which makes use of the encrypted-password login module (for various political reasons):</p>
  
  <pre><code>            &lt;security-domain name="encrypted-ds" cache-type="default"&gt;
                  &lt;authentication&gt;
                      &lt;login-module code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required"&gt;
                          &lt;module-option name="username" value="user_name_here"/&gt;
                          &lt;module-option name="password" value="some_hash_here"/&gt;
                      &lt;/login-module&gt;
                  &lt;/authentication&gt;
              &lt;/security-domain&gt;
  </code></pre>
  
  <p>Yet, I get those cyclic warning messages when the server has started:</p>
  
  <pre><code>11:25:15,506 WARN  [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000904: No security domain defined for crash recovery: java:/jdbc/myDataSource
  11:25:15,511 WARN  [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000905: Subject for crash recovery was null: java:/jdbc/myDataSource
  </code></pre>
  
  <p>This is similar, but not the same as question <a href="https://stackoverflow.com/questions/24138036/wildfly-xa-transaction-warning-no-security-domain-defined-for-crash-recovery">Wildfly xa transaction warning &quot;No security domain defined for crash recovery&quot;</a> , as here, I have a username and an encrypted password, and a security domain. I can fathom why the system would consider there is no security domain nor subject/username.</p>