Enterprise Beans
Enterprise beans are the Java EE server side components
that run inside the ejb container and encapsulates the business logic of an
enterprise application. Enterprise applications are the software applications
developed intended to use at large scale. These applications involves large
number of data accessing concurrently by many users. Enterprise beans are used to
perform various
types of task like interacting with the client, maintaining session for the
clients retrieving and holding data from the database and communicating with the
server.
Benefits of enterprise beans: Enterprise beans
are widely used for developing large and distributed applications. EJB
container provides the system-level services (like transaction management and security
authorization) to the enterprise beans. These services simplifies
the development process of large and distributed applications and the developer
just have to concentrate on solving the problem occurred in it.
The client developer can focus only on the
representation style of the client as all the business logic of the application
is contained in the enterprise beans. The client developer does not bother about
the code that implements business logic or the logic to access the databases.
This means that the clients are thinner. It benefits the client to be thin because the client runs on the small devices.
Developing new applications from the
existing beans is much easier because the enterprise beans are portable components. That means
applications developed by using the enterprise components can run on any
complaint J2EE server.
When to use the enterprise beans: Some of the
points are illustrated below that signifies the use of enterprise beans.
- Applications developed by using the
enterprise beans deal with a variety of clients, simply by writing few
lines of code, so that the client can locate the enterprise beans. The
client locating the enterprise bean may be various, numerous and thin.
- Enterprise
beans support transaction to ensure the integrity of the database. Transaction is
the mechanism of
managing the concurrent access of shared objects.
- Managing the fast growing number of users requires distributed
application components across multiple machines
means that the application must be scalable.
Types of enterprise beans: EJB 3.0 defines
two types of enterprise beans. These are:
- Session bean: These types of beans directly
interact with the
client and contains business logic of the business application.
- Message driven bean: It works like a listener
or a consumer for a particular messaging service such as Java Message API or
JPA for short.
|
Current Comments
5 comments so far (post your own) View All Comments Latest 10 Comments:Explain the use of Entity Bean and How its differ from Session Bean?
Posted by nalan on Friday, 05.30.08 @ 00:36am | #61373
no specific notes about ejb jar.xml and how should we specify the bean&how should we use it no proper understanding with examples etc.
and we have some properties as inheritance&polymorphism how should we maintain these properties regarding the ejb enterprise beans please specify with examples
Posted by M.C.BALA MAHENDRA on Monday, 02.4.08 @ 19:06pm | #47204
Provide more detail Ejb
Posted by Amol Kamble on Saturday, 01.26.08 @ 12:15pm | #46223
in ejb3.0 does not have entity beans why how it persist the data and how it work
Posted by penchalaiah on Wednesday, 12.5.07 @ 14:26pm | #41350
can i get examples in ejb
Posted by prasad on Monday, 10.22.07 @ 11:45am | #34553