atomikos 优化JDBC性能

Posted 人涉卬否

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了atomikos 优化JDBC性能相关的知识,希望对你有一定的参考价值。

JDBC performance comes for free with our pooling DataSource classes:

 

  • 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.

以上是关于atomikos 优化JDBC性能的主要内容,如果未能解决你的问题,请参考以下文章

atomikos分布式事务报错:The class 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource' specified by pro

atomikos分布式事务报错:The class 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource' specified by pro

atomikos + druid 连接超时失效

2019-04-29 EasyWeb下配置Atomikos+SQLServer分布式数据源

Maven 构建环境中的 Atomikos + Jetty - 类加载器问题?

请教mybatis+spring+atomikos的整合问题