This is all wired in at runtime when your plugin Spring context is resolved.
You would have to “mock out” the TransactionalExecutorFactory to give out connections to your other database
But honestly this library is a thin wrapper over querydsl itself. In think you might get better mileage out of going direct to querydsl and provide connections to it.