0% found this document useful (0 votes)
48 views14 pages

Unit 2

EJB (Enterprise JavaBeans) is an architecture for developing program components in Java that run on the server-side in a client-server network. EJBs use a three-tier architecture with the client, EJB server, and database tiers. EJB components reside in the middle tier within an EJB container in the EJB server. The EJB server provides services like transactions and security to EJB beans. There are two main types of EJB beans: session beans which represent a single client session and entity beans which represent persistent business objects stored in a database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views14 pages

Unit 2

EJB (Enterprise JavaBeans) is an architecture for developing program components in Java that run on the server-side in a client-server network. EJBs use a three-tier architecture with the client, EJB server, and database tiers. EJB components reside in the middle tier within an EJB container in the EJB server. The EJB server provides services like transactions and security to EJB beans. There are two main types of EJB beans: session beans which represent a single client session and entity beans which represent persistent business objects stored in a database.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

EJB

Name:-Ashwini Patil
Guide:- Prof. Sandeep Vanjale.
Self Study II(Middleware Technology).
EJB
 Enterprise JavaBeans (EJB) is an architecture
for setting up program components, written in
the Java programming language, that run in
the server parts of a computer network that
uses the client/server model.
 Enterprise JavaBeans is built on the

JavaBeans technology for distributing program


components (which are called Beans,) to
clients in a network.
EJB’s Architecture
 Logically three-tier system.
 EJB server & DB reside on the same machine – EJB

server includes built in functionality for persistent


storage.
 EJB server & Client – EJB bean makes a call to

another EJB bean


 All three tier might reside on a single machine
 Client - EJB Server - Database
EJB’s role in the three layers
 Client calls remote EJB’s
 EJB components live in the middle tier,
 EJB objects reside in an EJB container which

is in side of an EJB server


 DB resides in the third layer EJB beans

accesses the DB through JDBC


Overview of EJB’s Software
Architecture
 EJB bean exists
within the container
Client
 communicates with

bean through home


interface, remote
interface
 EJB server provides container with lower level
services such as network connectivity layered
approach EJB Container Interface between
EJB and outside world.
 It can create pool of beans provides services

to Beans – Support for transactions,


management of multiple instances,persistence,
and security.
Types of EJB beans
 Session Bean – is created by a Client and
usually exist only for the duration of a single
client/server session.
 Entity Bean – represents a business objects in

a persistent storage mechanism


 Ex : Customers, orders & products
 A stateless session bean is a distributed object that does not
have an associated conversational state, thus allowing
concurrent access to the bean.
 The contents of instance variables are not guaranteed to be
preserved across method calls.
 Stateful session beans are distributed objects having a
conversational state. The state could be persisted, but access to
the bean is limited to only one client.
EJB deployment
 Deployment involves taking an EJB
compliant bean and creates XML that
describes the EJB packages the bean and
XML into a Jar generates container files for
the EJB configures properties of the EJB
Server.
Steps to Develop an EJB
Overview of the EJB Building and
Deploying Process
 Building and deploying EJBs in the Web
Logic Enterprise environment requires careful
planning to define how to locate these EJBs in
the WLE distributed environment.
 After the Bean Provider has implemented an

EJB's business logic and has produced an


initial deployment descriptor, the process for
building and deploying that EJB in the WLE
environment includes the following steps:
EJB Deployment
Thank You

You might also like