tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmcletchie <>
Subject Re: datasource duplication in tomee
Date Mon, 14 Aug 2017 16:48:28 GMT
I solved my problem with the PSI probe & I wanted to post this in case anyone
comes across this issue.

If I define a datasource in tomee.xml, then it does not appear in the "Data
Sources" tab in PSI probe.

The problem is that psi probe is looking for instances of
"org.apache.tomcat.jdbc.pool.DataSource", and tomee is subclassing that,
using "org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource". 

I created an issue with PSI probe, and i'll submit a patch if i can figure
out how to use github.  There's about 10 ways to solve it, but if anyone is
stuck with this issue, this is a simple patch that functions as a workaround
for me:
@@ -43,8 +43,8 @@ public class TomcatJdbcPoolDatasourceAccessor implements
DatasourceAccessor {

   public boolean canMap(Object resource) {
-    return
-        && resource instanceof DataSource;
+    return
+        &&*/ resource instanceof DataSource;



View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message