[英]Generic JMS Client with SSL connection capability
Currently, I have implemented a non-SSL secured client using the standard JMS API (only javax.jms.*
classes). 当前,我已经使用标准JMS API(仅
javax.jms.*
类)实现了非SSL安全客户端。 When supplied with specific product JAR and proper classnames, it is able to connect to any JMS server. 当提供特定的产品JAR和正确的类名时,它可以连接到任何JMS服务器。
Is there a way how to implement such generic (vendor-independent) JMS client with SSL connection capabilities? 有没有办法通过SSL连接功能实现这种通用的(独立于供应商的)JMS客户端?
My research was not successful - I've found several examples implementing JMS with SSL (eg Novell JMS , ActiveMQ ) but none of them avoids using the vendor-specific classes directly in code and implementations differ considerably. 我的研究并不成功-我发现了几个使用SSL实现JMS的示例(例如Novell JMS , ActiveMQ ),但是它们都不能避免直接在代码中使用特定于供应商的类,并且实现方式也大不相同。
Using SSL doesn't require any code change in client. 使用SSL不需要在客户端中更改任何代码。 Adding SSL capability is only matter of configuration.
添加SSL功能仅是配置问题。
In general, there are few things that will differ: 通常,几乎没有什么不同:
ssl://broker_url
instead of tcp://broker_url
). ssl://broker_url
而不是tcp://broker_url
)。 -D
JVM option.) -D
JVM选项的任何准备,也可以完成此操作。) Since points 2. and 3. differ from one JMS broker to another, see your vendor's documentation for further details. 由于第2点和第3点从一个JMS代理到另一个JMS代理,因此有所不同,请参阅供应商的文档以获取更多详细信息。
This answer is based on experience with successful connection to Apache ActiveMQ and Tibco EMS, including mutual certificate authentication. 该答案基于成功连接到Apache ActiveMQ和Tibco EMS(包括相互证书认证)的经验。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.