Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java EE.

Similar presentations


Presentation on theme: "Java EE."— Presentation transcript:

1 Java EE

2 Topics To Be Covered Introduction and Objectives
Introduction to Java EE Enterprise Tiers Why Jaw EE? APIs and Technologies Java EE Roles Summary

3 Introduction and Objectives

4 Introduction Welcome to the course on Java EE!
The Java Platform, Enterprise Edition or Java EE (formerly known as Java 2 Platform, Enterprise Edition or J2EE) has undergone several changes since 1.0 as well as numerous additions of new specifications. Java EE is Oracle's enterprise Java computing platform. The platform provides an API and runtime environment for developing and running enterprise software, including network and web services, and other large-scale, multi-tiered, scalable, reliable, and secure network applications.

5 Introduction Java EE extends the Java Platform, Standard Edition (Java SE). providing an API for object-relational mapping, distributed and multitier architectures, and web services. The platform incorporates a design based largely on modular components running on an application server. Software for Java EE is primarily developed in the Java programming language. This course first introduces you to Java EE. Then, you will learn about Java 2 Platform. Enterprise tiers. Java EE specifications, platform architectures, Java APIs and technologies, and at the end about Java EE roles.

6 Objectives When you complete this course, you will be able to:
Define need for Java EE. List different editions in Java. Explain different types of enterprise tiers. Identify different layers in multi-tired distributed programming. Describe Java EE platform architecture. List specifications of Java EE. Explain Java EE APIs & technologies. Describe various roles in Java EE. Explain about the latest developments in Java EE Objectives

7 Introduction to Java EE

8 Introduction to Java EE
Java EE Origin Sun Microsystems, together with one of its partner IBM, designed Java EE to define a multi-tier architecture for developing Enterprise Information Systems (EIS) to answer the needs from various industries. Goals: To reduce the cost and complexity of development. To allow Java EE applications to be rapidly deployed and easily enhanced.

9 Introduction to Java EE
The History SCA Let us take a look at the history of Java EE Spring 2006 SDO Hibermate 2003 Portlets Java EE 5 EJB 3 POJO components POJO persistence Web Services POJO components Protocol independence JAXB StAX JSF JSP Com mom EL Annotation loc BPEL 2001 J2EE1.4 EJB 2.1 timers pluggable JMS Web Services Basic SOAP/HTTP Registry JMX Mgmt J2EE Deployment JACC 2000 1998 J2EE 1.3 EJB Events Local EJBs Filters abs CMP JSP MDB XML Connectors JXAP JAAS Servlet 2.3 J2EE 1.2 EJB Servlet JSP JMS JavaMail EJB 1.0 Servlet 2.1

10 Introduction to Java EE
Enterprise Computing Let us take a look at the enterprise Computing of Java EE Challanges Key Technologies Products Legacy Systems Portability Diverse Environments Time-to-market Core Competence Assembly Integration J2SE™ J2EE™ JMS Servlet, JSP Connector XML Data Binding XSLT App Servers Web Servers Components Databases Object to DB tools Databases TP Monitors EIS Systems

11 Introduction to Java EE
The Java Platform Java platform consists of three levels of APIs & technologies such as Java Micro Edition, Java Standard Edition, and Java Enterprise Edition. Let us learn about each of them in detail. Java Micro Edition Java Standard Edition Java Enterprise Edition Java Technology Enabled Devices Java Technology Enabled Desktop Workgroup Server Hight-End

12 Introduction to Java EE
Open & Standard Solution Use "component and container" model in which container provides system services in a well-defined and as industry standard. Java EE is a standard that provides portability of code, because it is based on Java technology and standard-based Java programming APIs.

13 Introduction to Java EE
Java EE Classic Architecture The figure illustrates the availability of the J2EE 14 platform APIs in each Java EE container type. J2SE Applet Container JACC Web Srvcs Mgmt JMX JAXR JAX-RPC SAAJ J2SE JSP Web Container JAAS JAXP JAVA Mail JAF Servlet HTTP SSL JACC Web Srvcs Mgmt JMX JAXR JAX-RPC SAAJ J2SE Web Container JAAS JAXP JAVA Mail JAF EJB JMS Web Srvcs Mgmt JMX JAXR JAX-RPC SAAJ J2SE Application Client Container HTTP SSL Database

14 Enterprise Tiers

15 Enterprise Tiers Evolution of Enterprise Application Framework The evolution of enterprise application framework consists of: Single-tier (Mainframe based) Two-tier Three-tier (HTML browser and Web server) Proprietary application server Standard application server

16 Enterprise Tiers Single-tier is a
Dumb terminals are directly connected to mainframe Centralized model (as opposed distributed model). Presentation, business logic, and data access are intertwined in one monolithic mainframe application. Personal Computer Mainframe

17 Enterprise Tiers Two-tier is a SQL request SQL response
Fat client talking to back end database. SQL queries sent, raw data returned. Presentation, business logic, and data model processing logic in client application. SQL request SQL response Personal Computer Database

18 Enterprise Tiers Three-tier is a
Thinner client: Business and data model separated from presentation. Business logic & data access logic reside in middle tier server, while client handles presentation. Middle tier server is now required to handle system services. Concurrency control, threading, transaction, security, persistence, multiplexing, performance, etc. HTML request SQL request HTML response SQL response Personal Computer Web Server Database

19 Enterprise Tiers N-tier Architecture
The N-tier architecture model describes any type of application architecture that programmatically separates application functionality across three or more tiers. The components in each tier, as well as the server-side infrastructure that is available in each tier, are generally distinctly suited to a particular task. N-Tier Architectural Model Client Tier Presentation Tier Business Tier Integration Tier EIS/Data (Resource) Tier Separates Application Functionality Includes Tier Components and Server-side Infrastructure

20 Why Java EE?

21 Why Java EE? Java EE specifications
Java EE specification comprises suite of other APIs such as: Java Authentication and Authorization Service (JAAS) Enterprise JavaBeans Technology (EJB) Java Architecture for XML Binding (JAXB) Java Database Connectivity {JDBC) API Java Persistence Java Servlet Technology Java Server Faces Java Server Pages (JSP) Technology Java API for XML Web Services (JAX-WS) Java Message Service (JMS) Java Specification Request (JSR-181), and Java Naming and Directory Interface (JNDI) Streaming API for XML (StAX) Java Transaction API Java Mail API JavaBeans Activation Framework Java API for XML Processing Java EE Connector Architecture

22 Enterprise Java Bean (EJB) Technology
Why Java EE? Java EE Suite Let us take a look at the different types of Java EE suite. Core Technology Web Technology Enterprise Java Bean (EJB) Technology XML Technology Platform Services

23 Enterprise Java Bean (EJB) Technology
Why Java EE? Java EE Suite Core Technology Web Technology Enterprise Java Bean (EJB) Technology Core technology consists of: Container infrastructure Language Environment support Web technology consists of: Java Servlets Java Server Pages Java Server Pages standard tag library Enterprise Java Bean (EJB) technology comprises of 3 kinds of bears: Session beans Entity beans Message-driven beans

24 Why Java EE? Java EE Suite XML Technology Platform Services
XML technology is classified into: The Java API for XML Processing (JAXP). The Java API for XML-based RPC (JAX-RPC). SOAP with Attachments API for Java (SAAJ). The Java API for XML Registries (JAXR) Platform services are classified as: Security Transactions Resources Connectors Java Message Service

25 Why Java EE? Java EE Communication Technologies
Web client: Browser that access resources located in the web tier (web pages written in HTML or XML, JSP or servlets). Protocol used: HTTP or HTTPS. Enterprise Java bean client: Access to one or more Enterprise Java bean located on the Enterprise Java Bean Tier. Protocol used are Java Remote Method Protocol or Internet Inter-ORB Protocol. Enterprise information system client: Interface between the users and the resources located on the EIS tier. Protocol used: proprietary to utilize resources such as DBMS and legacy data sources. Multi-tier client: Uses the Java Message Service to asynchronously communicate with other tiers.

26 Why Java EE? Component and Container
Let us take a look at the Java EE Component and Container. A component is an application level software unit. The Java EE supports the components such as: Applets Application clients Web components Enterprise Java Beans (EJB) Component All Java EE components depend on the runtime support of a system level entity called a Container. Containers provide components with services such as: Connection & Object pooling Security Transaction Deployment Container

27 Application Client Container
Why Java EE? Platform Architecture This figure shows the required relationships of architectural elements of the Java EE platform Applet Constanter J2SE Applet Application Client Container Application Client JMS JAAS JAXP JOBC Web Container JAVA Mail JAF JDBC Connectors EJB Servlet JSP Database HTTP SSL

28 Why Java EE? Runtime Architecture Tier-0: Client-Side Presentation
Server-Side Presentation Tier-2: Server-Side Business Logic Client Container Web Container Web Container EJB JSP Datasystem Servlet JDBC/Connectors J2EE Server Code JAAS JAXP JAVA Mail JAF JDBC J2EE Server Code JAAS JAXP JAVA Mail JAF JDBC J2EE Server Code JAAS JAXP JAVA Mail JAF JDBC HTTP/HTTPS RMI/IIOP

29 Why Java EE? Platform Value to Developers
Can use any Java EE implementation for development and deployment, such as Production-quality standard implementation which is free for development/deployment. High-end commercial Java EE products for scalability and fault-tolerance. Vast amount of Java EE community resources: Many Java EE related books, articles, tutorials, quality code can be used as best practice guidelines, design patterns, etc. Can use off-the-shelf 3rd-party business components.

30 Why Java EE? Platform Value to Vendors
Java EE value proposition to vendors are: Vendors work together on specifications, and then compete in implementations. The areas in which they compete are scalability, performance, reliability, availability, management, development tools, and so on. Freedom to innovate, while maintaining the portability of applications. Do not have to create/maintain their own proprietary APIs.

31 Why Java EE? Platform Value to Business Customers
Application Portability: Many implementation choices are possible based on various requirements: Price (free to high-end), scalability (single CPU to clustered model), reliability, performance, tools, and more. Best of breed of applications and platforms. Large developer pool.

32 Why Java EE? Enterprise Application
A typical Enterprise Application is made up of: Presentation logic: It deals with how to present information to the end-users. Business logic: It includes the business logic of the application. Data access logic: It deals with accessing data in the back-end database. System services: It includes security, caching, logging, transaction, and other services.

33 Why Java EE? Enterprise Application
Features of Enterprise Applications are: Scalability Fault-Tolerant Secure Availability (24/7 without any downtime} Robust Maintainability Distributed Reliable Transactional Speed/Performance Vendor Independent Multi-User Flexible

34 Why Java EE? Enterprise Application Architecture
An architecture of an enterprise application has: Java EE components Web components EJB components Utility jars Deployment descriptor application.xml Application .war .jar META-INF application.xml

35 Why Java EE? Components Web Components Web components are used for
Web App Foldder All jsp, html files WEB-INF All resources (.jar) classes All .class files web.xml Web components are used for handling presentation logic. They consist of: Static content HTML pages Images Style-sheets Dynamic content Servlets JSPs Deployment descriptor web.xml weblogic.xml

36 Why Java EE? Components EJB Components
Application Home. class, Business. class, Bean. class META-INF ejb-jar.xml weblogic-ejb-jar.xml EJB component is a body of code that has fields & methods to implement modules to business logic. Java content Home interface Business interface Bean class Deployment descriptor web.xml weblogic.xml

37 Knowledge Check Start

38 Java EE provides Component & Container specification?
True False

39 What are the features of enterprise application?
Maintainability Scalability Transactional All of the above

40 The Results

41 APIs & Technologies

42 API & Technologies What is Servlet?
A servlet is a Java object which extends the functionality of a HTTP server. Drawback with CGI: Dynamic contents generation Solution to CGI, or proprietary APIs such as NSAPI or ISAPI are: Efficient Platform and server independent Session management Java-based

43 Servlet Based Webserver
API & Technologies Servlet vs. CGI The figure shows the difference between CGI and servlet-based model. CGI Based Webserver Child for CGI 1 Child for CGI 2 Request CGI1 Request CGI2 CGI Model Servlet Based Webserver JVM Request Servlet 1 Request Servlet 2 Servlet- based Model Servlet 1 Servlet 2

44 API & Technologies What is JSP Technology?
Java Server Pages (JSP) is a technology that helps software developers create dynamically generated web pages based on HTML, XML, and other document types. Enables separation of business logic from presentation: Presentation is in the form of HTML or XML/XSLT. Business logic is implemented as Java beans or custom tags. Better maintainability, and reusability. Extensible via custom tags. Builds on servlet technology.

45 API & Technologies What is EJB Technology?
EJB (Enterprise JavaBean) is a server-side component technology, which enables the easy development and deployment of Java- based enterprise applications in the form of components that have to be enterprise-quality. They are transactional, distributed, multi-tier, portable, scalable, secure, and reliable, and so on. EJB benefits: Agreed upon by the industry. Portability is easier. Rapid Application Development. Provides support for characteristics required by an Enterprise Application.

46 API & Technologies Why EJB Technology?
EJB leverages the benefits of component-model on the server side. It separates business logic from system code: - Container provides system services. It provides framework for portable components: Over different J2EE-compliant servers. Over different operational environments. It enables deployment-time configuration. Deployment descriptor.

47 API & Technologies EJB Architecture Container Client EJB Server EJB
The figure shows a simplified architecture of EJB. Let us learn about the simplified architecture of EJB in detail. Container EJB Server Client EJB Home Object (Home Interface) (Remote Interface) Enterprise JavaBeans™ Component Database or

48 Container-Managed Persistance (CMP)
API & Technologies EJB Components EJB components come in three varieties, each with its own define role and life cycle. Let us take a look at each of them in detail. Synchronous communication Enterprise JavaBeans Session beans Entity beans Message-driven beans Stateless Stateful Bean-Managed Parsistence (BMP) Container-Managed Persistance (CMP) Asynchronous

49 API & Technologies JMS The Java Message Service (JMS) API is a Java Message Oriented Middleware (MOM) API for sending messages between two or more clients. The JMS API was developed by Sun, working in a close co-operation with the leading enterprise message vendors. It is a messaging standard that allows application components based on the Java Enterprise Edition (Java EE) to create, send, receive, and read messages. Messaging systems (MOM) provide: De-coupled communication Asynchronous communication Plays a role of centralized post office. Benefits of messaging systems: - Flexible, reliable, scalable communication systems. Point-to-Point, publish and subscribe.

50 API & Technologies Connector Architecture
Defines standard API for integrating Java EE technology with EIS systems: CICS, SAP, PeopleSoft, etc Before connector architecture, each App server has to provide an proprietary adaptor for each EIS system: m (# of App servers) x n (# of EIS's) Adaptors With connector architecture, same adaptor works with all Java EE compliant containers: 1 (common to all App servers) x n (# of EIS's) Adaptors

51 API & Technologies JAAS Authentication
Java Authentication and Authorization Service, (JAAS), is the Java implementation of the standard Pluggable Authentication Module (PAM| information security framework. JAAS was introduced as an extension library to the Java platform, standard edition 1,3 and was integrated in version 1.4. Pluggable authentication framework; User id/password Smartcard Kerberos Biometric Application portability regardless of authentication schemes underneath: JAAS provides authentication scheme independent API. Authentication schemes are specified; login configuration file, which will be read by JAAS.

52 API & Technologies JAAS Pluggable Authentication Configuration
The figure shows the pluggable authentication framework of JAAS. Applications LoginContext API LoginModule SPI Configuration Kerberos Smart Card Biometric

53 API & Technologies JNDI
JNDI (Java Naming and Directory Interface) API is utilized by Java EE applications to locate resources and objects in a portable fashion. Applications use symbolic names to find object references to resources via JNDI. When the application is deployed, the symbolic names and object references have to be configured by system administrator. JNDI provides methods for performing standard directory operations, such as associating attributes with objects, and searching for objects using their attributes. JNDI organizes its name into a hierarchy. A name can be any string such as "com.mydomain.ejb.MyBean" or an object that implements the 'Name' interface. However, a string is the most common way to name an object. JNDI is divided into five packages: Javax.naming Javax.naming.directory Javax.naming.event Javax.naming.Idap Javax.naming.spi

54 API & Technologies JDBC
JDBC (Java Database Connectivity) is a Java API that can access any kind of tabular data, stored in a relational database. JDBC defines interfaces and classes for writing database applications in Java by making database connections. It works with Java on a variety of platforms, such as Windows, Mac OS, and the various version of OS. Vendors provide JDBC complaint driver, which can be invoked via Standard Java Programming API.

55 API & Technologies Java EE Management (JSR – 77)
Java EE management specification is a Java specification request (JSR-77) for standardization of Java server management. The things Java EE management is trying to address are: Management applications should be able to discover, and interpret the managed data of any Java EE platform. Single management platform can manage multiple Java EE servers from different vendors. Management protocol specifications to ensure a uniform view by SNMP and WBEM management stations. Leverages JMX.

56 Standard Deployment API (Universal Remote)
API & Technologies Java EE Management (JSR – 88) – J2EE 1.4 IDEs Vendor Deploy Tools Management Tools Tools Standard Deployment API (Universal Remote) J2EE Platforms

57 API & Technologies JMX App J2EE App Server JMX API Into the
JMX™ (Java Management Extensions) is a standard API for management and monitoring of resources such as applications, devices, services, and the Java virtual machine. The figure illustrates “A single technology for the Java EE platform” JMX App J2EE App Server Dynamic deployment JMX API Into the J2EE 1.4 platform JMX defacto

58 Knowledge Check Start

59 Identify the correct feature of servlets?
Servlets are client-side components that generate dynamic contents Servlets by default can service only one client request at a time Servlets are platform dependent Servlets can service multiple client requests

60 Which of the following is the component technology in Java EE?
Servlet JSP EJB JMS

61 Which of the following is a standard API for management and monitoring of resources?
JMS JAAS JNDI JMX

62 What are the components that can run in a web container?
Application Client An EJB A Servlet and JSP Java Messaging Service

63 Which beans can be developed using Bean-Managed Persistence (BMP) or Container-Managed Persistence (CMP), implemented by the container? Session beans Message-driven beans Entity beans All of the above

64 Which of the below API supports Asynchronous communication?
JMS JMX JNDI JAAS

65 Match the description with the correct APIs and Technologies
Match the description with the correct APIs and Technologies. It can access any kind of tabular data, stored in a relational database JAAS JNDI JDBC

66 Match the description with the correct APIs and Technologies
Match the description with the correct APIs and Technologies. It is the Java implementation of the standard Pluggable Authentication Module (PAM) information security framework JAAS JNDI JDBC

67 Match the description with the correct APIs and Technologies
Match the description with the correct APIs and Technologies. It is utilized by Java EE applications to locate resources and objects in a portable fashion JAAS JNDI JDBC

68 The Results

69 Java EE Roles

70 Application Component Provider Application Assembler
Java EE Roles Roles Java EE specification defines several rotes involved in development, deployment, and management of an enterprise application. The rotes include: Application Component Provider Application Assembler Deployer System Administrator Tool Provider Product Provider

71 Creating deployment description
Java EE Roles Steps for Developing Java Applocations Steps for developing Java EE applications include: Designing Coding Creating deployment descriptor Packaging Assembling Deployment Deployment Assembling Packaging Creating deployment description Coding Designing

72 Web Services Interoperability Technology (WSIT)
Java EE Roles Latest Development Let us take a look at the latest developments in Java EE. Annotations EJB 3.0 Web Services Interoperability Technology (WSIT) Small Footprint Glassfish Weblogic 10

73 Web Services Interoperability Technology (WSIT)
Java EE Roles Latest Development Annotations EJB 3.0 Web Services Interoperability Technology (WSIT) Annotations are like meta-tags that can be added to the code, and apply them to package declaration, type declarations, constructors, methods, fields, parameters, and variables. As a result, helpful ways can be found to indicate whether the methods are dependent on other methods, or they are incomplete, or the classes have references to other classes, and so on. EJB 3.0 makes another attempt at delivering that promise by EJB's complexity for developers. Features are: No need of home & object interface. No need of any component interface, Makes use of Java annotations. The Java Persistence API (JPA). Simplifies APIs to make flexible for bean's environment. Web Services Interoperability Technology (WSIT) is an open- source project started by Sun Microsystems to develop the next-generation of web service technologies. It provides interoperability between Java Web Services, and Microsoft's Windows Communication Foundation (WCF).

74 Java EE Roles Latest Development Small Footprint Glassfish Weblogic 10
With a small memory footprint and fast execution speeds, this API is great for straight-through transformations of data into XML, or out of it. GlassFish is an open source application server project led by Sun Microsystems for the Java EE platform. It is based on source code donated by Sun and Oracle Corporation’s TopLink persistence system. Weblogic 10 Server is an enterprise-ready Java EE application server that supports the deployment of mission- critical applications in a robust, secure, highly available, and scalable environment. It is an Ideal foundation for building applications based on Service Oriented Architectures (SOA).

75 Java EE Roles References Everything is available at:
Blueprints: A Java Series book: Designing Enterprise Applications with the Java™ 2 Platform Enterprise Edition (downloadable). A sample application "Java Pet Store" Demo: EE/blueprints Simplified Java EE guide available at: htlp://java.sun.comJJava EE/white/Java EE_guide.pdf Useful enterprise Java URLs:

76 Knowledge Check Start

77 _____deploys the application in the running operational environment.
Bean Developer Application Assembler Bean Deployer System Administrator

78 The Results

79 Summary

80 Summary In this course, you have learnt to: Define need for Java EE.
List different editions in Java. Explain different types of enterprise tiers. Identify different layers in multi-tired distributed programming. Describe Java EE platform architecture. List specifications of Java EE. List components of Java EE architecture. Explain Java EE APIs & technologies. Describe various roles in Java EE. Explain about the latest developments in Java EE.


Download ppt "Java EE."

Similar presentations


Ads by Google