performance comes for free with our pooling DataSource
- AtomikosDataSourceBean for XA-enabled JDBC, and
- AtomikosNonXADataSourceBean for non-XA enabled JDBC
However, you do need to make sure that you respect the following guidelines:
- Close connections as soon as you no longer need them. Note that in the case of pooling, close does not mean destroy. Rather, and thanks to our pooling, this will allow reuse of the connection at the earliest convenience.
- Set the poolSize to something that is adequate for your needs. Start with a small pool and increase its size while measuring performance under realistic concurrency loads (number of concurrent threads, …). In general, performance will improve as you make the pool grow, until the point where increasing the pool's size does not have any effect any more. That is probably the pool size you want…
- Make sure that the transaction timeout is set to a reasonable value - exactly what value depends on the expected time needed by your SQL: if you set the transaction timeout to a lower value, then most of your SQL statements will expire and rollback.
See Using TransactionsEssentials with JDBC