Presentation is loading. Please wait.

Presentation is loading. Please wait.

第十四章 J2EE 入门 Introduction What is J2EE ?

Similar presentations


Presentation on theme: "第十四章 J2EE 入门 Introduction What is J2EE ?"— Presentation transcript:

1 第十四章 J2EE 入门 Introduction What is J2EE ?
The Platform for Enterprise Solutions J2EE Application Programming Model J2EE Benefits  J2EE Platform Technologies J2EE Application Scenarios J2EE Application Construction

2 ‘Enterprise’ in J2EE ‘Programming in the large’ and ‘enterprise computing’ : Lots of users and the application has an ‘extended life’ Deployed on heterogeneous computing environments Maintainability, Flexibility, Reusability are major issues Needs to support transactions, resource-pooling, security, threading, persistence, life-cycle management etc… Need for special solutions to manage complexity Proprietary frameworks and middleware Need for standard APIs for enterprise computing Multi-tiered architecture in enterprise applications

3 What is J2EE? J2EE means : J2EE Platform - A standard platform for hosting J2EE applications, specified as a set of required APIs, specifications and policies. J2EE Application Programming Model - A standard programming model for developing multi-tier, thin-client applications. J2EE Compatibility Test Suite - A suite of compatibility tests for verifying that a J2EE platform product is compatible with the J2EE platform standard. J2EE Reference Implementation - A reference implementation for demonstrating the capabilities of J2EE and for providing an operational definition of the J2EE platform.

4 J2EE Platform

5 J2EE Platform

6 Multitiered Distributed
Application Model • J2EE platform is a multitiered distributed application model • Application logic divided into components according to function • Various components installed on different machines depending on which tier in the multitiered J2EE environment the application component belongs

7 Multitier Applications

8 Client tier

9 Web tier

10 Business and EIS Tiers

11 J2EE Platform Benefits  Simplified architecture and development
 Integration with existing information systems  Scalability to meet demand variations  Choices of servers, tools, components  Flexible security model

12 J2EE Platform Technologies
Component Technologies J2EE Containers  Platform Service Communication Technologies Platform Roles

13 J2EE Application Components

14 J2EE Application Components
Self-contained functional software unit assembled into a J2EE application • Client components - application clients or applets • Web components - Servlets or JSP • run on the server • may respond to HTTP requests from client • typically contains presentation logic • dynamically generates HTML pages, XML or other data format • Business components - EJB

15 J2EE Containers

16 Container Services Containers are the interface between a component and the low-level platform-specific functionality. Before a component can be executed, it must be assembled into a J2EE application and deployed into its container. The assembly process involves specifying container settings for each component and for the J2EE application itself. Container services: security transaction management Java Naming and Directory Interface (JNDI) lookups remote connectivity also manages nonconfigurable services such as enterprise bean and servlet life cycles, database connection resource pooling, data persistence, and access to the J2EE platform APIs

17 Container Types

18 J2EE Standard Services

19 J2EE Standard Services JTA/JTS - demarcation interface used by container and components to demarcate transaction boundaries RMI-IIOP - use of RMI-style programming independent of underlying protocol supports both JRMP and CORBA IIOP JavaIDL - allows components to invoke external CORBA objects using IIOP JDBC - standard API for accessing RDBMS JMS - messaging that supports reliable P2P and publish-subscribe uses JAF

20 J2EE Standard Services • JNDI - standard for accessing naming and directory services • JavaMail - ability to send notifications • JAXP - support for SAX and DOM parsing of XML documents and XSLT • J2EE Connector Architecture – resource adapters that support access to EIS to be plugged in. • JAAS - services to authenticate and enforce access controls upon users extends userbased authorization

21 Communication Technologies
 Internet protocols  Remote method invocation protocols  Object Management Group protocols  Messaging technologies  Data formats

22 Internet Protocols --Transport Control Protocol over Internet Protocol
 TCP/IP --Transport Control Protocol over Internet Protocol  HTTP 1.0 --Hypertext Transfer Protocol  SSL 3.0 --Secure Socket Layer

23 Remote Method Invocation Protocols
 A set of APIs that allow developers to build distributed applications  Uses Java language interfaces to define remote objects  Turn local method invocations into remote method invocations

24 Object Management Group Protocols
 Java IDL  RM I-IIOP

25 Messaging Technologies
 Java Message Service point-to-point messaging publish-subscribe messaging  JavaMail

26 Data Formats GIF (Graphics Interchange Format)
 HTML 3.2  Image files: GIF (Graphics Interchange Format) JPEG (Joint Photographic Experts Group)  JAR file  Class file  XML

27 J2EE Platform Roles J2EE Product Provider Tool Provider
Application Component Provider Application Assembler Application Deployer /System Administrator

28 J2EE Application Scenarios

29 Multitier Application Scenario

30 EJB-Centric Application Scenario

31 Web-Centric Application Scenario

32 J2EE Application Construction
Component Provider Assembler Deployer IDE Packaging Tool Portable Deploy Tool Deployable J2EE Server Class JSP Java HTML Static Create Java Code EJB.JAR Client.JAR Web.WAR Appl.EAR EJB.JAR Client.JAR Web.WAR Appl.EAR Component Provider creates compo- nents  Deployer creates deployable units and deploys them into servers Authoring J2EE Server Assembler creates portable packages Create Web Contents

33 Packaging Portability Limit 3 March 2001 SCM of J2EE

34 J2EE JAR files Java ARchive file containing a J2EE module or application EJB.JAR contains an EJB module Web.WAR contains a Web module Client.JAR contains a Client module Application.EAR contains a J2EE application of one or more modules

35 Deployment and Deploy Tools
Changing/Add properties in the Deployment Descriptor Access control Bean references External Resource references Transactional attributes Mapping Beans in to the Data Base Deploy it into the server Deploy Tools J2EE compatible servers provides their own Deploy Tool

36 Deployment Deployable Deployable Web.WAR Application.EAR J2EE Server
WEB Server J2EE Server Deployable Web.WAR Deployable Application.EAR Deployment Tool Vendor Deployment Descriptor EJB Server Client Deployable CLient.JAR Deployable EJB.JAR Portable Packages Application.EAR EJB.JAR Web.WAR Clientt.JAR


Download ppt "第十四章 J2EE 入门 Introduction What is J2EE ?"

Similar presentations


Ads by Google