How to use atlassian-pocketknife-querydsl

I intend to access external databases with a P2 plugin and I would like to use the builtin library querydsl;

I did a few attempt but none worked, do you have some simple example about how to create a database connection and perform select and updates?


The library makes a large assumption about where the connections come from. And that is that TransactionalExecutorFactory is giving out connections

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.


That was what I thought! Thank you bbaker!

I’ll go ahead and use querydsl instead.

What are the main reason(s) for using pocketknife vs using QueryDSL directly, even for the local DB? Is it just the Spring wiring?