Operating System

Programming Languages

Database

General

The image “http://www.mokabyte.com/2001/04/ejb.jpg” cannot be displayed, because it contains errors.EJB - Introduction

Enterprise beans are the J2EE components that implement Enterprise Java-Beans (EJB) technology. Enterprise beans run in the EJB container, a runtime environment within the Application Server. 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 J2EE applications.

What Is an Enterprise Bean?
An enterprise bean is a server-sidecomponent that encapsulates the business logic of an application. The business logic is the code that fulfills the purpose of the application. In an inventory control application, for example, the enterprise beans might implement the business logic in methods called checkInventoryLevel and orderProduct. By invoking these methods, remote clients can access the inventory services provided by the application.

Benefits of Enterprise Beans
Enterprise beans simply 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 and not the bean developer is responsible for system-level services such as transaction management and security authorization. Second, because the beans and not the clients contain the application's business logic, the client developer can focus on the presentation of the client. The client developer does not have to code the routines that implement business rules or access databases.

Types of Enterprise Beans

  1. Session Bean
    A session bean represents a single client inside the Application Server. To access an application that is deployed on the server, the client invokes the session bean's methods. The session bean performs work for its client, shielding the client from complexity by executing business tasks inside the server. The sesion bean is divided into two categories
    1. Stateless Session Bean
    2. Stateful Session Bean
  2. Entity Beans
    An entity bean represents a business object in a persistent storage mechanism.Some examples of business objects are customers, orders, and products. In the Application Server, the persistent storage mechanism is a relational database. Typically, each entity bean has an underlying table in a relational database, and each instance of the bean corresponds to a row in that tables.They are two types
    1. Bean Managed Persistence
    2. Container Managed Persistence
  3. Message Driven Bean
    Session beans and entity beans allow you to send JMS messages and to receive them synchronously, but not asynchronously. To avoid tying up server resources, you may prefer not to use blocking synchronous receives in a server-side component.To receive messages asynchronously, use a message-driven bean.

 

Hosted by www.Geocities.ws

1