Skip to content

Conversation

@vlsi
Copy link
Collaborator

@vlsi vlsi commented Nov 4, 2025

Motivation and Context

commons-dbcp2 seems to be to heavyweight, and the newer versions pull jakarta.transaction for unknown reasons.
Let's stick with a well-known faster and smaller pool.

There's an issue with the current JMeter implementation: it seems to rely on transactions (==uncommitted data within connections), however, it does not manage the transactions properly.
JMeter should have dedicated JdbcTransaction or JtaTransaction elements (e.g. like @Transactional Spring), so JDBC samplers within that JdbcTransaction controller would reuse the same transaction.

Currently, JMeter borrows and releases a connection to the pool for every JDBC sampler execution, thus it can't reliably work with transactions. There's no guarantee that subsequent "borrow" would borrow the same connection. The connection pooler should rollback a dirty connection on release anyways.

So the change looks bigger than I initially planned.

TODO:

  • Add JdbcTransaction controller element so it would keep a connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant