SlideShare a Scribd company logo
Introduction to Enterprise Java
Beans [EJB]
Lecture Series Under IFS-PERA collaboration
[2010]
Tharindu Weerasinghe [MSc.Eng, BSc.Eng (Hons), MIEEE, AMIESL]
Software Engineer, IFS R&D International
© 2010 IFS
EJB Framework - Overview
What is EJB?
❑ Enterprise Java Beans are the Java EE server
side components that run inside the EJB container
and encapsulates the business logic of an
enterprise application.
❑It is an architecture for server-side component
based distributed applications written in Java.
Basic EJB Environment
Contents of the EJB environment
➢ The EJB components are running inside the container of an
EJB server.
➢ The container has the connection to the database or to
other components.
➢ An EJB client can access the EJBs from the same Java
Virtual Machine (JVM) or from another JVM over remote
interfaces. The EJB home component is comparable to a
factory for the EJB objects. The EJB objects retrieved from the
home components can be also local or remote objects.
Why EJB ?
➢Numerous Web sites are up and running using Java without
any EJB technology. Developers have been using servlet/JSP
models and managing transactions themselves using commit
and rollback functionality that is built into JDBC without the
help of application servers.
➢But when doing so, the application developers are
confronted with many challenges. Some of the most important
ones are managing concurrency, persistence and
transactions. As a result, the developers have to either
develop proprietary code or buy supporting frameworks.
Why EJB ?
➢Above problems are solved by using enterprise beans.
The use of enterprise beans allow developers to focus on
the business logic and release them from coding
infrastructure and middleware logic, and developers
become more productive and efficient.
Benefits of EJB
➢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.
When to use EJB?
Applications developed by using the EJB, deal with a variety of
clients, simply by writing few lines of code, 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.
EJB Roles
Bean provider
The bean provider is the developer of the code, and is
responsible for converting the business requirements into
actual physical code. He or she must provide the necessary
classes that constitute an EJB, as well as providing the
deployment file describing the runtime settings for the bean.
The bean provider’s final product is an EJB JAR file.
(Most of you guys/gals fall into this category ☺)
EJB Roles
Application assembler
This may be the same as the bean provider, or a senior team
lead. The application assembler’s responsibility is to package
all the different EJB components, along with any other
application components, the final product being an enterprise
application EAR file.
Deployer
This person is responsible for deploying the EJB application on
the target runtime environment. The deployer should be
familiar with all aspects of the environment, including
transaction and security support.
EJB Roles
Server provider
The job of the server provider is to provide a runtime EJB
server environment that is compliant with the EJB
specification. IBM is a server provider of the WebSphere
Application Server.
Container provider
The job of the container provider is to provide a runtime EJB
container environment that is compliant with the EJB
specification, and is generally the same as the server provider.
The server and container cooperate to provide the quality-of-
service runtime environment for the EJBs.
EJB Roles
Systems administrator
The system administrator’s task is to ensure that the runtime
environment is configured in such a way that the application
can function correctly, and is integrated with all of the required
external components.
MAIN EJB FRAMEWORK COMPONENTS
❑EJB server
Provides the actual primary services to all EJBs. An EJB server
may host one or more EJB containers. It is also called
generically an Enterprise Java Server (EJS). WebSphere
Application Server is an EJS.
❑EJB container
Provides the runtime environment for the enterprise bean
instances, and is the intermediary between the EJB
component and the server.
MAIN EJB FRAMEWORK COMPONENTS
❑ EJB component
These represent the actual EJBs themselves. There are three
types of enterprise beans: entity, session, and message-driven
beans.
❑EJB interfaces and EJB bean
The interfaces for client access (EJB home and EJB object)
and the EJB bean class.
MAIN EJB FRAMEWORK COMPONENTS
❑EJB deployment descriptor
The descriptor defines the runtime quality of service settings
for the bean when it is deployed. Many of the settings of an
EJB, such as the transactional settings, are defined in the
deployment descriptor. The deployment descriptor is an
external entity from the bean, and therefore decouples the
bean component itself from the runtime characteristics.
❑EJB client
A client that accesses EJBs.
WE TALK MORE ON
EJB COMPONENTS
© 2009 IFS
EJB COMPONENTS
❑The EJB components refer to the beans themselves, and
include all the classes, interfaces, and constructs that make
up the enterprise bean.
❑There are three types of enterprise beans:
➢Entity
➢Session
➢Message-driven
❑The rules for bean construction (which interfaces to use,
classes to extend, and so forth) are governed by the type of
bean, so a quick introduction to the types of enterprise beans
is presented here.
MAIN EJB FRAMEWORK COMPONENTS
EJB TYPES
❑Entity Beans:
Entity beans are modeled to represent business or domain-
specific concepts, and are typically the nouns of your system,
such as customers and accounts. They usually represent data
(entities) stored in a database.
❑Session Beans:
A session bean is modeled to represent a task or workflow of a
system, and provide coordination of those activities between
beans, such as a banking service, allowing for a transfer
between accounts.
EJB TYPES
Session beans have two types:
1. Stateful Session Beans
2. Stateless Session Beans
❑Message-driven beans
Like session beans, message-driven beans (MDB) may also be
modeled to represent tasks. However, they are invoked by the
receipt of asynchronous messages. The bean either listens for
or subscribes to messages that it is to receive.
SYNCHRONOUS VS ASYNCHRONOUS INVOCATION
Entity and Session beans are accessed synchronously through
a remote or local EJB interface method invocation. This is
referred to as synchronous invocation, because there is a
request, and a (blocking) wait for the return.
Clients of EJBs invoke methods on session and entity beans.
An EJB client may be an external construct like a servlet
(remote) or another EJB within the same JVM (local).
SYNCHRONOUS VS ASYNCHRONOUS INVOCATION
The Message-driven bean is not accessible through a remote
or local interface. The only way for an EJB client to
communicate with a message-driven bean is by sending a JMS
message.
This is an example of asynchronous communication. The client
does not invoke the method on the bean directly, but rather,
uses JMS constructs to send a message. The container
delegates the message to a suitable message-driven bean
instance to handle the invocation.
SPECIAL MENTION:
All on-line material referred when preparing these slides.
© 2009 IFS
www.IFSWORLD.com
THIS DOCUMENT MAY CONTAIN STATEMENTS OF POSSIBLE FUTURE FUNCTIONALITY FOR IFS’S SOFTWARE PRODUCTS AND
TECHNOLOGY. SUCH STATEMENTS OF FUTURE FUNCTIONALITY ARE FOR INFORMATION PURPOSES ONLY AND SHOULD NOT BE
INTERPRETED AS ANY COMMITMENT OR REPRESENTATION. IFS AND ALL IFS PRODUCT NAMES ARE TRADEMARKS OF IFS. THE
NAMES OF ACTUAL COMPANIES AND PRODUCTS MENTIONED HEREIN MAY BE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.
© 2009 IFS
Ad

More Related Content

What's hot (20)

130700548484460000
130700548484460000130700548484460000
130700548484460000
Tanzeel Ahmad
 
BEAAUTIFUL presentation of java
BEAAUTIFUL  presentation of javaBEAAUTIFUL  presentation of java
BEAAUTIFUL presentation of java
rana usman
 
Java vs python
Java vs pythonJava vs python
Java vs python
Rutuja Gholap
 
Summer training presentation on "CORE JAVA".
Summer training presentation on "CORE JAVA".Summer training presentation on "CORE JAVA".
Summer training presentation on "CORE JAVA".
SudhanshuVijay3
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
ph7 -
 
Summer internship report
Summer internship reportSummer internship report
Summer internship report
Ipsit Pradhan
 
Java
JavaJava
Java
raj esaki
 
Java project
Java projectJava project
Java project
Rishabh Jain
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
MCM COmpetitive Classes
 
Features of java
Features of javaFeatures of java
Features of java
Hitesh Kumar
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
Shravan Sanidhya
 
Bn1005 demo ppt core java
Bn1005 demo ppt core javaBn1005 demo ppt core java
Bn1005 demo ppt core java
conline training
 
Overview of Java
Overview of JavaOverview of Java
Overview of Java
josemachoco
 
Java presentation
Java presentationJava presentation
Java presentation
surajdmk
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core java
Aisha Siddiqui
 
Suman
SumanSuman
Suman
suman Jeelaga
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slides
CRBTech
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
kanchanmahajan23
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
aitrichtech
 
Java part1
Java part1Java part1
Java part1
Raghu nath
 
BEAAUTIFUL presentation of java
BEAAUTIFUL  presentation of javaBEAAUTIFUL  presentation of java
BEAAUTIFUL presentation of java
rana usman
 
Summer training presentation on "CORE JAVA".
Summer training presentation on "CORE JAVA".Summer training presentation on "CORE JAVA".
Summer training presentation on "CORE JAVA".
SudhanshuVijay3
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
ph7 -
 
Summer internship report
Summer internship reportSummer internship report
Summer internship report
Ipsit Pradhan
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
MCM COmpetitive Classes
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
Shravan Sanidhya
 
Overview of Java
Overview of JavaOverview of Java
Overview of Java
josemachoco
 
Java presentation
Java presentationJava presentation
Java presentation
surajdmk
 
A seminar report on core java
A  seminar report on core javaA  seminar report on core java
A seminar report on core java
Aisha Siddiqui
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slides
CRBTech
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
kanchanmahajan23
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
aitrichtech
 

Similar to Introcution to EJB (20)

Unite5-EJB-2019.ppt
Unite5-EJB-2019.pptUnite5-EJB-2019.ppt
Unite5-EJB-2019.ppt
Krishna900061
 
Ejb notes
Ejb notesEjb notes
Ejb notes
Mumbai Academisc
 
Aravind vinnakota ejb_architecture
Aravind vinnakota ejb_architectureAravind vinnakota ejb_architecture
Aravind vinnakota ejb_architecture
tayab4687
 
EJB 2
EJB 2EJB 2
EJB 2
Khushboo Shaukat
 
EJB Container Using in Java Bean process
EJB Container Using in Java Bean processEJB Container Using in Java Bean process
EJB Container Using in Java Bean process
abhishek4493gn
 
Ch4 ejb
Ch4 ejbCh4 ejb
Ch4 ejb
Raghavendra Goud
 
EJB Interview Questions
EJB Interview QuestionsEJB Interview Questions
EJB Interview Questions
guest346cb1
 
enterprise java bean
enterprise java beanenterprise java bean
enterprise java bean
Jitender Singh Lodhi
 
Advanced Java Programming - Enterprise Java Beans client
Advanced Java Programming - Enterprise Java Beans clientAdvanced Java Programming - Enterprise Java Beans client
Advanced Java Programming - Enterprise Java Beans client
vijayalakshmis184431
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
Kelum Senanayake
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJB
Peter R. Egli
 
Introduction to Java EE EJB Component
Introduction to Java EE EJB ComponentIntroduction to Java EE EJB Component
Introduction to Java EE EJB Component
Ganesh P
 
ADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.pptADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.ppt
rani marri
 
Ejb training institute in navi-mumbai
Ejb training institute in navi-mumbaiEjb training institute in navi-mumbai
Ejb training institute in navi-mumbai
vibrantuser
 
UNIT 4.pptx
UNIT 4.pptxUNIT 4.pptx
UNIT 4.pptx
OmkarKamble76
 
J2ee web services(overview)
J2ee web services(overview)J2ee web services(overview)
J2ee web services(overview)
Prafull Jain
 
EJB3 Basics
EJB3 BasicsEJB3 Basics
EJB3 Basics
Emprovise
 
Ejb intro
Ejb introEjb intro
Ejb intro
vantinhkhuc
 
Ejb course in-mumbai
Ejb course in-mumbaiEjb course in-mumbai
Ejb course in-mumbai
vibrantuser
 
Java j2eeTutorial
Java j2eeTutorialJava j2eeTutorial
Java j2eeTutorial
QUONTRASOLUTIONS
 
Aravind vinnakota ejb_architecture
Aravind vinnakota ejb_architectureAravind vinnakota ejb_architecture
Aravind vinnakota ejb_architecture
tayab4687
 
EJB Container Using in Java Bean process
EJB Container Using in Java Bean processEJB Container Using in Java Bean process
EJB Container Using in Java Bean process
abhishek4493gn
 
EJB Interview Questions
EJB Interview QuestionsEJB Interview Questions
EJB Interview Questions
guest346cb1
 
Advanced Java Programming - Enterprise Java Beans client
Advanced Java Programming - Enterprise Java Beans clientAdvanced Java Programming - Enterprise Java Beans client
Advanced Java Programming - Enterprise Java Beans client
vijayalakshmis184431
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
Kelum Senanayake
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJB
Peter R. Egli
 
Introduction to Java EE EJB Component
Introduction to Java EE EJB ComponentIntroduction to Java EE EJB Component
Introduction to Java EE EJB Component
Ganesh P
 
ADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.pptADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.ppt
rani marri
 
Ejb training institute in navi-mumbai
Ejb training institute in navi-mumbaiEjb training institute in navi-mumbai
Ejb training institute in navi-mumbai
vibrantuser
 
J2ee web services(overview)
J2ee web services(overview)J2ee web services(overview)
J2ee web services(overview)
Prafull Jain
 
Ejb course in-mumbai
Ejb course in-mumbaiEjb course in-mumbai
Ejb course in-mumbai
vibrantuser
 
Ad

More from Tharindu Weerasinghe (20)

Professionalism & Industry Expectations from undergraduates
Professionalism & Industry Expectations from undergraduatesProfessionalism & Industry Expectations from undergraduates
Professionalism & Industry Expectations from undergraduates
Tharindu Weerasinghe
 
Importance of Knowing what you need to Know!
Importance of Knowing what you need to Know!Importance of Knowing what you need to Know!
Importance of Knowing what you need to Know!
Tharindu Weerasinghe
 
C Propgramming.pdf
C Propgramming.pdfC Propgramming.pdf
C Propgramming.pdf
Tharindu Weerasinghe
 
Basics of Computer Networks in Sinhala
Basics of Computer Networks in SinhalaBasics of Computer Networks in Sinhala
Basics of Computer Networks in Sinhala
Tharindu Weerasinghe
 
Data Structures & Algorithms in Sinhala
Data Structures & Algorithms in SinhalaData Structures & Algorithms in Sinhala
Data Structures & Algorithms in Sinhala
Tharindu Weerasinghe
 
Object Oriended Programming in Sinhala
Object Oriended Programming in Sinhala Object Oriended Programming in Sinhala
Object Oriended Programming in Sinhala
Tharindu Weerasinghe
 
Tips For A Better Undergraduate Research
Tips For A Better Undergraduate ResearchTips For A Better Undergraduate Research
Tips For A Better Undergraduate Research
Tharindu Weerasinghe
 
Basics of Block Chain
Basics of Block ChainBasics of Block Chain
Basics of Block Chain
Tharindu Weerasinghe
 
Basics of IoT
Basics of IoTBasics of IoT
Basics of IoT
Tharindu Weerasinghe
 
REST API Basics
REST API BasicsREST API Basics
REST API Basics
Tharindu Weerasinghe
 
Cloud Conputing Basics and some Related Research Topics
Cloud Conputing Basics and some Related Research TopicsCloud Conputing Basics and some Related Research Topics
Cloud Conputing Basics and some Related Research Topics
Tharindu Weerasinghe
 
Basic Concepts and Trends in Emerging Technologies
Basic Concepts and Trends in Emerging TechnologiesBasic Concepts and Trends in Emerging Technologies
Basic Concepts and Trends in Emerging Technologies
Tharindu Weerasinghe
 
Things to ponder before you start building [cooperate] software
Things to ponder before you start building [cooperate] softwareThings to ponder before you start building [cooperate] software
Things to ponder before you start building [cooperate] software
Tharindu Weerasinghe
 
How to make screens and the internet safe for Children
How to make screens and the internet safe for Children How to make screens and the internet safe for Children
How to make screens and the internet safe for Children
Tharindu Weerasinghe
 
Different Concepts on Databases
Different Concepts on DatabasesDifferent Concepts on Databases
Different Concepts on Databases
Tharindu Weerasinghe
 
A Survey Study on Higher Education Trends among Sri Lankan IT Professionals
A Survey Study on Higher Education Trends among Sri Lankan IT ProfessionalsA Survey Study on Higher Education Trends among Sri Lankan IT Professionals
A Survey Study on Higher Education Trends among Sri Lankan IT Professionals
Tharindu Weerasinghe
 
A Survey Study on Higher Education Trends among Information Technology Prof...
A Survey Study  on  Higher Education Trends among Information Technology Prof...A Survey Study  on  Higher Education Trends among Information Technology Prof...
A Survey Study on Higher Education Trends among Information Technology Prof...
Tharindu Weerasinghe
 
Triggers and Stored Procedures
Triggers and Stored ProceduresTriggers and Stored Procedures
Triggers and Stored Procedures
Tharindu Weerasinghe
 
Database Intergrity
Database IntergrityDatabase Intergrity
Database Intergrity
Tharindu Weerasinghe
 
Cursors in MySQL
Cursors in MySQL Cursors in MySQL
Cursors in MySQL
Tharindu Weerasinghe
 
Professionalism & Industry Expectations from undergraduates
Professionalism & Industry Expectations from undergraduatesProfessionalism & Industry Expectations from undergraduates
Professionalism & Industry Expectations from undergraduates
Tharindu Weerasinghe
 
Importance of Knowing what you need to Know!
Importance of Knowing what you need to Know!Importance of Knowing what you need to Know!
Importance of Knowing what you need to Know!
Tharindu Weerasinghe
 
Basics of Computer Networks in Sinhala
Basics of Computer Networks in SinhalaBasics of Computer Networks in Sinhala
Basics of Computer Networks in Sinhala
Tharindu Weerasinghe
 
Data Structures & Algorithms in Sinhala
Data Structures & Algorithms in SinhalaData Structures & Algorithms in Sinhala
Data Structures & Algorithms in Sinhala
Tharindu Weerasinghe
 
Object Oriended Programming in Sinhala
Object Oriended Programming in Sinhala Object Oriended Programming in Sinhala
Object Oriended Programming in Sinhala
Tharindu Weerasinghe
 
Tips For A Better Undergraduate Research
Tips For A Better Undergraduate ResearchTips For A Better Undergraduate Research
Tips For A Better Undergraduate Research
Tharindu Weerasinghe
 
Cloud Conputing Basics and some Related Research Topics
Cloud Conputing Basics and some Related Research TopicsCloud Conputing Basics and some Related Research Topics
Cloud Conputing Basics and some Related Research Topics
Tharindu Weerasinghe
 
Basic Concepts and Trends in Emerging Technologies
Basic Concepts and Trends in Emerging TechnologiesBasic Concepts and Trends in Emerging Technologies
Basic Concepts and Trends in Emerging Technologies
Tharindu Weerasinghe
 
Things to ponder before you start building [cooperate] software
Things to ponder before you start building [cooperate] softwareThings to ponder before you start building [cooperate] software
Things to ponder before you start building [cooperate] software
Tharindu Weerasinghe
 
How to make screens and the internet safe for Children
How to make screens and the internet safe for Children How to make screens and the internet safe for Children
How to make screens and the internet safe for Children
Tharindu Weerasinghe
 
A Survey Study on Higher Education Trends among Sri Lankan IT Professionals
A Survey Study on Higher Education Trends among Sri Lankan IT ProfessionalsA Survey Study on Higher Education Trends among Sri Lankan IT Professionals
A Survey Study on Higher Education Trends among Sri Lankan IT Professionals
Tharindu Weerasinghe
 
A Survey Study on Higher Education Trends among Information Technology Prof...
A Survey Study  on  Higher Education Trends among Information Technology Prof...A Survey Study  on  Higher Education Trends among Information Technology Prof...
A Survey Study on Higher Education Trends among Information Technology Prof...
Tharindu Weerasinghe
 
Ad

Recently uploaded (20)

Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 

Introcution to EJB

  • 1. Introduction to Enterprise Java Beans [EJB] Lecture Series Under IFS-PERA collaboration [2010] Tharindu Weerasinghe [MSc.Eng, BSc.Eng (Hons), MIEEE, AMIESL] Software Engineer, IFS R&D International © 2010 IFS
  • 2. EJB Framework - Overview What is EJB? ❑ Enterprise Java Beans are the Java EE server side components that run inside the EJB container and encapsulates the business logic of an enterprise application. ❑It is an architecture for server-side component based distributed applications written in Java.
  • 4. Contents of the EJB environment ➢ The EJB components are running inside the container of an EJB server. ➢ The container has the connection to the database or to other components. ➢ An EJB client can access the EJBs from the same Java Virtual Machine (JVM) or from another JVM over remote interfaces. The EJB home component is comparable to a factory for the EJB objects. The EJB objects retrieved from the home components can be also local or remote objects.
  • 5. Why EJB ? ➢Numerous Web sites are up and running using Java without any EJB technology. Developers have been using servlet/JSP models and managing transactions themselves using commit and rollback functionality that is built into JDBC without the help of application servers. ➢But when doing so, the application developers are confronted with many challenges. Some of the most important ones are managing concurrency, persistence and transactions. As a result, the developers have to either develop proprietary code or buy supporting frameworks.
  • 6. Why EJB ? ➢Above problems are solved by using enterprise beans. The use of enterprise beans allow developers to focus on the business logic and release them from coding infrastructure and middleware logic, and developers become more productive and efficient.
  • 7. Benefits of EJB ➢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.
  • 8. When to use EJB? Applications developed by using the EJB, deal with a variety of clients, simply by writing few lines of code, 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.
  • 9. EJB Roles Bean provider The bean provider is the developer of the code, and is responsible for converting the business requirements into actual physical code. He or she must provide the necessary classes that constitute an EJB, as well as providing the deployment file describing the runtime settings for the bean. The bean provider’s final product is an EJB JAR file. (Most of you guys/gals fall into this category ☺)
  • 10. EJB Roles Application assembler This may be the same as the bean provider, or a senior team lead. The application assembler’s responsibility is to package all the different EJB components, along with any other application components, the final product being an enterprise application EAR file. Deployer This person is responsible for deploying the EJB application on the target runtime environment. The deployer should be familiar with all aspects of the environment, including transaction and security support.
  • 11. EJB Roles Server provider The job of the server provider is to provide a runtime EJB server environment that is compliant with the EJB specification. IBM is a server provider of the WebSphere Application Server. Container provider The job of the container provider is to provide a runtime EJB container environment that is compliant with the EJB specification, and is generally the same as the server provider. The server and container cooperate to provide the quality-of- service runtime environment for the EJBs.
  • 12. EJB Roles Systems administrator The system administrator’s task is to ensure that the runtime environment is configured in such a way that the application can function correctly, and is integrated with all of the required external components.
  • 13. MAIN EJB FRAMEWORK COMPONENTS ❑EJB server Provides the actual primary services to all EJBs. An EJB server may host one or more EJB containers. It is also called generically an Enterprise Java Server (EJS). WebSphere Application Server is an EJS. ❑EJB container Provides the runtime environment for the enterprise bean instances, and is the intermediary between the EJB component and the server.
  • 14. MAIN EJB FRAMEWORK COMPONENTS ❑ EJB component These represent the actual EJBs themselves. There are three types of enterprise beans: entity, session, and message-driven beans. ❑EJB interfaces and EJB bean The interfaces for client access (EJB home and EJB object) and the EJB bean class.
  • 15. MAIN EJB FRAMEWORK COMPONENTS ❑EJB deployment descriptor The descriptor defines the runtime quality of service settings for the bean when it is deployed. Many of the settings of an EJB, such as the transactional settings, are defined in the deployment descriptor. The deployment descriptor is an external entity from the bean, and therefore decouples the bean component itself from the runtime characteristics. ❑EJB client A client that accesses EJBs.
  • 16. WE TALK MORE ON EJB COMPONENTS © 2009 IFS
  • 17. EJB COMPONENTS ❑The EJB components refer to the beans themselves, and include all the classes, interfaces, and constructs that make up the enterprise bean. ❑There are three types of enterprise beans: ➢Entity ➢Session ➢Message-driven ❑The rules for bean construction (which interfaces to use, classes to extend, and so forth) are governed by the type of bean, so a quick introduction to the types of enterprise beans is presented here.
  • 18. MAIN EJB FRAMEWORK COMPONENTS
  • 19. EJB TYPES ❑Entity Beans: Entity beans are modeled to represent business or domain- specific concepts, and are typically the nouns of your system, such as customers and accounts. They usually represent data (entities) stored in a database. ❑Session Beans: A session bean is modeled to represent a task or workflow of a system, and provide coordination of those activities between beans, such as a banking service, allowing for a transfer between accounts.
  • 20. EJB TYPES Session beans have two types: 1. Stateful Session Beans 2. Stateless Session Beans ❑Message-driven beans Like session beans, message-driven beans (MDB) may also be modeled to represent tasks. However, they are invoked by the receipt of asynchronous messages. The bean either listens for or subscribes to messages that it is to receive.
  • 21. SYNCHRONOUS VS ASYNCHRONOUS INVOCATION Entity and Session beans are accessed synchronously through a remote or local EJB interface method invocation. This is referred to as synchronous invocation, because there is a request, and a (blocking) wait for the return. Clients of EJBs invoke methods on session and entity beans. An EJB client may be an external construct like a servlet (remote) or another EJB within the same JVM (local).
  • 22. SYNCHRONOUS VS ASYNCHRONOUS INVOCATION The Message-driven bean is not accessible through a remote or local interface. The only way for an EJB client to communicate with a message-driven bean is by sending a JMS message. This is an example of asynchronous communication. The client does not invoke the method on the bean directly, but rather, uses JMS constructs to send a message. The container delegates the message to a suitable message-driven bean instance to handle the invocation.
  • 23. SPECIAL MENTION: All on-line material referred when preparing these slides. © 2009 IFS
  • 24. www.IFSWORLD.com THIS DOCUMENT MAY CONTAIN STATEMENTS OF POSSIBLE FUTURE FUNCTIONALITY FOR IFS’S SOFTWARE PRODUCTS AND TECHNOLOGY. SUCH STATEMENTS OF FUTURE FUNCTIONALITY ARE FOR INFORMATION PURPOSES ONLY AND SHOULD NOT BE INTERPRETED AS ANY COMMITMENT OR REPRESENTATION. IFS AND ALL IFS PRODUCT NAMES ARE TRADEMARKS OF IFS. THE NAMES OF ACTUAL COMPANIES AND PRODUCTS MENTIONED HEREIN MAY BE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS. © 2009 IFS