I just happened to run across a link to this very old blog post:
Sneaking in JDBC Drivers. Heinz Kabutz knows what he's talking about but on the other hand the article is over 10 years ago and things have changed somewhat in the
JDBC world since then. However the general idea is that you force your own JDBC driver to be loaded first, and then have it intercept calls from the other driver and forward those calls on to your preferred database. That could be more complicated than the example in the blog post but it may or may not be doable for what you need.