除了在
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]"
]}