Sunday, March 17, 2013

Enterprise Bean / Message Driven Bean


JAVAEE 6 Tutorial 


Part IV
Enterprise Beans

Part IV explores Enterprise JavaBeans components. This part contains the following chapters:

Chapter 22
Enterprise Beans

Enterprise beans are Java EE components that implement Enterprise JavaBeans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the GlassFish Server (see Container Types). Although transparent to the application developer, the EJB container provides system-level services, such as transactions and security, to its enterprise beans. These services enable you to quickly build and deploy enterprise beans, which form the core of transactional Java EE applications.
Java EE Server and Containers
Diagram of client-server communication showing servlets and web pages in the web tier and enterprise beans in the business tier.


What Is an Enterprise Bean?

Written in the Java programming language, an enterprise bean is a server-side component that encapsulates the business logic of an application


Benefits of Enterprise Beans

For several reasons, enterprise beans simplify the development of large, distributed applications. First, because the EJB container provides system-level services to enterprise beans, the bean developer can concentrate on solving business problems. The EJB container, rather than the bean developer, is responsible for system-level services, such as transaction management and security authorization.


Types of Enterprise Beans

Table 22-1 summarizes the two types of enterprise beans. The following sections discuss each type in more detail.

Table 22-1 Enterprise Bean Types
Enterprise Bean Type
Purpose
Session
Performs a task for a client; optionally, may implement a web service
Message-driven
Acts as a listener for a particular messaging type, such as the Java Message Service API




Message Driven Bean
http://docs.oracle.com/javaee/6/api/javax/ejb/MessageDriven.html




No comments:

Post a Comment