SlideShare ist ein Scribd-Unternehmen logo
1 von 29
J2EE WEB-SERVICES
BY PRAFULL JAIN
2016BCEX1056
SEC-B , VIITH SEM
LIST OF CONTENTS:-
1. Application servers
2. What is J2EE?
3. Main Technologies
4. Application Scenarios
5. J2EE APIs and Services
6. EJB – a closer look
APPLICATION SERVERS
• In the beginning
Centralized, non-distributed
terminals
mainframe
terminals
3
In the 90’s, systems should be
client- server
APPLICATION SERVERS
4
Today, enterprise applications use the multi-tier model
“Multi-tier applications” have several independent components.
An application server provides the infrastructure and services to run such applications
Application server products can be separated into 3 categories:
 J2EE-based solutions
 Non-J2EE solutions (PHP, ColdFusion, Perl, etc.)
 And the Microsoft solution (ASP/COM and now .NET with ASP.NET, VB.NET,
C#,
etc.)
WHAT IS J2EE?
 It is a public specification that embodies several
technologies
 Current version is 1.5
 J2EE defines a model for developing multi-tier, web based,
enterprise applications with distributed components
J2EE BENEFITS
 High availability
 Scalability
 Integration with existing systems
 Freedom to choose vendors of application servers, tools, components
 Multi-platform
J2EE BENEFITS
 Flexibility of scenarios and support to several types of clients
 Programming productivity:
Services allow developer to focus on business.
Component development facilitates maintenance and reuse
Enables deploy-time behaviors Supports division of labor
MAIN TECHNOLOGIES
 JavaServer Pages (JSP)
 Servlet
 Enterprise JavaBeans (EJB)
JSPs, servlets and EJBs are application components.
JSP
 Used for web pages with dynamic content
 Processes HTTP requests (non-blocking call-and-return)
 Accepts HTML tags, special JSP tags, and scriptlets of Java code
 Separates static content from presentation logic
 Can be created by web designer using HTML tools
SERVLET
 Used for web pages with dynamic content
 Processes HTTP requests (non-blocking call- and-return)
 Written in Java; uses print statements to render HTML
 Loaded into memory once and then called many times
 Provides APIs for session management
EJB
 EJBs are distributed components used to implement business logic
(no UI)
 Developer concentrates on business logic
 Availability, scalability, security, interoperability and integrability
handled by the J2EE server
 Client of EJBs can be JSPs, servlets, other EJBs and external
aplications
Copyright 2002 © Paulo Merson
J2EE MULTI-TIER MODEL
J2EE Application Scenarios
 Multi-tier typicalapplication
J2EE Application Scenarios
 Stand-aloneclient
J2EE Application Scenarios
 Web-centricapplication
J2EE SERVICES AND APIS
 Java Message Service (JMS)
 Implicit invocation
 Communication is loosely coupled, reliable and asynchronous
 Supports 2 models:
 point-to-point
 publish/subscribe
JMS
 Point-to-point
 Destination is “queue”
JMS
 Publish-subscribe
 Destination is “topic”
J2EE SERVICES AND APIS
 JNDI - Naming and directory services
 Applications use JNDI to locate objects, such as environment
entries, EJBs, datasources, message queues
 JNDI is implementation independent
 Underlying implementation varies: LDAP, DNS, DBMS, etc.
 Transaction service:
 Controls transactions automatically
 You can limit the transactions explicitly
 Or you can specify relationships between methods that make up a
single transaction
J2EE SERVICES AND APIS
 Security




Java Authentication and Authorization Service (JAAS) is the new (J2EE 1.3)
standard for J2EE security
Authentication via userid/password or digital certificates
Role-based authorization limits access of users to resources (URLs, EJB methods)
Embedded security realm
 J2EE Connector Architecture
 Integration to non-J2EE systems, such as mainframes and ERPs.
 Standard API to access different EIS (GlassFish Server)
 Vendors implement EIS-specific resource adapters
J2EE SERVICES AND APIS
 JDBC
 JavaMail
 Java API for XML Parsing (JAXP)
 Web services APIs
EJB – A CLOSER LOOK
HOME INTERFACE
 Methods to create, remove or locate EJB objects
 The home interface implementation is the home object
(generated)
 The home object is a factory
REMOTE INTERFACE
 Business methods available to clients
 The remote interface implementation is the EJB object
(generated)
 The EJB object acts as a proxy to the EJB instance
Copyright 2002 © Paulo Merson 34
EJB – THE BIG PICTURE
EJB AT RUNTIME
TYPES OF EJB
StateFul
Statless
SessionBean Entity Bean Message Driven
Bean
BMP
CMP
Enterprise Bean
SESSION BEAN
 Stateful session bean:
 Retains conversational state (data) on behalf of an individual
client
 If state changed during this invocation, the same state will be
available upon the following invocation
 Example: shopping cart
 Stateless session bean:
 Contains no user-specific data
 Business process that provides a generic service
 Container can pool stateless beans
 Example: shopping catalog
ENTITY BEAN
 Represents business data stored in a database  persistent
object
 Underlying data is normally one row of a table
 A primary key uniquely identifies each bean instance
 Allows shared access from multiple clients
 Can live past the duration of client’s session
 Example: shopping order
 Bean-managed persistence (BMP): bean developer writes JDBC code
to access the database; allows better control for the developer
 Container-managed persistence (CMP): container generates all JDBC
code to access the database; developer has less code to write, but also
less control
MESSAGE-DRIVEN BEAN
 Message consumer for a JMS queue or topic
 Benefits from EJB container services that are not available
to standard JMS consumers
 Has no home or remote interface
 Example: order processing – stock info
SOURCES & RESOURCES
 The J2EE Tutorial. Sun Microsystems
 www.java.sun.com/j2ee
 www.theserverside.com
 www.Wikipedia.com/j2ee
 www.javatpoint.com
QUESTIONS
THANK YOU!

Weitere ähnliche Inhalte

Was ist angesagt?

NoSQL databases and managing big data
NoSQL databases and managing big dataNoSQL databases and managing big data
NoSQL databases and managing big dataSteven Francia
 
Hadoop Overview & Architecture
Hadoop Overview & Architecture  Hadoop Overview & Architecture
Hadoop Overview & Architecture EMC
 
Application server
Application serverApplication server
Application servernava rathna
 
Storage Area Network (San)
Storage Area Network (San)Storage Area Network (San)
Storage Area Network (San)sankcomp
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBLee Theobald
 
Network Attached Storage (NAS)
Network Attached Storage (NAS)Network Attached Storage (NAS)
Network Attached Storage (NAS)sandeepgodfather
 
Cloud Application architecture styles
Cloud Application architecture styles Cloud Application architecture styles
Cloud Application architecture styles Nilay Shrivastava
 
Service Oriented Computing
Service Oriented ComputingService Oriented Computing
Service Oriented ComputingAie Sa
 
Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)Biniam Asnake
 
Challenges in Cloud Computing – VM Migration
Challenges in Cloud Computing – VM MigrationChallenges in Cloud Computing – VM Migration
Challenges in Cloud Computing – VM MigrationSarmad Makhdoom
 
Cloud platforms - Cloud Computing
Cloud platforms - Cloud ComputingCloud platforms - Cloud Computing
Cloud platforms - Cloud ComputingAditi Rai
 

Was ist angesagt? (20)

NoSQL databases and managing big data
NoSQL databases and managing big dataNoSQL databases and managing big data
NoSQL databases and managing big data
 
Hadoop Overview & Architecture
Hadoop Overview & Architecture  Hadoop Overview & Architecture
Hadoop Overview & Architecture
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Data integration
Data integrationData integration
Data integration
 
Application server
Application serverApplication server
Application server
 
Storage Area Network (San)
Storage Area Network (San)Storage Area Network (San)
Storage Area Network (San)
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
Parallel Database
Parallel DatabaseParallel Database
Parallel Database
 
Network Attached Storage (NAS)
Network Attached Storage (NAS)Network Attached Storage (NAS)
Network Attached Storage (NAS)
 
APACHE SPARK.pptx
APACHE SPARK.pptxAPACHE SPARK.pptx
APACHE SPARK.pptx
 
Cloud Application architecture styles
Cloud Application architecture styles Cloud Application architecture styles
Cloud Application architecture styles
 
Nosql data models
Nosql data modelsNosql data models
Nosql data models
 
Squid server
Squid serverSquid server
Squid server
 
Data streaming fundamentals
Data streaming fundamentalsData streaming fundamentals
Data streaming fundamentals
 
Service Oriented Computing
Service Oriented ComputingService Oriented Computing
Service Oriented Computing
 
Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)
 
Virtualization- Cloud Computing
Virtualization- Cloud ComputingVirtualization- Cloud Computing
Virtualization- Cloud Computing
 
Challenges in Cloud Computing – VM Migration
Challenges in Cloud Computing – VM MigrationChallenges in Cloud Computing – VM Migration
Challenges in Cloud Computing – VM Migration
 
Cloud platforms - Cloud Computing
Cloud platforms - Cloud ComputingCloud platforms - Cloud Computing
Cloud platforms - Cloud Computing
 

Ähnlich wie J2ee web services(overview)

Ähnlich wie J2ee web services(overview) (20)

J2ee
J2eeJ2ee
J2ee
 
Ejb notes
Ejb notesEjb notes
Ejb notes
 
J2EE.ppt
J2EE.pptJ2EE.ppt
J2EE.ppt
 
Java J2EE
Java J2EEJava J2EE
Java J2EE
 
Unite5-EJB-2019.ppt
Unite5-EJB-2019.pptUnite5-EJB-2019.ppt
Unite5-EJB-2019.ppt
 
J2 EEE SIDES
J2 EEE  SIDESJ2 EEE  SIDES
J2 EEE SIDES
 
EJB 2
EJB 2EJB 2
EJB 2
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 
JEE Course - EJB
JEE Course - EJBJEE Course - EJB
JEE Course - EJB
 
Introcution to EJB
Introcution to EJBIntrocution to EJB
Introcution to EJB
 
J2EE day 1
J2EE day 1J2EE day 1
J2EE day 1
 
ADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.pptADVANCED JAVA MODULE I & II.ppt
ADVANCED JAVA MODULE I & II.ppt
 
J2ee connector architecture
J2ee connector architectureJ2ee connector architecture
J2ee connector architecture
 
UNIT 4.pptx
UNIT 4.pptxUNIT 4.pptx
UNIT 4.pptx
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
Web Logic Jboss Final
Web Logic Jboss FinalWeb Logic Jboss Final
Web Logic Jboss Final
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Greate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADFGreate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADF
 
J2 ee architecture
J2 ee architectureJ2 ee architecture
J2 ee architecture
 

Kürzlich hochgeladen

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 

Kürzlich hochgeladen (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 

J2ee web services(overview)

  • 1. J2EE WEB-SERVICES BY PRAFULL JAIN 2016BCEX1056 SEC-B , VIITH SEM
  • 2. LIST OF CONTENTS:- 1. Application servers 2. What is J2EE? 3. Main Technologies 4. Application Scenarios 5. J2EE APIs and Services 6. EJB – a closer look
  • 3. APPLICATION SERVERS • In the beginning Centralized, non-distributed terminals mainframe terminals 3 In the 90’s, systems should be client- server
  • 4. APPLICATION SERVERS 4 Today, enterprise applications use the multi-tier model “Multi-tier applications” have several independent components. An application server provides the infrastructure and services to run such applications Application server products can be separated into 3 categories:  J2EE-based solutions  Non-J2EE solutions (PHP, ColdFusion, Perl, etc.)  And the Microsoft solution (ASP/COM and now .NET with ASP.NET, VB.NET, C#, etc.)
  • 5. WHAT IS J2EE?  It is a public specification that embodies several technologies  Current version is 1.5  J2EE defines a model for developing multi-tier, web based, enterprise applications with distributed components J2EE BENEFITS  High availability  Scalability  Integration with existing systems  Freedom to choose vendors of application servers, tools, components  Multi-platform
  • 6. J2EE BENEFITS  Flexibility of scenarios and support to several types of clients  Programming productivity: Services allow developer to focus on business. Component development facilitates maintenance and reuse Enables deploy-time behaviors Supports division of labor
  • 7. MAIN TECHNOLOGIES  JavaServer Pages (JSP)  Servlet  Enterprise JavaBeans (EJB) JSPs, servlets and EJBs are application components. JSP  Used for web pages with dynamic content  Processes HTTP requests (non-blocking call-and-return)  Accepts HTML tags, special JSP tags, and scriptlets of Java code  Separates static content from presentation logic  Can be created by web designer using HTML tools
  • 8. SERVLET  Used for web pages with dynamic content  Processes HTTP requests (non-blocking call- and-return)  Written in Java; uses print statements to render HTML  Loaded into memory once and then called many times  Provides APIs for session management EJB  EJBs are distributed components used to implement business logic (no UI)  Developer concentrates on business logic  Availability, scalability, security, interoperability and integrability handled by the J2EE server  Client of EJBs can be JSPs, servlets, other EJBs and external aplications
  • 9. Copyright 2002 © Paulo Merson J2EE MULTI-TIER MODEL
  • 10. J2EE Application Scenarios  Multi-tier typicalapplication
  • 11. J2EE Application Scenarios  Stand-aloneclient
  • 12. J2EE Application Scenarios  Web-centricapplication
  • 13. J2EE SERVICES AND APIS  Java Message Service (JMS)  Implicit invocation  Communication is loosely coupled, reliable and asynchronous  Supports 2 models:  point-to-point  publish/subscribe
  • 16. J2EE SERVICES AND APIS  JNDI - Naming and directory services  Applications use JNDI to locate objects, such as environment entries, EJBs, datasources, message queues  JNDI is implementation independent  Underlying implementation varies: LDAP, DNS, DBMS, etc.  Transaction service:  Controls transactions automatically  You can limit the transactions explicitly  Or you can specify relationships between methods that make up a single transaction
  • 17. J2EE SERVICES AND APIS  Security     Java Authentication and Authorization Service (JAAS) is the new (J2EE 1.3) standard for J2EE security Authentication via userid/password or digital certificates Role-based authorization limits access of users to resources (URLs, EJB methods) Embedded security realm  J2EE Connector Architecture  Integration to non-J2EE systems, such as mainframes and ERPs.  Standard API to access different EIS (GlassFish Server)  Vendors implement EIS-specific resource adapters
  • 18. J2EE SERVICES AND APIS  JDBC  JavaMail  Java API for XML Parsing (JAXP)  Web services APIs
  • 19. EJB – A CLOSER LOOK
  • 20. HOME INTERFACE  Methods to create, remove or locate EJB objects  The home interface implementation is the home object (generated)  The home object is a factory REMOTE INTERFACE  Business methods available to clients  The remote interface implementation is the EJB object (generated)  The EJB object acts as a proxy to the EJB instance
  • 21. Copyright 2002 © Paulo Merson 34
  • 22. EJB – THE BIG PICTURE
  • 24. TYPES OF EJB StateFul Statless SessionBean Entity Bean Message Driven Bean BMP CMP Enterprise Bean
  • 25. SESSION BEAN  Stateful session bean:  Retains conversational state (data) on behalf of an individual client  If state changed during this invocation, the same state will be available upon the following invocation  Example: shopping cart  Stateless session bean:  Contains no user-specific data  Business process that provides a generic service  Container can pool stateless beans  Example: shopping catalog
  • 26. ENTITY BEAN  Represents business data stored in a database  persistent object  Underlying data is normally one row of a table  A primary key uniquely identifies each bean instance  Allows shared access from multiple clients  Can live past the duration of client’s session  Example: shopping order  Bean-managed persistence (BMP): bean developer writes JDBC code to access the database; allows better control for the developer  Container-managed persistence (CMP): container generates all JDBC code to access the database; developer has less code to write, but also less control
  • 27. MESSAGE-DRIVEN BEAN  Message consumer for a JMS queue or topic  Benefits from EJB container services that are not available to standard JMS consumers  Has no home or remote interface  Example: order processing – stock info
  • 28. SOURCES & RESOURCES  The J2EE Tutorial. Sun Microsystems  www.java.sun.com/j2ee  www.theserverside.com  www.Wikipedia.com/j2ee  www.javatpoint.com