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.

转载于:https://www.cnblogs.com/jiathis/p/10285547.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值