Friday, February 29, 2008

Enterprise JavaBeansTechnology(simply)

An EJB component,or enterprise bean, is a body of code having fieldsand methods to implement modules of business logic. You can think of an enterprise bean as abuilding block that can be used alone or with other enterprise beans to execute business logic onthe Java EE server.


There are two kinds of enterprise beans:
session beans
message-driven beans

Java EE Application Assembly and Deployment..

A Java EE application is packaged into one or more standard units for deployment to any JavaEE platform-compliant system.

Each unit contains:
¦ A functional component or components (such as an enterprise bean, JSP page, servlet, orapplet)
¦ An optional deployment descriptor that describes its content


A Java EE application is delivered in an Enterprise Archive (EAR) file, a standard Java Archive(JAR) file with an .ear extension. Using EAR files and modules makes it possible to assemble a number of different Java EE applications using some of the same components.

An EAR file contains Java EE modules and deployment descriptors. Adeployment descriptor is an XML document with an .xml extension that describes thedeployment settings of an application, a module, or a component.

Java EE components:

There are web, enterprise bean, or application clientcomponents.

¦ Application clients and applets are components that run on the client.
¦ Java Servlet, JavaServer Faces, and JavaServer Pages(JSP) technology components areweb components that run on the server.
¦ Enterprise JavaBeans(EJB) components (enterprise beans) are business componentsthat run on the server.

Containers..Containers are the interface between a component and the low-level platform-specificfunctionality that supports the component. Before a web, enterprise bean, or application clientcomponent can be executed, it must be assembled into a Java EE module and deployed into its container.

Multitiered application model

The Java EE platform uses a distributed multitiered application model for enterpriseapplications.

¦ Client-tier components run on the client machine.
¦ Web-tier components run on the Java EE server.
¦ Business-tier components run on the Java EE server.
¦ Enterprise information system (EIS)-tier software runs on the EIS server.

JavaEE multitiered applications are generally considered to be three-tiered applications becausethey are distributed over three locations: client machines, the Java EE server machine, and the database or legacy machines at the back end.


Client Machine--Client tier(Java applications or dynamic HTML pages)


v
JavaEE Server Machine--Web tier(JSP pages) +Business tier(Enterprice Beans)


v
Database server machine--EIS tier(database)