SlideShare une entreprise Scribd logo
1  sur  27
Enterprise Java Beans(EJB) With EJBs, you can develop building blocks ‘ejb components ’ – that u and someone else can assemble and reassemble into different applications. For example , you might create a customer bean that represents a customer in database. You can use that Customer bean in an accouting program, an e-commerce shopping cart and a tech support application. One beauty of EJBs is that you take code reuse to a whole new level, instead of just code it reuses whole functionality and allows you modify that way bean behaves at runtime with touching its java code. 06/17/10 JavaTruths by Vikram Singh
Enterprise Java Beans: What really EJBs gives you ,[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
How does it all works? ,[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
Type of Beans ,[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
Session Bean can be stateless or stateful  ,[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
FIVE THING YOU DO TO BUILD A BEAN ,[object Object],[object Object],[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
Write the Bean Class ,[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
AdviceGuy Bean ,[object Object],[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
BEAN CLASS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],You need this package These four methos are from SessionBean interface, so you have to put them here,for now worry about what these are for! You must have an ejbCreate() method. Its an ejb rule we’ll learn about later. But it doesn’t come from SessionBean interface. You must implemet one of three bean type interfaces: 06/17/10 JavaTruths by Vikram Singh
Write two interfaces for the Bean ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],It must extend either the EJBObject or EJBLocalObject. This is the actual business method. It MUST  correspond to a method in the bean class. 06/17/10 JavaTruths by Vikram Singh
Write two interfaces for the Bean ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],It must extend either the EJBObject or EJBLocalObject. This is the actual business method. It MUST  correspond to a method in the bean class. 06/17/10 JavaTruths by Vikram Singh
Home Interface ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The create() method must return your component interface type!! The home must extend either the EJBHome interface or EJBLocalHome  06/17/10 JavaTruths by Vikram Singh
Create an XML DD  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Specify home interface name Remote interface 06/17/10 JavaTruths by Vikram Singh
Put the Bean, the interface and the DD into ejb-jar file META-INF EJB-JAR.XML MYPACKAGE AdvcieBean.class AdviceHome.class Advice.class MYEJB.JAR ejb-jar.xml must be in a directory named META-INF 06/17/10 JavaTruths by Vikram Singh
Deploy the bean into the server,using the tools provided by the server vendor 06/17/10 JavaTruths by Vikram Singh
How to call a bean from Client Side? ,[object Object],[object Object],[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
The Client Code(AdviceClient.java) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Finally we get to the actual business methods. Lookup the AdviseBean using the JNDI name we gave during deployment. Initialcontext is our entrypoint into JNDI directory 06/17/10 JavaTruths by Vikram Singh
EJB ARCHITECTURE 06/17/10 JavaTruths by Vikram Singh
EJB uses RMI 06/17/10 JavaTruths by Vikram Singh
How EJB uses RMI 06/17/10 JavaTruths by Vikram Singh
EJB uses RMI ,[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
*** ,[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
*** ,[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
Tricky Questions  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],06/17/10 JavaTruths by Vikram Singh
How EJB really Works? 06/17/10 JavaTruths by Vikram Singh
How EJB really Works? 06/17/10 JavaTruths by Vikram Singh
How EJB really Works? 06/17/10 JavaTruths by Vikram Singh

Contenu connexe

Tendances

EJB 3.1 by Bert Ertman
EJB 3.1 by Bert ErtmanEJB 3.1 by Bert Ertman
EJB 3.1 by Bert Ertman
Stephan Janssen
 
Ejb - september 2006
Ejb  - september 2006Ejb  - september 2006
Ejb - september 2006
achraf_ing
 

Tendances (17)

Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJB
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business Logic
 
Skillwise EJB3.0 training
Skillwise EJB3.0 trainingSkillwise EJB3.0 training
Skillwise EJB3.0 training
 
Introduction to EJB
Introduction to EJBIntroduction to EJB
Introduction to EJB
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
 
Ejb3 Presentation
Ejb3 PresentationEjb3 Presentation
Ejb3 Presentation
 
EJB 3.1 by Bert Ertman
EJB 3.1 by Bert ErtmanEJB 3.1 by Bert Ertman
EJB 3.1 by Bert Ertman
 
EJB3 Advance Features
EJB3 Advance FeaturesEJB3 Advance Features
EJB3 Advance Features
 
EJB Interview Questions
EJB Interview QuestionsEJB Interview Questions
EJB Interview Questions
 
Java EE EJB Applications
Java EE EJB ApplicationsJava EE EJB Applications
Java EE EJB Applications
 
Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204
 
J2EE jsp_01
J2EE jsp_01J2EE jsp_01
J2EE jsp_01
 
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
 
Ejb - september 2006
Ejb  - september 2006Ejb  - september 2006
Ejb - september 2006
 
Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204
 
Spring
SpringSpring
Spring
 

Similaire à Enterprise java beans(ejb) update 2

Enterprise java beans(ejb)
Enterprise java beans(ejb)Enterprise java beans(ejb)
Enterprise java beans(ejb)
vikram singh
 
Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2
vikram singh
 
Session 3 Tp3
Session 3 Tp3Session 3 Tp3
Session 3 Tp3
phanleson
 
J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical Overview
Svetlin Nakov
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
Rajiv Gupta
 
Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patterns
Alassane Diallo
 
Session 4 Tp4
Session 4 Tp4Session 4 Tp4
Session 4 Tp4
phanleson
 

Similaire à Enterprise java beans(ejb) update 2 (20)

Enterprise java beans(ejb)
Enterprise java beans(ejb)Enterprise java beans(ejb)
Enterprise java beans(ejb)
 
Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2
 
J2EEFeb11 (1).ppt
J2EEFeb11 (1).pptJ2EEFeb11 (1).ppt
J2EEFeb11 (1).ppt
 
ADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.pptADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.ppt
 
J2EEFeb11.ppt
J2EEFeb11.pptJ2EEFeb11.ppt
J2EEFeb11.ppt
 
Session 3 Tp3
Session 3 Tp3Session 3 Tp3
Session 3 Tp3
 
Aravind vinnakota ejb_architecture
Aravind vinnakota ejb_architectureAravind vinnakota ejb_architecture
Aravind vinnakota ejb_architecture
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
Introcution to EJB
Introcution to EJBIntrocution to EJB
Introcution to EJB
 
Ejb notes
Ejb notesEjb notes
Ejb notes
 
J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical Overview
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 Notes
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
 
Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patterns
 
Lezione 03 Introduzione a react
Lezione 03   Introduzione a reactLezione 03   Introduzione a react
Lezione 03 Introduzione a react
 
Introduction to Java EE EJB Component
Introduction to Java EE EJB ComponentIntroduction to Java EE EJB Component
Introduction to Java EE EJB Component
 
Spring (1)
Spring (1)Spring (1)
Spring (1)
 
Session 4 Tp4
Session 4 Tp4Session 4 Tp4
Session 4 Tp4
 
EJB Part-1
EJB Part-1EJB Part-1
EJB Part-1
 

Plus de vikram singh (20)

Agile
AgileAgile
Agile
 
Web tech importants
Web tech importantsWeb tech importants
Web tech importants
 
Enterprise java beans(ejb)
Enterprise java beans(ejb)Enterprise java beans(ejb)
Enterprise java beans(ejb)
 
2 4 Tree
2 4 Tree2 4 Tree
2 4 Tree
 
23 Tree Best Part
23 Tree   Best Part23 Tree   Best Part
23 Tree Best Part
 
JSP Scope variable And Data Sharing
JSP Scope variable And Data SharingJSP Scope variable And Data Sharing
JSP Scope variable And Data Sharing
 
Bean Intro
Bean IntroBean Intro
Bean Intro
 
jdbc
jdbcjdbc
jdbc
 
Sax Dom Tutorial
Sax Dom TutorialSax Dom Tutorial
Sax Dom Tutorial
 
Xml
XmlXml
Xml
 
Dtd
DtdDtd
Dtd
 
Xml Schema
Xml SchemaXml Schema
Xml Schema
 
JSP
JSPJSP
JSP
 
Request dispatching in servlet
Request dispatching in servletRequest dispatching in servlet
Request dispatching in servlet
 
Servlet Part 2
Servlet Part 2Servlet Part 2
Servlet Part 2
 
Tutorial Solution
Tutorial SolutionTutorial Solution
Tutorial Solution
 
Java Script Language Tutorial
Java Script Language TutorialJava Script Language Tutorial
Java Script Language Tutorial
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1
 
Sample Report Format
Sample Report FormatSample Report Format
Sample Report Format
 
Javascript
JavascriptJavascript
Javascript
 

Dernier

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Dernier (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 

Enterprise java beans(ejb) update 2

  • 1. Enterprise Java Beans(EJB) With EJBs, you can develop building blocks ‘ejb components ’ – that u and someone else can assemble and reassemble into different applications. For example , you might create a customer bean that represents a customer in database. You can use that Customer bean in an accouting program, an e-commerce shopping cart and a tech support application. One beauty of EJBs is that you take code reuse to a whole new level, instead of just code it reuses whole functionality and allows you modify that way bean behaves at runtime with touching its java code. 06/17/10 JavaTruths by Vikram Singh
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Put the Bean, the interface and the DD into ejb-jar file META-INF EJB-JAR.XML MYPACKAGE AdvcieBean.class AdviceHome.class Advice.class MYEJB.JAR ejb-jar.xml must be in a directory named META-INF 06/17/10 JavaTruths by Vikram Singh
  • 15. Deploy the bean into the server,using the tools provided by the server vendor 06/17/10 JavaTruths by Vikram Singh
  • 16.
  • 17.
  • 18. EJB ARCHITECTURE 06/17/10 JavaTruths by Vikram Singh
  • 19. EJB uses RMI 06/17/10 JavaTruths by Vikram Singh
  • 20. How EJB uses RMI 06/17/10 JavaTruths by Vikram Singh
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. How EJB really Works? 06/17/10 JavaTruths by Vikram Singh
  • 26. How EJB really Works? 06/17/10 JavaTruths by Vikram Singh
  • 27. How EJB really Works? 06/17/10 JavaTruths by Vikram Singh

Notes de l'éditeur

  1. 06/17/10
  2. 06/17/10