Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enterprise Java v012405J2EE Introduction1 Enterprise Computing and J2EE Introduction.

Similar presentations


Presentation on theme: "Enterprise Java v012405J2EE Introduction1 Enterprise Computing and J2EE Introduction."— Presentation transcript:

1 Enterprise Java v012405J2EE Introduction1 Enterprise Computing and J2EE Introduction

2 Enterprise Java v012405J2EE Introduction2 Objectives Understand complexity of enterprise applications Understand N-Tier architectures Differentiate between Java platforms –J2SE, J2ME, and J2EE High-level understanding of J2EE architecture and components

3 Enterprise Java v012405J2EE Introduction3 From Simple ClientDatabase Server JDBC

4 Enterprise Java v012405J2EE Introduction4 To Complex Fat Client (SWING) Enterprise Application Order Database Inventory Management CRM System Management Console Browser Client CORBA Client SOAP Client RMI HTTP SOAP IIOP JDBC SNMP/JMX Custom Also: PDAs, Cell, etc.

5 Enterprise Java v012405J2EE Introduction5 Enterprise Applications Extend their reach, reduce costs, lower response times Provide easy access for customers, employees, and suppliers Provide services that integrate existing Enterprise Information Systems (EIS) with new business functions –highly available –Secure –reliable/scaleable

6 Enterprise Java v012405J2EE Introduction6 Enterprise Application Requirements Highly Available –Business is being bet on the system in many cases Secure –Sensitive systems –Sometimes ‘anonymous’ clients Scalable –Unpredictable system loads Wide variety of systems, platforms, languages, and APIs to integrate

7 Enterprise Java v012405J2EE Introduction7 N-Tier Architectures Developed to manage complexity and scalability issues –Middle tier implements new functionality –client-tier hides the complexity while taking advantage of low administration web-based interfaces Enables system to be composed of different parts Areas of functionality can be ‘scaled up’ as demand requires Definitely more complex than the simple client-server application

8 Enterprise Java v012405J2EE Introduction8 Load Balancer Web Server Web Server Web Server FIREWALLFIREWALL FIREWALLFIREWALL Business Logic Business Logic Database Business System Business System Dynamic Web Content Dynamic Web Content For Fat Clients

9 Enterprise Java v012405J2EE Introduction9 Java 2 Enterprise Edition ‘Standard’ for developing multi-tier, enterprise applications Simplify development of multi-tier applications –Handle difficult middleware requirements Transactions Security Distributed objects Scaling

10 Enterprise Java v012405J2EE Introduction10 Java Platforms Java 2 Micro Edition (J2ME) –Java applications for ‘micro’ devices –PDAs, cell phones, set-top boxes Java 2 Standard Edition (J2SE) –Used by J2EE. Write-Once Run-Anywhere –‘JDK’ Java 2 Enterprise Edition (J2EE) –N-Tier server-side applications

11 Enterprise Java v012405J2EE Introduction11 J2EE Components J2EE Platform J2EE Compatibility Test Suite J2EE Reference Implementation Sun Blueprints Design Guidelines for J2EE

12 Enterprise Java v012405J2EE Introduction12 Compatibility Test Suite Verifies platform vendors have correctly implemented to the spec J2EE 1.3 Compatible Implementations –BEA Weblogic Server 7.0, Borland Enterprise Server, Computer Associates Advantage Joe, Fujitsu Interstage, IBM Websphere, Macromedia JRun 4, Oracle 9i App Server, Pramati Server 3.0, SAS AppDev Studio, Silverstream App Server, Sun ONE Application Server, Sybase EAServer 4.1, TMax Soft JEUS 4.0, TriFork Application Server 3.1, J2EE SDK 1.3 J2EE 1.4 –“Web Services” J2EE 1.5 –“Ease of Use”

13 Enterprise Java v012405J2EE Introduction13 Reference Implementation Operational definition of the J2EE platform Proves spec is implementable Programmer experimentation Download At: –http://java.sun.com/j2ee/download.html

14 Enterprise Java v012405J2EE Introduction14 Blueprints Set of best practices http://java.sun.com/blueprints/

15 Enterprise Java v012405J2EE Introduction15

16 Enterprise Java v012405J2EE Introduction16 J2EE Platform Our main focus – standard execution environment for enterprise components

17 Enterprise Java v012405J2EE Introduction17 J2EE Architectural Model

18 Enterprise Java v012405J2EE Introduction18 J2EE Architecture Diagram

19 Enterprise Java v012405J2EE Introduction19 Containers, Components, and Connectors

20 Enterprise Java v012405J2EE Introduction20 Application Components Application Clients Applets Servlets, JSP pages, filters, and web event listeners –Referred to as ‘Web Components’ Enterprise Java Beans –Business logic for J2EE application –transactional

21 Enterprise Java v012405J2EE Introduction21 Application Component Categories Deployed, managed, and executed on the J2EE server –JSPs, Servlets, EJBs Deployed and managed on the J2EE server, but executed on the client platform –HTML pages –Applets embedded within HTML pages Deployment and management not fully addressed by J2EE specification –Application Clients

22 Enterprise Java v012405J2EE Introduction22 Containers Provide run-time support to application components –Provides Java 2 Standard Environment –Provides APIs to access standard set of J2EE services Interposed between application clients and J2EE services –allows for declarative (versus programmatic) implementation of services (e.g., security, transactions, and state management) Understands application packaging forms for deployment Part of a J2EE ‘server’ –Typically implemented from an existing transaction processing infrastructure

23 Enterprise Java v012405J2EE Introduction23 Containers (Cont) Deployment descriptor is the contract between a component and the container –TellerBean – no one can invoke the ‘closeAccount’ method unless they are in the ‘manager’ role –Essentially an XML config file Other Services –Lifecycle management Create and Destroy components as as demand and resources require –Resource Pooling Object pooling, connection pooling, thread pooling

24 Enterprise Java v012405J2EE Introduction24 Connectors Integrate EIS systems with J2EE system components –CICS –Tandem –SAP/R3 –PeopleSoft –See: http://java.sun.com/j2ee/connector/products.html http://java.sun.com/j2ee/connector

25 Enterprise Java v012405J2EE Introduction25 JCA Overview

26 Enterprise Java v012405J2EE Introduction26 JCA Scenario

27 Enterprise Java v012405J2EE Introduction27 J2EE Services

28 Enterprise Java v012405J2EE Introduction28 Services (Cont) Java Naming and Directory Interface (JNDI) –Look up objects (services) JDBC –Access to relational databases and other repositories JavaMail –Send and receive mail –Order confirmations, customer feedback –Requires Java Activation Framework (JAF) CORBA Compliance –JavaIDL and RMI/IIOP

29 Enterprise Java v012405J2EE Introduction29 Services (Cont) Java Transaction API (JTA) –Components may manage transactions –Usually, better left to platform XML Deployment Descriptors –Custom tool development Java Message Service (JMS) –Asynchronous communication with fault tolerance

30 Enterprise Java v012405J2EE Introduction30 Services (Cont) HTTP –Client-side API defined in java.net –Standard: http://www.w3.org/Protocols/ HTTPs –HTTP over Secure Socket Layer (SSL) JAXP –Java API for XML Parsing

31 Enterprise Java v012405J2EE Introduction31 Services (Cont) J2EE Connector Architecture (JCA) –Standardized access to EIS Security Services –JAAS allows services to authenticate and enforce access controls –JACC allows security implementations to be ‘plugged into’ a J2EE application server

32 Enterprise Java v012405J2EE Introduction32 Services (Cont) Management –Manage servers using an enterprise bean –Some JMX support Deployment –Contract between deployment tools and J2EE products –J2EE product provides a plug-in component that the tool can use to deploy applications into the product

33 Enterprise Java v012405J2EE Introduction33 Services (Cont) Web Services –Deployment of web service clients and service endpoints fully specified –Web service clients JAX-RPC for SOAP Web service calls –Web service endpoints Implementation using enterprise beans –Java API for XML Registries for registry support

34 Enterprise Java v012405J2EE Introduction34 Transactions Transactional Resources –JDBC Connections –JMS Sessions –XATransaction Resource Adapters Transaction boundaries specified programmatically and declaratively Transactions may span multiple components and transactional resources

35 Enterprise Java v012405J2EE Introduction35 Transaction Scenarios

36 Enterprise Java v012405J2EE Introduction36 J2EE Security Goals Security should be portable and interoperable Security policy specified declaratively in deployment descriptors whenever possible Non-goals –Does not dictate a security policy –Does not mandate a specific security technology

37 Enterprise Java v012405J2EE Introduction37 Security (Cont) Authentication –Prove identity –Basic Authentication, HTTPs client authentication, SSL mutual authentication, Form-based authentication –Application clients/JAAS Access Control –Limit access to resources based on role Can client access web page, servlet, JSP Can client invoke EJB method

38 Enterprise Java v012405J2EE Introduction38 Security (Cont) Deployment descriptor states security policies for declarative security APIs give access to security information –HttpServletRequest getUserPrincipal, isUserInRole –EJBContext getCallerPrincipal, isCallerInRole A J2EE product may restrict the use of certain J2SE classes and methods to secure and insure proper operation of the system.

39 Enterprise Java v012405J2EE Introduction39 Naming J2EE application clients, enterprise beans, and web components are required to have access to a JNDI naming environment. Containers provide naming context for components Deployment descriptors specify the component’s requirements for access to external information to the application assembler and deployers Components use JNDI interface

40 Enterprise Java v012405J2EE Introduction40 J2EE Applications J2EE Applications are composed of: –One or more J2EE components –Module-level deployment descriptor Lists application components as ‘modules’ Goal: –Modular application assembly –Portable deployment

41 Enterprise Java v012405J2EE Introduction41

42 Enterprise Java v012405J2EE Introduction42 Application Development Lifecycle

43 Enterprise Java v012405J2EE Introduction43 Interoperability

44 Enterprise Java v012405J2EE Introduction44 Product Extensions Product Extensions are possible to standard –Specification defines the minimum with extensions expected –Extensions may not change or add anything (classes, methods, parameters, etc.) to the packages identified by the specification –may provide additional APIs

45 Enterprise Java v012405J2EE Introduction45 Product Requirements No specification on the number of programs or computers it takes to implement the standard No specification on the partitioning of services No specification on the product boundaries –may need to purchase different levels of compatibility incrementally

46 Enterprise Java v012405J2EE Introduction46 Platform Roles J2EE Product Provider –typically operating system venders, database venders, application server vendors, or web server vendors –provide component containers, API implementations, etc. –provides deployment and management tools Application Component Provider –HTML document designers –Applet developers –EJB developers

47 Enterprise Java v012405J2EE Introduction47 Platform Roles (Cont) Application Assembler –assembles application components into a J2EE application Deployer –deploys software –configures J2EE application for use in a specific environment –instantiates application –expert in the deployment environment

48 Enterprise Java v012405J2EE Introduction48 Platform Roles (Cont) System Administrator –configuration and administration of computing and networking infrastructure –monitors operation of application Tool Provider –develops tools for the development and packaging of components

49 Enterprise Java v012405J2EE Introduction49 J2EE Architecture

50 Enterprise Java v012405J2EE Introduction50 Multi-Tier Model Client Tier –supports client access both inside and outside corporate firewall Middle Tier –supports client services through Web containers in the Web Tier –supports business logic through EJB containers in the EJB Tier Enterprise Information Tier –supports access to information through standard APIs

51 Enterprise Java v012405J2EE Introduction51 Client Tier Variety of client types both inside and outside the enterprise firewall –Web Browsers using plain HTML pages dynamic HTML pages generated through JSPs Applets –Standalone Java applications (portable code, non-portable install) Access Middle-Tier using web standards –HTTP, HTML, and XML Complex client interaction –communicated with through middle-tier Servlets –clients access through JavaBeans

52 Enterprise Java v012405J2EE Introduction52 Middle Tier Application developer supplies business code in the form of Enterprise JavaBeans EJB Container provides reliability, scalability, security,and other qualities/services for the business code –APIs to implement business code –Distributed environment to use the business code

53 Enterprise Java v012405J2EE Introduction53

54 Enterprise Java v012405J2EE Introduction54 Client Scenarios

55 Enterprise Java v012405J2EE Introduction55 Direct Client-EJB Access

56 Enterprise Java v012405J2EE Introduction56 Direct Client EIS Access

57 Enterprise Java v012405J2EE Introduction57 Direct Client Access to Web Content

58 Enterprise Java v012405J2EE Introduction58 3 Tier Web-Centric Application Scenario

59 Enterprise Java v012405J2EE Introduction59 Business-to-Business Scenario

60 Enterprise Java v012405J2EE Introduction60 J2EE Future Directions XML Data Binding (JSR-031) –http://java.sun.com/aboutJava/communityprocess/jsr/jsr_031_xmld.html JNLP –Java Network Launch Protocol –Deploy applications on server and launch on client –Java Web Start is reference implementation J2EE SPI –Make more aspects of an application server ‘pluggable’ –http://java.sun.com/aboutJava/communityprocess/jsr/jsr_111_jsf.html a possibilityhttp://java.sun.com/aboutJava/communityprocess/jsr/jsr_111_jsf.html

61 Enterprise Java v012405J2EE Introduction61 Future Directions (Cont) JDBC Rowsets –Standard way to send tabular data between remote components of a distributed app –http://java.sun.com/products/jdbc. Security APIs –Expand APIs available to a client that wishes to control security programmatically SQLJ Part 0 –Embed SQL statements in Java program –http://www.sqlj.org

62 Enterprise Java v012405J2EE Introduction62 References Sun’s Website –http://java.sun.com/j2eehttp://java.sun.com/j2ee


Download ppt "Enterprise Java v012405J2EE Introduction1 Enterprise Computing and J2EE Introduction."

Similar presentations


Ads by Google