23.07.2013 Views

O'Reilly - Java Message Service

O'Reilly - Java Message Service

O'Reilly - Java Message Service

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Java</strong> <strong>Message</strong> <strong>Service</strong><br />

Figure 1.7. Integrating two different purchase order systems with an ERP system<br />

What is interesting about this example is that the ERP Gateway is unaware that it is<br />

receiving purchase order messages from two completely different sources. The legacy EDI<br />

system may be an older in-house system or it could be the main system for a business<br />

partner or a recently acquired subsidiary. In addition, the legacy EDI system would have<br />

been added dynamically without requiring the shutdown and retooling of the entire system.<br />

Enterprise messaging systems make this kind of flexibility possible, and JMS allows <strong>Java</strong><br />

clients to access many different MOMs using the same <strong>Java</strong> programming model.<br />

1.4 RPC Versus Asynchronous Messaging<br />

RPC (Remote Procedure Call) is a term commonly used to describe a distributed<br />

computing model that is used today by middleware technologies such as CORBA, <strong>Java</strong><br />

RMI, and Microsoft's DCOM. Component-based architectures such as Enterprise<br />

<strong>Java</strong>Beans are built on top of this model. RPC-based technologies have been, and will<br />

continue to be, a viable solution for many applications. However, the enterprise messaging<br />

model is superior in certain types of distributed applications. In this section we will discuss<br />

the pros and cons of each model. In Chapter 8, J2EE, EJB, and JMS, we will discuss a<br />

means of combining the two.<br />

1.4.1 Tightly Coupled RPC<br />

One of the most successful areas of the tightly coupled RPC model has been in building 3tier,<br />

or n -tier applications. In this model, a presentation layer (1 st tier), communicates<br />

using RPC with business logic on the middle tier (2 nd tier), which accesses data housed on<br />

the back end (3 rd tier). Sun Microsystems' J2EE platform and Microsoft's DNA are the<br />

most modern examples of this architecture.<br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!