- Introduction to Java Message Service
- JMS Architecture
- JMS Messages
- Messaging Domain Models
- The JMS Programming Model
- JMS Integration with EJBs
- Summary
JMS Integration with EJBs
In the EJB 1.1 specification, the JMS API was required, but the implementation of -JMS SPI was optional. In the EJB 2.0 specification, the JMS must be fully implemented. The EJB 2.0 specification also introduced message-driven beans, which are used to model stateless JMS consumers. Message-driven beans enable developers to write asynchronous EJB applications. We'll leave the discussion of message-driven beans to the next chapter. JMS applications help solve the following business issues:
integration of disparate systems in a heterogeneous environmentA JMS provider can facilitate the exchange of business data among incompatible systems by enabling XML message exchanges. An ERP system that isn't able to directly interface with a legacy system can use JMS provider and appropriate message format to translate information from the ERP to the legacy system and vice-versa.
business information exchangeIt's common in businesses to exchange price, discount, and/or supply information. This is usually done via fax, telephone, or e-mail, functions all prone to human error. Businesses can use JMS to exchange information directly between applications and avoid human error.
automation of business functionsBusinesses can use B2B JMS trading applications to buy and sell goods, thus saving time and money. For example, an inventory management application can automatically request the supplier application to replenish the inventory as well as create the necessary purchase order.