我有一个wildfly server 8,在日志中我定期得到这两个警告:
2014-06-10 12:01:19,255 WARN [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000904: No security domain defined for crash recovery: java:jboss/datasources/sevicesDS
2014-06-10 12:01:19,256 WARN [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000905: Subject for crash recovery was null: java:jboss/datasources/sevicesDS
我的数据源配置:
<xa-datasource jndi-name="java:jboss/datasources/sevicesDS" pool-name="sevicesDS" enabled="true" use-java-context="true">
<xa-datasource-property name="URL">
jdbc:mysql://my.server.local:3306/FOUR_PM__SERVICES?useUnicode=true&characterEncoding=UTF-8
</xa-datasource-property>
<driver>mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>
<prefill>true</prefill>
</xa-pool>
<security>
<user-name>username</user-name>
</security>
<statement>
<prepared-statement-cache-size>10</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</xa-datasource>
我检查过了,这是Narayana中的一个bug。我对那件事很生气。你可以在这里查看:https://issues.jboss.org/browse/jbtm - 2190
不幸的是,WARNING表示没有针对该xa数据源运行恢复。解决方法是为连接定义密码,尽管连接到DB不需要密码。然后添加到安全标签中