<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

    主站蜘蛛池模板: 成人免费视频网站www| 青苹果乐园免费高清在线| 无码人妻精品中文字幕免费| ww4545四虎永久免费地址| 永久免费看bbb| 亚洲精品视频在线看| 久久精品亚洲日本佐佐木明希| 亚洲欧洲日产专区| 婷婷亚洲综合五月天小说在线| 两个人看的www视频免费完整版| 91精品国产免费网站| 国产精品久免费的黄网站 | 91嫩草私人成人亚洲影院| 中文字幕 亚洲 有码 在线| 农村寡妇一级毛片免费看视频| 69视频免费观看l| 中文字幕亚洲图片| 国产精品亚洲综合五月天| 久久国产精品免费视频| 国产精品免费看香蕉| 亚洲人成在线免费观看| 人人爽人人爽人人片av免费| 嘿嘿嘿视频免费网站在线观看| 亚洲日韩中文字幕在线播放| 亚洲综合精品伊人久久| 大地资源网高清在线观看免费 | 丰满人妻一区二区三区免费视频 | 亚洲综合视频在线| 免费国产va在线观看| 午夜寂寞在线一级观看免费| 亚洲精品影院久久久久久| 九九综合VA免费看| 好男人www免费高清视频在线| 久久亚洲精品成人无码网站| 中文字幕免费在线看| 亚洲人成无码网站久久99热国产| 亚洲香蕉久久一区二区| 亚洲一区二区三区免费在线观看 | 野花香高清视频在线观看免费| 国产精品免费视频一区| 亚洲精品无码中文久久字幕|