简体   繁体   English

从Weblogic Cluster读取Spring JMS

[英]Spring JMS reading from Weblogic Cluster

I have a standalone Spring application that reads messages from a Weblogic cluster. 我有一个独立的Spring应用程序,该应用程序从Weblogic集群读取消息。 It is not a MDP, rather it runs multiple threads that each use a JMSTemplate to browse the queue and retrieve messages based on specific criteria. 它不是MDP,而是运行多个线程,每个线程都使用JMSTemplate浏览队列并根据特定条件检索消息。

I would like to cache the JMS connections, while also ensuring that I open enough connections that I always am retrieving messages from each server in the cluster. 我想缓存JMS连接,同时还要确保打开足够多的连接,以便始终从群集中的每个服务器检索消息。 My issue is the default ConnectionFactory does not cache at all, but the Spring wrappers SingleConnectionFactory and CachingConnectionFactory do not allow for multiple connections open at once. 我的问题是默认的ConnectionFactory根本不缓存,但是Spring包装器SingleConnectionFactory和CachingConnectionFactory不允许一次打开多个连接。

Should I implement my own ConnectionFactory that caches on a limited basis? 我应该实现自己的有限缓存的ConnectionFactory吗? Or what is the recommended approach. 或推荐的方法是什么。

用例在Spring中似乎很笨拙,因此通过直接管理JMS资源解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM