摘要
在一般消息传递模式中,消息持久化的操作与目的消费者的业务逻辑都放置在目的端系统中进行,消息生产者在异步传输消息时只要目的系统瘫痪就会引起消息的丢失.针对这个问题,用J2EE服务器作为中间件服务器,将消息持久化操作与业务逻辑分离,分析了J2EE服务器作为中间件进行消息持久化的优缺点,且在中间件服务器实现用MDB对多个标题或队列监听,进而调用实体Bean进行消息持久化,节省了系统资源,程序逻辑简单,同时确保目的端系统瘫痪时消息不丢失.
For the common model of message delivery, message persistence and consumer's business logic are all placed on the destination system. At the destination end all messages are lost when the destination computer collapses during the asynchronous message' s delivery from the message publisher. Regarding this problem, this article uses J2EE server as middleware, separates the message persistence and consumer's logic, analyze its trade-off when the middleware does the message persistence. At the same time, MDB on the middleware listens to multiple topics or queues, further invoke entity bean to finish the message persistence, saving system resources, simplifying programming logic, and guaranteeing the message existence when the destination system collapses.
出处
《微电子学与计算机》
CSCD
北大核心
2008年第4期178-180,184,共4页
Microelectronics & Computer