Chapter 8. Java EE and Message-Driven Beans
Java EE Overview
The examples in the book so far have primarily been Java SE applications using an external JMS provider (e.g., ActiveMQ, WebSphere MQ, and SonicMQ, to name a few). We will now look at how JMS can be used within the Java Platform, Enterprise Edition (Java EE). Java EE is a specification that unites several other Java enterprise technologies, including JMS, into one complete platform. Java EE is built on several main components: Web Services, Enterprise JavaBeans (EJB), and Java Management Extensions (JMX). Many other technologies, such as JMS, JDBC, JPA, JSP, JavaMail, JTA, and JNDI are also included as services in Java EE. The Java Message Service actually has two roles in Java EE: it is both a service and the basis for a special enterprise bean type called a message-driven bean, or simply MDB.
Java EE provides applications with several advantages, including object lifecycle management, container-managed resources, simplified deployment, load balancing, and the ability to seamlessly define and access remote objects. The Java EE container manages several types of resources, including data sources, JTA UserTransactions, and the EJB SessionContext. In addition to these resources, the Java EE container also manages JMS resources, including JMS destinations (queues and topics) and the JMS connection factory.
Per the Java EE specification, every application server compliant with the Java EE 4 specification and higher is also required ...
Get Java Message Service, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.