基于JMS的消息中间件的设计
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
Internet的发展使得分布式计算环境下的应用集成越来越普遍,中间件是实现应用间互操作的一个重要手段。面向消息的中间件能够为分布式企业应用提供更为灵活、高效和可靠的异步消息传递机制。
     消息中间件采用消息传递机制为网络计算提供了异步低耦合的编程架构。Java Message Service(JMS)是由SUN Microsystems公司提出的基于Java技术的消息中间件的规范。它有效地屏蔽了网络协议、应用实现的具体技术、操作系统和数据库的细节,目前已被各大软件公司和开源组织所接受,成为业界的事实标准。
     针对目前消息中间件所存在的一些不足,例如传统类型的消息中间件的设计与开发没有统一的标准,各种消息中间件都使用专有的API和专有协议,来自不同厂家的消息中间件产品之间很难进行互操作;并且由于JMS技术发展时间并不长,在安全性、XML支持、管理工具以及支持除Java以外的其他语言等方面还没有深入研究等问题,本文在研究消息中间件技术和JMS规范的基础上,设计并实现了一个完全符合JMS规范的消息中间件产品:FreeJMS。
     由于JMS规范中没有对消息过滤机制进行具体说明,而传统的基于JMS的消息过滤方法效率较低,本文在第三章给出了一种改进的基于JMS的消息过滤算法。
     文章最后给出了系统的整体结构设计和各项服务的设计思想,并根据设计思想给出其具体的实现细节。作为一个消息服务系统,产品建立了发布/订阅和点到点的两种消息模式,实现了全部的JMS标准API,提高了消息持久化、消息预览和消息选择功能;基于J2EE技术,产品建立了可靠的线级通讯连接,提供了名字与目录服务,完成了会话和表示层的封装,为应用层的网络应用提供了透明接口;同时在服务器端实现了事件监听和多线程管理等机制,提高了产品的服务质量。
With the rapid development of Internet, application integration under distributed computing environment has become more and more widely used. Middleware is an important approach to achieve cooperation among applications. Message-oriented Middleware(MOM) can provide flexible, effective and reliable asynchronous messaging mechanism for distributed enterprise applications.
     Message-oriented middleware(MOM) is a special middleware based on message-transmission, effective and reliable message transmission for communication across heterogeneous platforms can be provided by it. Distributed systems can interact and be integrated on the way of data communication by MOM. Java Message Service(JMS) is a specification for MOM based on Java Language Protocol, and was created by Sun Microsystems. It makes the heterogeneity of network programming language, OS and Database.
     In view of the current middleware existence of a number of shortcomings, For example, the traditional type of middleware design and development is no uniform standard, various Middleware use proprietary APIs and proprietary protocols, from different manufacturers middleware products is difficult to inter-operate; and because JMS technology development time is not long, in the security, XML support, management tools and support in addition to other than the Java language and other aspects have not yet in-depth research, Based on the study of information technology and JMS Middleware norms on the basis of Design and implementation of a fully consistent with the news of JMS middleware products: FreeJMS.
     Because the message filter mechanism is not mentioned in JMS specification, and the traditional message filter algorithms based on JMS is inefficient. In the third part, an improved message filter algorithm in JMS is suggested.
     After the research of MOM technology and JMS Specification, a method of designing and implementing a MOM system based on JMS Specification has been carried out. FreeJMS creates publish/subscribe and point-to-point messaging model, implements all JMS API, provides persistent messaging, message browser and message selector. As a middleware, FreeJMS creates reliable wire-level communication and JNDI service, wraps the lower layer of network and provides interfaces for application layer. Besides, several system services, like garbage collection, event listener and thread pool management are also provides in the product.
引文
[1] Mark Hapner,Rich Burridge.Java消息服务API参考指南,康博译.北京:清华大学出版社,2002.
    [2] Sun Microsystems. Java Message Service Specification. http://java.sun.com/products/jms.
    [3] IBM MQSeries. http://www-900.ibm.com/cn/software/websphere/products/mq_series.
    [4] 徐晶,许炜.消息中间件综述.计算机工程,2005,31(16):73-76
    [5] 纪林波,王志坚.基于JMS体系结构的消息服务技术的应用研究.计算机应用研究,2003,11:48-51.
    [6] 詹剑锋.中间件技术的现状和发展.计算机教育,2004,9:25-27.
    [7] 宁芊,殷国富.基于Java的企业应用集成技术.计算机应用研究,2004,2:124-126.
    [8] Kurt Geihs. Middleware Challenges Ahead. IEEE, 2001.
    [9] Stenfan Tai, Isabelle Rouvellou. Using Message-oriented-Middleware for Reliable Web Serices Messageing. C. Busslet et al. (Eds): WES 2003.
    [10] 徐远芳.消息中间件在Web服务中的应用及面向Web服务的消息中间件设计.广西大学硕士学位论文.2004.
    [11] 张晓丽.消息中间件的应用与研究.昆明理工大学硕士学位论文,2003.
    [12] 消息中间件产品白皮书.http://www.datastrategy.org/carbon/archives/000304.html.
    [13] Sushant Goel, Hema Sharda, Dabid Taniar. Asychronous Messageing Using Message-oriented-middleware. J. Liu et al. (EDS): IDEAL 2003.
    [14] 于曦,李丹.面向消息的中间件概述.成都大学学报.2002(4):34-36.
    [15] 李华飚,郭英奎等.Java中间件开发技术.北京:中国水利水电出版社,2005.
    [16] Tarak Modi. Practical Java Message Service. Manning, 2004.
    [17] Rickard Monson-Haefel, David Chappell. Java Message Service. O'Reilly, 2001.
    [18] Sun Microsystems. Java Message Service Specification. http://java.sun.com/products/jms.
    [19] 张国才,徐效美.JMS与消息EJB在点对点通信系统中的应用.微计算机应用,2004,25(2):241-243.
    [20] 彭珍.基于JMS的组通信中间件的研究.山东大学硕士学位论文,2005.
    [21] 基于JMS的消息中间件设计与实现.计算机应用,2003,23(8):64-66.
    [22] Fengyun Cao, Singh. Efficient Event Routing in Content-based Publish-Subscribe Service Networks. IEEE INFOCOM. March, 2004, 2: 929-940.
    [23] Patrick Th, Eugster, Pascal A. The Many Faces of Publish/Subscribe. ACM Computing Surveys, June, 2003, 35(2): 114-131.
    [24] 王宏斌.消息中间件技术的研究和实践.浙江大学硕士学位论文,2004.
    [25] Sun Microsystems. JMS 1.1 API.2002.
    [26] 赵强,乔新亮.J2EE应用开发.北京:电子工业出版社,2003.
    [27] ActiveMQ. http://activemq.codehaus.org.
    [28] Peter R, Hermes:A scalable event-based middleware. University of Canbridge, Cambridge, 2004.
    [29] Shoffner M. Write your own MOM. http://www.javaworld.com/javaworld/jw-05-1998/jw05-step.html.
    [30] William Grosso. Java RMI. O'Reilly, 2001
    [31] Rosanna Lee. The JNDI API Tutorial and Reference. Sun Microsystem 2002.
    [32] 罗晓斌,董守斌.基于JMS的异步消息处理技术及应用.计算机工程,2002,28(12):121-122.
    [33] Cay Horstmann,Gary Cornell,王建华译.Java2核心技术,卷2:高级特性(7th).机械工业出版社,2005.
    [34] Scott Oaks, Henry Wong. Java Threads, Third Edition. O'Reilly 2005.
    [35] Paul Hyde. Java Thread Programming. Sams Publishing 1999.
    [36] CalvinAustin Monica Pawla, 前导工作室译.Java2高级编程.机械工业出版社,2001.
    [37] Gate Banavar, Chaandra. A case for Message-oriented Middleware. In DISC'99, Bratislave, Slovak Republic, 1999.
    [38] 刘振涛,熊璋,欧阳元新.基于内容的订阅方法及其在MQSeries中的实现.计算机工程.2004(16):91-93.
    [39] 孙明.基于J2EE消息服务的研究与设计.成都电子科技大学硕士学位论文,2003.
    [40] A Tsalgatidou, T Pilioura. An overview of Standards and Related Technology in Web Service. Distributed and Parallel Databases, 2002, 12(3): 135-162.
    [41] J Pereira, F Fabret, et al. Efficient matching for web-based publish/Subscribe systems. In Proc 7th Int. Conf. On Cooperative Information Systems. 2000.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700