SlideShare a Scribd company logo
1 of 80
Download to read offline
Module 07 - Enterprise JavaBeans
Danairat T.
Line ID: Danairat
FB: Danairat Thanabodithammachari
+668-1559-1446
JEE and Web Application Development
The Course Outline
Module 01 - Introduction to JEE
Module 02 - The JEE Containers
Module 03 - The Model-View-Controller Design Pattern
Module 04 - Java Servlets
Module 05 - Java Server Pages in MVC
Module 06 - JEE Web Application Deployment
Module 07 - Enterprise JavaBeans
Module 08 - JEE Enterprise Application Deployment
Enterprise JavaBeans
A server-side component that
encapsulates the business logic of
an application. The business logic
is the code that fulfills the purpose
of the application.
Enterprise beans simplify the development of
large, distributed applications. Developer can
concentrate on solving business problems.
EJB in Java EE Architecture
EJB as a Model in MVC
Servlet/
JSF
JSP/JSF
EJB
1. Request
5. Response
2. Access
3. Access
4. Forward
Web Container EJB Container
JEE Server
When to use EJB
• The application must be scalable. To accommodate a
growing number of users, you may need to distribute an
application’s components across multiple machines. Not
only can the enterprise beans of an application run on
different machines, but also their location will remain
transparent to the clients.
• Transactions must ensure data integrity. Enterprise beans
support transactions, the mechanisms that manage the
concurrent access of shared objects.
• The application will have a variety of clients. With only a
few lines of code, remote clients can easily locate
enterprise beans. These clients can be thin, various, and
numerous.
• Requiring of Individual Component Monitoring
• Standard Pluggable Security
EJB Type
Enterprise Bean Type Purpose
Session
Performs a task for a client; optionally
may implement a web service
Message-Driven
Acts as a listener for a particular
messaging type, such as the Java
Message Service API
EJB Stateless Life Cycle
EJB Stateful Life Cycle
EJB Message-Driven Bean Life Cycle
EJBs in Deployment File Structure
EJB JAR File
Hands-on Lab: Creating Basic EJB
Hands-on Lab: Creating Basic EJB
1. Click “New Application ” 2. Select “Java EE Web Application”, Click “OK”
Hands-on Lab: Creating Basic EJB
3. Enter Application Name 4. Click “Finish”
Hands-on Lab: Creating Basic EJB
5. Click “New ” from “Model” project 6. Select “Session Bean”, click “OK”
Hands-on Lab: Creating Basic EJB
7. Enter EJB Name, click “Next” 8. Click “Next”
Hands-on Lab: Creating Basic EJB
9. Click “Next” 10. Click “Finish”
Hands-on Lab: Creating Basic EJB
11. Click “New Method ” from “Enterprise JavaBeans EJB”
Hands-on Lab: Creating Basic EJB
12. Enter “Name”, click “OK” 13. You will see the new EJB method shown in the code
Hands-on Lab: Creating Basic EJB
14. Make change the code
Hands-on Lab: Creating Basic EJB
Creating EJB Client
15. Click “”New Simple Java Client from
the EnterpriseBean
16. Click “OK”
Hands-on Lab: Creating Basic EJB
Creating EJB Client
17. Make change to the code
Hands-on Lab: Creating Basic EJB
Start EJB Container
18. Click “Run” from the EnterpriseBeans
Hands-on Lab: Creating Basic EJB
Start EJB Container
19. See Container started
Hands-on Lab: Creating Basic EJB
Run the EJB Client
20. Click “Run” from the EJB Client
Hands-on Lab: Creating Basic EJB
Run the EJB Client
21. You will see the result from EJB in the message window.
Hands-on Lab: Creating EJB, Servlet
invokes remote EJB and local EJB
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating New Application
1. Click “New Application..” 2. Select “Java EE Web Application”, Click “OK”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
3. Enter Application Name 4. Click “Finish”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
5. Click “New” from “Model” project 6. Click “Session Bean”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
7. Click “Next” 8. Click “Next”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
9. Click “Next” 10. Click “Finish”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
11. Click “New Method ” from “Enterprise JavaDeans”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
12. Enter Beans method details 13. You will see the code
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
14. Make change to the code
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Adding Dependencies to ViewController project
15. Select “Project Properties” from ViewController 16. Click “Edit Dependencies”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Adding Dependencies to ViewController project
17. Check “Build Output” 18. Click “OK”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Remote EJB
19. Click “New” on ViewController” project 20. Click “HTTP Servlet”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Remote EJB
21. Enter Servlet Name 22. Click “OK”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Remote EJB
23. Click “Finish” 24. Review the import classes for the Servlet
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Remote EJB
25. Create method in Servlet to get InitialContext of remote EJB Container
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Remote EJB
26. Make change into the code
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Remote EJB
27. Click “Run” the servlet
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Remote EJB
28. The EJB result shown on the WebBrowser
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
29. Click “Open” on the “web.xml” 30. Click “New on Existing EJB” from the “EJB References”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
31. Click “OK” 32. Click “Save”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
33. Review the web.xml code
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
34. Click “New..” from “ViewController” 35. Select “HTTP Servlet”, click “OK”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
36. Enter Servlet Name 37. Click “Next”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
38. Click “Finish” 39. Review the import classes
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
40. Make change the code
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
41. Click “Run”
Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
Creating Servlet invoking Local EJB
42. You will see the EJB result on the Web Browser.
Hands-on Lab: Creating EJB,
DataSource, Data Object,
Servlets, HTTP Session,
RequestDispatcher and JSP
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating New Application
1. Click “New Application..” 2. Select “Java EE Web Application”, Click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating New Application
3. Enter Application Name 4. Click “Finish”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Configuring Project Dependencies
5. Select “Project Dependencies” from “ViewController” 6. Click “Edit Dependencies”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Configuring Project Dependencies
7. Check “Build Output” 8. Click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Configuring Project Dependencies
9. Finish configuring the project dependencies
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Configuring Data Object
10. Click “New” from the “Model” project 11. Select “Class”, click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Configuring Data Object
12. Enter information, click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Configuring Data Object
13. Complete the Data Object by adding set, get methods for the variables
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating EJB invoking DataSource
14. Click “New from “Model” project 15. Select “Session Bean”. Click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating EJB invoking DataSource
16. Enter EJB Name 17. Click “Next”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating EJB invoking DataSource
18. Click “Next” 19. Click “Finish”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating EJB invoking DataSource
20 Review Import classes for EJB
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating EJB invoking DataSource
21. Create method for get database connection from the Application Server Pool
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating EJB invoking DataSource
22. Make change to the code
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating Servlet Controller
23. Clicl “New..” from “ViewController” 24. Select “HTTP Servler”, click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating Servlet Controller
25. Click “New..” from “ViewController” 26. Click “Next”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating Servlet Controller
17. Review import classes
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating Servlet Controller
18. Create method in Servlet to invoke EJB
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating Servlet Controller
19. Make change into the code
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating JSP Form
20. Click “New” from “ViewController” 21. Select “JSP”, click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating JSP Form
22. Enter JSP Name
23. Make change into the code, click “Save”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating Result JSP
24. Enter JSP Name 25. Select “JSP”, click “OK”
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Creating Result JSP
26. Enter JSP Name 27. Make change JSP code
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Testing
28. Click “Run” on JSP Form “index.jsp” 29. See the server started
Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP
Session, RequestDispatcher and JSP
Testing
30. Enter “M” or others into the form, click “Search” 31. Search result shown on the Web Browser
Danairat T.
Line ID: Danairat
FB: Danairat Thanabodithammachari
+668-1559-1446
Thank you

More Related Content

What's hot

Glassfish JEE Server Administration - JEE Introduction
Glassfish JEE Server Administration - JEE IntroductionGlassfish JEE Server Administration - JEE Introduction
Glassfish JEE Server Administration - JEE IntroductionDanairat Thanabodithammachari
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpodilodif
 
Java - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionJava - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionMazenetsolution
 
1 java servlets and jsp
1   java servlets and jsp1   java servlets and jsp
1 java servlets and jspAnkit Minocha
 
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
( 16 ) Office 2007   Create An Extranet Site With Forms Authentication( 16 ) Office 2007   Create An Extranet Site With Forms Authentication
( 16 ) Office 2007 Create An Extranet Site With Forms AuthenticationLiquidHub
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questionsAkhil Mittal
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technologyTanmoy Barman
 
Lecture 3: Servlets - Session Management
Lecture 3:  Servlets - Session ManagementLecture 3:  Servlets - Session Management
Lecture 3: Servlets - Session ManagementFahad Golra
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
Java EE 01-Servlets and Containers
Java EE 01-Servlets and ContainersJava EE 01-Servlets and Containers
Java EE 01-Servlets and ContainersFernando Gil
 
Servlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servletsServlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servletsJavaEE Trainers
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsKaml Sah
 

What's hot (20)

Glassfish JEE Server Administration - JEE Introduction
Glassfish JEE Server Administration - JEE IntroductionGlassfish JEE Server Administration - JEE Introduction
Glassfish JEE Server Administration - JEE Introduction
 
JEE Programming - 03 Model View Controller
JEE Programming - 03 Model View ControllerJEE Programming - 03 Model View Controller
JEE Programming - 03 Model View Controller
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtp
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Java - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionJava - Servlet - Mazenet Solution
Java - Servlet - Mazenet Solution
 
Asp.Net MVC Intro
Asp.Net MVC IntroAsp.Net MVC Intro
Asp.Net MVC Intro
 
1 java servlets and jsp
1   java servlets and jsp1   java servlets and jsp
1 java servlets and jsp
 
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
( 16 ) Office 2007   Create An Extranet Site With Forms Authentication( 16 ) Office 2007   Create An Extranet Site With Forms Authentication
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
Lecture 3: Servlets - Session Management
Lecture 3:  Servlets - Session ManagementLecture 3:  Servlets - Session Management
Lecture 3: Servlets - Session Management
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
Keyword driven testing in qtp
Keyword driven testing in qtpKeyword driven testing in qtp
Keyword driven testing in qtp
 
JSP Error handling
JSP Error handlingJSP Error handling
JSP Error handling
 
Java EE 01-Servlets and Containers
Java EE 01-Servlets and ContainersJava EE 01-Servlets and Containers
Java EE 01-Servlets and Containers
 
Servlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servletsServlet/JSP course chapter 1: Introduction to servlets
Servlet/JSP course chapter 1: Introduction to servlets
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - Components
 

Viewers also liked

Java EE Programming [EJB 3.0 and JPA] Using Eclipse and JBoss
Java EE Programming [EJB 3.0 and JPA] Using  Eclipse and JBossJava EE Programming [EJB 3.0 and JPA] Using  Eclipse and JBoss
Java EE Programming [EJB 3.0 and JPA] Using Eclipse and JBossIMC Institute
 
Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...
Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...
Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...Sachintha Gunasena
 
Java build tool_comparison
Java build tool_comparisonJava build tool_comparison
Java build tool_comparisonManav Prasad
 
Java Build Tool course in 2011
Java Build Tool course in 2011Java Build Tool course in 2011
Java Build Tool course in 2011Ching Yi Chan
 
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツールEnpel
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and AntDavid Noble
 
Email Security Threats: IT Manager's Eyes Only
Email Security Threats: IT Manager's Eyes Only Email Security Threats: IT Manager's Eyes Only
Email Security Threats: IT Manager's Eyes Only Topsec Technology
 
The Business value of agile development
The Business value of agile developmentThe Business value of agile development
The Business value of agile developmentPhavadol Srisarnsakul
 
IBM Cognos Analytics: Empowering business by infusing intelligence across the...
IBM Cognos Analytics: Empowering business by infusing intelligence across the...IBM Cognos Analytics: Empowering business by infusing intelligence across the...
IBM Cognos Analytics: Empowering business by infusing intelligence across the...IBM Analytics
 
Perl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File ProcessingPerl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File ProcessingDanairat Thanabodithammachari
 
A Guide to IT Consulting- Business.com
A Guide to IT Consulting- Business.comA Guide to IT Consulting- Business.com
A Guide to IT Consulting- Business.comBusiness.com
 
Strategic IT Consulting
Strategic IT ConsultingStrategic IT Consulting
Strategic IT Consultingrprasad
 

Viewers also liked (20)

JEE Programming - 01 Introduction
JEE Programming - 01 IntroductionJEE Programming - 01 Introduction
JEE Programming - 01 Introduction
 
Java EE Programming [EJB 3.0 and JPA] Using Eclipse and JBoss
Java EE Programming [EJB 3.0 and JPA] Using  Eclipse and JBossJava EE Programming [EJB 3.0 and JPA] Using  Eclipse and JBoss
Java EE Programming [EJB 3.0 and JPA] Using Eclipse and JBoss
 
Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...
Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...
Concurrency Programming in Java - 07 - High-level Concurrency objects, Lock O...
 
Tomcat tutorail
Tomcat tutorailTomcat tutorail
Tomcat tutorail
 
Java build tool_comparison
Java build tool_comparisonJava build tool_comparison
Java build tool_comparison
 
Releasing Projects Using Maven
Releasing Projects Using MavenReleasing Projects Using Maven
Releasing Projects Using Maven
 
Building java projects with maven
Building java projects with mavenBuilding java projects with maven
Building java projects with maven
 
Java Build Tool course in 2011
Java Build Tool course in 2011Java Build Tool course in 2011
Java Build Tool course in 2011
 
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
 
Java Programming - 07 java networking
Java Programming - 07 java networkingJava Programming - 07 java networking
Java Programming - 07 java networking
 
Manen Ant SVN
Manen Ant SVNManen Ant SVN
Manen Ant SVN
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
Email Security Threats: IT Manager's Eyes Only
Email Security Threats: IT Manager's Eyes Only Email Security Threats: IT Manager's Eyes Only
Email Security Threats: IT Manager's Eyes Only
 
Jboss Tutorial Basics
Jboss Tutorial BasicsJboss Tutorial Basics
Jboss Tutorial Basics
 
The Business value of agile development
The Business value of agile developmentThe Business value of agile development
The Business value of agile development
 
IBM Cognos Analytics: Empowering business by infusing intelligence across the...
IBM Cognos Analytics: Empowering business by infusing intelligence across the...IBM Cognos Analytics: Empowering business by infusing intelligence across the...
IBM Cognos Analytics: Empowering business by infusing intelligence across the...
 
Perl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File ProcessingPerl for System Automation - 01 Advanced File Processing
Perl for System Automation - 01 Advanced File Processing
 
A Guide to IT Consulting- Business.com
A Guide to IT Consulting- Business.comA Guide to IT Consulting- Business.com
A Guide to IT Consulting- Business.com
 
The Face of the New Enterprise
The Face of the New EnterpriseThe Face of the New Enterprise
The Face of the New Enterprise
 
Strategic IT Consulting
Strategic IT ConsultingStrategic IT Consulting
Strategic IT Consulting
 

Similar to JEE Programming - 07 EJB Programming

EJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLinkEJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLinkBill Lyons
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Enterprise Java Beans( E)
Enterprise  Java  Beans( E)Enterprise  Java  Beans( E)
Enterprise Java Beans( E)vikram singh
 
Introduction to Java EE EJB Component
Introduction to Java EE EJB ComponentIntroduction to Java EE EJB Component
Introduction to Java EE EJB ComponentGanesh P
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Againjonknapp
 
0012
00120012
0012none
 
Java script unit testing
Java script unit testingJava script unit testing
Java script unit testingMats Bryntse
 
Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2vikram singh
 
Enterprise java beans(ejb) update 2
Enterprise java beans(ejb) update 2Enterprise java beans(ejb) update 2
Enterprise java beans(ejb) update 2vikram singh
 
Enterprise java beans(ejb)
Enterprise java beans(ejb)Enterprise java beans(ejb)
Enterprise java beans(ejb)vikram singh
 
9. .net applications using command line compiler and visual studio .net ide
9. .net applications using command line compiler and visual studio .net ide9. .net applications using command line compiler and visual studio .net ide
9. .net applications using command line compiler and visual studio .net idePramod Rathore
 
Online grocery store
Online grocery storeOnline grocery store
Online grocery storeKavita Sharma
 
Free EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsFree EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsVirtual Nuggets
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance JavaVikas Goyal
 

Similar to JEE Programming - 07 EJB Programming (20)

AWValuePitch, 7_12
AWValuePitch, 7_12AWValuePitch, 7_12
AWValuePitch, 7_12
 
EJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLinkEJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLink
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)
 
Enterprise Java Beans( E)
Enterprise  Java  Beans( E)Enterprise  Java  Beans( E)
Enterprise Java Beans( E)
 
Introduction to Java EE EJB Component
Introduction to Java EE EJB ComponentIntroduction to Java EE EJB Component
Introduction to Java EE EJB Component
 
Jsf2 overview
Jsf2 overviewJsf2 overview
Jsf2 overview
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
 
0012
00120012
0012
 
Java script unit testing
Java script unit testingJava script unit testing
Java script unit testing
 
Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2
 
Enterprise java beans(ejb) update 2
Enterprise java beans(ejb) update 2Enterprise java beans(ejb) update 2
Enterprise java beans(ejb) update 2
 
Enterprise java beans(ejb)
Enterprise java beans(ejb)Enterprise java beans(ejb)
Enterprise java beans(ejb)
 
9. .net applications using command line compiler and visual studio .net ide
9. .net applications using command line compiler and visual studio .net ide9. .net applications using command line compiler and visual studio .net ide
9. .net applications using command line compiler and visual studio .net ide
 
Online grocery store
Online grocery storeOnline grocery store
Online grocery store
 
Jsp chapter 1
Jsp chapter 1Jsp chapter 1
Jsp chapter 1
 
Mvc15 (1)
Mvc15 (1)Mvc15 (1)
Mvc15 (1)
 
Free EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsFree EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggets
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance Java
 
10 jsp-scripting-elements
10 jsp-scripting-elements10 jsp-scripting-elements
10 jsp-scripting-elements
 

More from Danairat Thanabodithammachari

Thailand State Enterprise - Business Architecture and SE-AM
Thailand State Enterprise - Business Architecture and SE-AMThailand State Enterprise - Business Architecture and SE-AM
Thailand State Enterprise - Business Architecture and SE-AMDanairat Thanabodithammachari
 
Agile Organization and Enterprise Architecture v1129 Danairat
Agile Organization and Enterprise Architecture v1129 DanairatAgile Organization and Enterprise Architecture v1129 Danairat
Agile Organization and Enterprise Architecture v1129 DanairatDanairat Thanabodithammachari
 
Enterprise Architecture and Agile Organization Management v1076 Danairat
Enterprise Architecture and Agile Organization Management v1076 DanairatEnterprise Architecture and Agile Organization Management v1076 Danairat
Enterprise Architecture and Agile Organization Management v1076 DanairatDanairat Thanabodithammachari
 
Digital Transformation, Enterprise Architecture, Big Data by Danairat
Digital Transformation, Enterprise Architecture, Big Data by DanairatDigital Transformation, Enterprise Architecture, Big Data by Danairat
Digital Transformation, Enterprise Architecture, Big Data by DanairatDanairat Thanabodithammachari
 
Big data Hadoop Analytic and Data warehouse comparison guide
Big data Hadoop Analytic and Data warehouse comparison guideBig data Hadoop Analytic and Data warehouse comparison guide
Big data Hadoop Analytic and Data warehouse comparison guideDanairat Thanabodithammachari
 
Big data hadooop analytic and data warehouse comparison guide
Big data hadooop analytic and data warehouse comparison guideBig data hadooop analytic and data warehouse comparison guide
Big data hadooop analytic and data warehouse comparison guideDanairat Thanabodithammachari
 

More from Danairat Thanabodithammachari (17)

Thailand State Enterprise - Business Architecture and SE-AM
Thailand State Enterprise - Business Architecture and SE-AMThailand State Enterprise - Business Architecture and SE-AM
Thailand State Enterprise - Business Architecture and SE-AM
 
Agile Management
Agile ManagementAgile Management
Agile Management
 
Agile Organization and Enterprise Architecture v1129 Danairat
Agile Organization and Enterprise Architecture v1129 DanairatAgile Organization and Enterprise Architecture v1129 Danairat
Agile Organization and Enterprise Architecture v1129 Danairat
 
Blockchain for Management
Blockchain for ManagementBlockchain for Management
Blockchain for Management
 
Enterprise Architecture and Agile Organization Management v1076 Danairat
Enterprise Architecture and Agile Organization Management v1076 DanairatEnterprise Architecture and Agile Organization Management v1076 Danairat
Enterprise Architecture and Agile Organization Management v1076 Danairat
 
Agile Enterprise Architecture - Danairat
Agile Enterprise Architecture - DanairatAgile Enterprise Architecture - Danairat
Agile Enterprise Architecture - Danairat
 
Digital Transformation, Enterprise Architecture, Big Data by Danairat
Digital Transformation, Enterprise Architecture, Big Data by DanairatDigital Transformation, Enterprise Architecture, Big Data by Danairat
Digital Transformation, Enterprise Architecture, Big Data by Danairat
 
Big data Hadoop Analytic and Data warehouse comparison guide
Big data Hadoop Analytic and Data warehouse comparison guideBig data Hadoop Analytic and Data warehouse comparison guide
Big data Hadoop Analytic and Data warehouse comparison guide
 
Big data hadooop analytic and data warehouse comparison guide
Big data hadooop analytic and data warehouse comparison guideBig data hadooop analytic and data warehouse comparison guide
Big data hadooop analytic and data warehouse comparison guide
 
Perl Programming - 04 Programming Database
Perl Programming - 04 Programming DatabasePerl Programming - 04 Programming Database
Perl Programming - 04 Programming Database
 
Perl Programming - 03 Programming File
Perl Programming - 03 Programming FilePerl Programming - 03 Programming File
Perl Programming - 03 Programming File
 
Perl Programming - 02 Regular Expression
Perl Programming - 02 Regular ExpressionPerl Programming - 02 Regular Expression
Perl Programming - 02 Regular Expression
 
Perl Programming - 01 Basic Perl
Perl Programming - 01 Basic PerlPerl Programming - 01 Basic Perl
Perl Programming - 01 Basic Perl
 
Setting up Hadoop YARN Clustering
Setting up Hadoop YARN ClusteringSetting up Hadoop YARN Clustering
Setting up Hadoop YARN Clustering
 
Java Programming - 08 java threading
Java Programming - 08 java threadingJava Programming - 08 java threading
Java Programming - 08 java threading
 
Java Programming - 06 java file io
Java Programming - 06 java file ioJava Programming - 06 java file io
Java Programming - 06 java file io
 
Java Programming - 05 access control in java
Java Programming - 05 access control in javaJava Programming - 05 access control in java
Java Programming - 05 access control in java
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

JEE Programming - 07 EJB Programming

  • 1. Module 07 - Enterprise JavaBeans Danairat T. Line ID: Danairat FB: Danairat Thanabodithammachari +668-1559-1446
  • 2. JEE and Web Application Development The Course Outline Module 01 - Introduction to JEE Module 02 - The JEE Containers Module 03 - The Model-View-Controller Design Pattern Module 04 - Java Servlets Module 05 - Java Server Pages in MVC Module 06 - JEE Web Application Deployment Module 07 - Enterprise JavaBeans Module 08 - JEE Enterprise Application Deployment
  • 3. Enterprise JavaBeans A server-side component that encapsulates the business logic of an application. The business logic is the code that fulfills the purpose of the application. Enterprise beans simplify the development of large, distributed applications. Developer can concentrate on solving business problems.
  • 4. EJB in Java EE Architecture
  • 5. EJB as a Model in MVC Servlet/ JSF JSP/JSF EJB 1. Request 5. Response 2. Access 3. Access 4. Forward Web Container EJB Container JEE Server
  • 6. When to use EJB • The application must be scalable. To accommodate a growing number of users, you may need to distribute an application’s components across multiple machines. Not only can the enterprise beans of an application run on different machines, but also their location will remain transparent to the clients. • Transactions must ensure data integrity. Enterprise beans support transactions, the mechanisms that manage the concurrent access of shared objects. • The application will have a variety of clients. With only a few lines of code, remote clients can easily locate enterprise beans. These clients can be thin, various, and numerous. • Requiring of Individual Component Monitoring • Standard Pluggable Security
  • 7. EJB Type Enterprise Bean Type Purpose Session Performs a task for a client; optionally may implement a web service Message-Driven Acts as a listener for a particular messaging type, such as the Java Message Service API
  • 11. EJBs in Deployment File Structure EJB JAR File
  • 13. Hands-on Lab: Creating Basic EJB 1. Click “New Application ” 2. Select “Java EE Web Application”, Click “OK”
  • 14. Hands-on Lab: Creating Basic EJB 3. Enter Application Name 4. Click “Finish”
  • 15. Hands-on Lab: Creating Basic EJB 5. Click “New ” from “Model” project 6. Select “Session Bean”, click “OK”
  • 16. Hands-on Lab: Creating Basic EJB 7. Enter EJB Name, click “Next” 8. Click “Next”
  • 17. Hands-on Lab: Creating Basic EJB 9. Click “Next” 10. Click “Finish”
  • 18. Hands-on Lab: Creating Basic EJB 11. Click “New Method ” from “Enterprise JavaBeans EJB”
  • 19. Hands-on Lab: Creating Basic EJB 12. Enter “Name”, click “OK” 13. You will see the new EJB method shown in the code
  • 20. Hands-on Lab: Creating Basic EJB 14. Make change the code
  • 21. Hands-on Lab: Creating Basic EJB Creating EJB Client 15. Click “”New Simple Java Client from the EnterpriseBean 16. Click “OK”
  • 22. Hands-on Lab: Creating Basic EJB Creating EJB Client 17. Make change to the code
  • 23. Hands-on Lab: Creating Basic EJB Start EJB Container 18. Click “Run” from the EnterpriseBeans
  • 24. Hands-on Lab: Creating Basic EJB Start EJB Container 19. See Container started
  • 25. Hands-on Lab: Creating Basic EJB Run the EJB Client 20. Click “Run” from the EJB Client
  • 26. Hands-on Lab: Creating Basic EJB Run the EJB Client 21. You will see the result from EJB in the message window.
  • 27. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB
  • 28. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating New Application 1. Click “New Application..” 2. Select “Java EE Web Application”, Click “OK”
  • 29. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB 3. Enter Application Name 4. Click “Finish”
  • 30. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB 5. Click “New” from “Model” project 6. Click “Session Bean”
  • 31. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB 7. Click “Next” 8. Click “Next”
  • 32. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB 9. Click “Next” 10. Click “Finish”
  • 33. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB 11. Click “New Method ” from “Enterprise JavaDeans”
  • 34. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB 12. Enter Beans method details 13. You will see the code
  • 35. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB 14. Make change to the code
  • 36. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Adding Dependencies to ViewController project 15. Select “Project Properties” from ViewController 16. Click “Edit Dependencies”
  • 37. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Adding Dependencies to ViewController project 17. Check “Build Output” 18. Click “OK”
  • 38. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Remote EJB 19. Click “New” on ViewController” project 20. Click “HTTP Servlet”
  • 39. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Remote EJB 21. Enter Servlet Name 22. Click “OK”
  • 40. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Remote EJB 23. Click “Finish” 24. Review the import classes for the Servlet
  • 41. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Remote EJB 25. Create method in Servlet to get InitialContext of remote EJB Container
  • 42. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Remote EJB 26. Make change into the code
  • 43. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Remote EJB 27. Click “Run” the servlet
  • 44. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Remote EJB 28. The EJB result shown on the WebBrowser
  • 45. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 29. Click “Open” on the “web.xml” 30. Click “New on Existing EJB” from the “EJB References”
  • 46. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 31. Click “OK” 32. Click “Save”
  • 47. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 33. Review the web.xml code
  • 48. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 34. Click “New..” from “ViewController” 35. Select “HTTP Servlet”, click “OK”
  • 49. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 36. Enter Servlet Name 37. Click “Next”
  • 50. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 38. Click “Finish” 39. Review the import classes
  • 51. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 40. Make change the code
  • 52. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 41. Click “Run”
  • 53. Hands-on Lab: Creating EJB, Servlet invokes remote EJB and local EJB Creating Servlet invoking Local EJB 42. You will see the EJB result on the Web Browser.
  • 54. Hands-on Lab: Creating EJB, DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP
  • 55. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating New Application 1. Click “New Application..” 2. Select “Java EE Web Application”, Click “OK”
  • 56. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating New Application 3. Enter Application Name 4. Click “Finish”
  • 57. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Configuring Project Dependencies 5. Select “Project Dependencies” from “ViewController” 6. Click “Edit Dependencies”
  • 58. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Configuring Project Dependencies 7. Check “Build Output” 8. Click “OK”
  • 59. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Configuring Project Dependencies 9. Finish configuring the project dependencies
  • 60. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Configuring Data Object 10. Click “New” from the “Model” project 11. Select “Class”, click “OK”
  • 61. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Configuring Data Object 12. Enter information, click “OK”
  • 62. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Configuring Data Object 13. Complete the Data Object by adding set, get methods for the variables
  • 63. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating EJB invoking DataSource 14. Click “New from “Model” project 15. Select “Session Bean”. Click “OK”
  • 64. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating EJB invoking DataSource 16. Enter EJB Name 17. Click “Next”
  • 65. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating EJB invoking DataSource 18. Click “Next” 19. Click “Finish”
  • 66. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating EJB invoking DataSource 20 Review Import classes for EJB
  • 67. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating EJB invoking DataSource 21. Create method for get database connection from the Application Server Pool
  • 68. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating EJB invoking DataSource 22. Make change to the code
  • 69. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating Servlet Controller 23. Clicl “New..” from “ViewController” 24. Select “HTTP Servler”, click “OK”
  • 70. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating Servlet Controller 25. Click “New..” from “ViewController” 26. Click “Next”
  • 71. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating Servlet Controller 17. Review import classes
  • 72. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating Servlet Controller 18. Create method in Servlet to invoke EJB
  • 73. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating Servlet Controller 19. Make change into the code
  • 74. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating JSP Form 20. Click “New” from “ViewController” 21. Select “JSP”, click “OK”
  • 75. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating JSP Form 22. Enter JSP Name 23. Make change into the code, click “Save”
  • 76. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating Result JSP 24. Enter JSP Name 25. Select “JSP”, click “OK”
  • 77. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Creating Result JSP 26. Enter JSP Name 27. Make change JSP code
  • 78. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Testing 28. Click “Run” on JSP Form “index.jsp” 29. See the server started
  • 79. Hands-on Lab: Creating EJB DataSource, Data Object, Servlets, HTTP Session, RequestDispatcher and JSP Testing 30. Enter “M” or others into the form, click “Search” 31. Search result shown on the Web Browser
  • 80. Danairat T. Line ID: Danairat FB: Danairat Thanabodithammachari +668-1559-1446 Thank you