除了設立模塊中如何在jBoss 7.x上的Arquillian測試中設置p6spy驅動程序?
JBOSS_HOME/modules/com/p6spy/main
加入p6spy.jar
和module.xml
說:
<module xmlns="urn:jboss:module:1.0" name="com.p6spy">
<resources>
<resource-root path="p6spy.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
編輯standalone-full.xml
和添加datasources/drivers
下一個條目:
<driver name="p6spy" module="com.p6spy">
<xa-datasource-class>com.p6spy.engine.spy.P6SpyDriver</xa-datasource-class>
</driver>
添加模塊依賴於jboss-deployment-structure.xml
:
<module name="com.p6spy"/>
與p6spy
替換原來的驅動程序中的數據源定義我仍然收到此錯誤:
Caused by: java.lang.Exception:
{"JBAS014771: Services with missing/unavailable dependencies" =>
["jboss.data-source.jboss/datasources/MyDsjboss.jdbc-driver.p6spyMissing
[jboss.data-source.jboss/datasources/MyDsjboss.jdbc-driver.p6spy]"
]}
自JBoss 6.1以來的作品 https://developer.jboss.org/message/880396#880396 – Sylvain