<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    paulwong

    Which is better: PooledConnectionFactory or CachingConnectionFactory?

    From here:

    The difference between the PooledConnectionFactory and the CachingConnectionFactory is a difference in implementation. Below are some of the characteristics that differ between them:

    • Although both the PooledConnectionFactory and the CachingConnectionFactory state that they each pool connections, sessions and producers, the PooledConnectionFactory does not actually create a cache of multiple producers. It simply uses a singleton pattern to hand out a single cached producer when one is requested. Whereas the CachingConnectionFactory actually creates a cache containing multiple producers and hands out one producer from the cache when one is requested.

    • The PooledConnectionFactory is built on top of the Apache Commons Pool project for pooling JMS sessions. This allows some additional control over the pool because there are features in Commons Pool that are not being used by the PooledConnectionFactory. These additional features include growing the pool size instead of blocking, throwing an exception when the pool is exhausted, etc. You can utilize these features by creating your own Commons Pool GenericObjectPool using your own customized settings and then handing that object to the PooledConnectionFactory via the setPoolFactory method. See the following for additional info: http://commons.apache.org/pool/api-1.4/org/apache/commons/pool/impl/GenericObjectPoolFactory.html

    • The CachingConnectionFactory has the ability to also cache consumers. Just need to take care when using this feature so that you know the consumers are cached according to the rules noted in the blog post.

    • But most importantly, the CachingConnectionFactory will work with any JMS compliant MOM. It only requires a JMS connection factory. This is important if you are using more than one MOM vendor which is very common in enterprise organizations (this is mainly due to legacy and existing projects). The important point is that the CachingConnectionFactory works very well with many different MOM implementations, not only ActiveMQ.

    From here:

    • If you have clustered ActiveMQs, and use failover transport it has been reported that CachingConnectionFactory is not a right choice.

    • The problem I’m having is that if one box goes down, we should start sending messages on the other, but it seems to still be using the old connection (every send times out). If I restart the program, it’ll connect again and everything works. Source: Autoreconnect problem with ActiveMQ and CachingConnectionFactory

    • The problem is that cached connections to the failed ActiveMQ was still in use and that created the problem for the user. Now, the choice for this scenario is PooledConnectionFactory.

    • If you’re using ActiveMQ today, and chances are that you may switch to some other broker (JBoss MQ, WebSphere MQ) in future, do not use PooledConnectionFactory, as it tightly couples your code to ActiveMQ.

    posted on 2020-03-19 09:37 paulwong 閱讀(420) 評論(0)  編輯  收藏 所屬分類: JMS

    主站蜘蛛池模板: 爱情岛论坛网亚洲品质自拍| 人妻巨大乳hd免费看| 大学生一级特黄的免费大片视频 | 久久亚洲国产欧洲精品一| 亚洲精品无码久久久久YW| 免费看成人AA片无码视频羞羞网| MM1313亚洲国产精品| 亚洲国语精品自产拍在线观看| 中文字幕永久免费| 亚洲av中文无码乱人伦在线r▽ | 亚洲av永久无码精品漫画| 亚洲一级免费视频| 成人免费观看男女羞羞视频| 亚洲中文无码a∨在线观看| 瑟瑟网站免费网站入口| 久久久亚洲欧洲日产国码aⅴ| 久久久久高潮毛片免费全部播放| 日韩亚洲AV无码一区二区不卡| 在线观着免费观看国产黄| 午夜理伦剧场免费| 亚洲午夜精品一区二区公牛电影院| 免费日韩在线视频| 九九精品免费视频| 成人黄网站片免费视频| 成人精品国产亚洲欧洲| 亚洲国产精品日韩在线观看| 国产成人亚洲精品狼色在线| 无码国产精品一区二区免费模式 | 免费亚洲视频在线观看| **一级毛片免费完整视| 成人自慰女黄网站免费大全| 亚洲AV色欲色欲WWW| 亚洲国产日韩女人aaaaaa毛片在线| 色久悠悠婷婷综合在线亚洲| 国产成人在线观看免费网站| 好猛好深好爽好硬免费视频| 久久久久久亚洲Av无码精品专口| 亚洲精品成人片在线观看| 97公开免费视频| a级毛片视频免费观看| 亚洲kkk4444在线观看|