码迷,mamicode.com
首页 > 数据库 > 详细

atomikos 优化JDBC性能

时间:2019-01-18 01:01:31      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:eth   enc   asi   timeout   reason   uid   start   value   expected   

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性能

标签:eth   enc   asi   timeout   reason   uid   start   value   expected   

原文地址:https://www.cnblogs.com/jiathis/p/10285547.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!