<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

    主站蜘蛛池模板: 在线观看免费国产视频| 久久久无码精品亚洲日韩按摩 | 九九美女网站免费| 动漫黄网站免费永久在线观看| 337p日本欧洲亚洲大胆色噜噜 | 两个人看的www免费| 亚洲伊人久久综合影院| 九九免费久久这里有精品23| 成人亚洲网站www在线观看| 91亚洲精品麻豆| 久久最新免费视频| 狠狠色伊人亚洲综合成人| 亚洲av无码一区二区三区在线播放| 今天免费中文字幕视频| 亚洲午夜久久影院| 久草视频免费在线观看| 亚洲精品国产精品乱码不99| 久久免费视频网站| 亚洲美女精品视频| 午夜电影免费观看| 亚洲第一页中文字幕| 成人免费视频一区二区三区| 亚洲国产精品成人精品小说 | 亚洲av日韩片在线观看| 中文字幕无线码中文字幕免费| 国产精品自在自线免费观看| 亚洲乱码一二三四区乱码| 91精品国产免费入口| 亚洲av午夜福利精品一区人妖| 亚欧免费视频一区二区三区| 亚洲精品成a人在线观看夫| 国产亚洲精品高清在线| 无遮挡免费一区二区三区| 亚洲国产精品无码专区| 99视频全部免费精品全部四虎| 亚洲AV永久无码精品网站在线观看| 国产日产亚洲系列| 毛片a级毛片免费观看免下载| 免费人成网上在线观看| 亚洲视频日韩视频| heyzo亚洲精品日韩|