Integration Tier Patterns - Service Activator

Problem
  You want to invoke services asynchronously.

Forces
  You want to invoke business services, POJOs, or EJB components in an asynchronous manner.
  You want to integrate publish/subscribe and point to point messaging to enable asynchronous processing services.
  You want to perform a business task that is logically composed of several business tasks.

Solution
  Use a Service Activator to receive asynchronous requrests and invoke one or more business services.

在我看来:

  使用JMS或MDB实现异步服务调用。


What to use, Topic or Queue?
Queue
  In order service, one request is delivered to one and only one order processor.
Topic
  In order service, ... Each receiver that receives a copy of the request peforms its own processing on the request.
  The order processor processes the order,
  the auditor service stores the request in an auditing system,
  the logging service logs the message to an order-received log, and so on.

Reference
  Core J2EE Patterns 2nd Editioin.chm 

posted @ 2012-02-25 14:19  万法自然~  阅读(193)  评论(0编辑  收藏  举报