PowerPoint 演示文稿

Download Report

Transcript PowerPoint 演示文稿

Oracle 9i应用服务器及J2EE架构
马 梅
计算中心数据库课题组
2002.2.25
内


容
Oracle 9i应用服务器
Oracle9iAS Containers for J2EE Architecture
Oracle 9i 应用服务器






Oracle9iAS同Oracle9i 和 Oracle9i Developer Suite工具集结合在
一起,为创建、提交和管理Internet应用提供了高度可伸缩的、基
于标准的基础结构和优良的数据集成特性。
适于运行任何Internet应用包括J2EE和基于模型的应用。
Oracle9iAS提供了由 Apache所支持的Oracle9iAS 高速缓存等新特
性,可大幅提高网站性能和规模可调性。无需增加更多的昂贵硬件
就可以以更丰富的动态页面内容支持更多的用户。
Oracle9iAS 以Web界面为先,将浏览器作为标准访问界面,同时还
有很多可用的现成Portlet(网页模块)存储在Oracle 9i 数据库中,
这样用户只需要通过装配组合就可以快速构造出企业电子商务门户。
Oracle9iAS 还支持基于角色的个性化处理,能够构建一次登录门户。
Oracle9iAS Wireless支持任何访问设备,并能够根据访问设备的不
同进行个性化处理。
List of iAS Documents

List of Books for New Users
http://downloadwest.oracle.com/docs/cd/A97329_02/90200doc_otn/mix.902/q
20102/new.htm

List of Books for Administrators
http://downloadwest.oracle.com/docs/cd/A97329_02/90200doc_otn/mix.902/q
20102/admin.htm

List of Books for Application Developers
http://downloadwest.oracle.com/docs/cd/A97329_02/90200doc_otn/mix.902/q
20102/appdev.htm
Oracle9i Application Server Solutions
Oracle9i Application Server Components(1)
Solution
J2EE and Internet
Applications
Portals
Oracle9iAS Components
Oracle HTTP Server ,
OracleiAS Containers for J2EE,
OracleiAS Web Services,
Oracle PL/SQL,Oracle9iAS Forms Services,
Oracle XML Developer Kit,
Oracle9i Clien
Oracle9iAS Portal,
Oracle9iAS Portal Developer Kit
Wireless
Oracle9iAS Wireless
Caching
Oracle9iAS Web Cache
Oracle9i Application Server Components(2)
Solution
Business Intelligence
E-Business Integration
Management and
Security
Oracle9iAS Components
Oracle9iAS Reports Services ,
Oracle9iAS Discoverer,
Oracle9iAS Personalization,
Oracle9iAS Clickstream Intelligence
Oracle9iAS InterConnect ,
Oracle9iAS Unified essaging,
Oracle Internet File System
Oracle Enterprise Manager,
Oracle9iAS SingleSign-On,
Oracle Internet Directory,
Oracle9iAS Infrastructure
J2EE and Internet Applications





Oracle9iAS 完全基于J2EE架构
支持最新的工业标准和编程语言,包括 J2EE API、
XML, and Web services
最全面和最灵活的架构,
用户可使用熟悉的编程语言和技术就可以设计、开发
和分发动态Web站点、门户和事务应用程序,
提供全面的Web services
Supported Technologies and Programming
Languages
Java and J2EE
JSP :JavaServer Pages
 Servlets
 EJB:Enterprise JavaBeans
 JDBC :Java Database
Connectivity
 JTA :Java Transaction API
 JNDI :Java Naming and
Directory Interface
 JMS :Java Message Service
 JAAS :Java Authentication
and Authorization Service

 Web
Services
PL/SQL
XML
DOM :Document Object Model
 XSLT :Extensible Stylesheet Language
Transformations
 XML Schemas
 SAX :Simple API for XML
 XSQL
 IDAP :Internet Data Access
Presentation
 XPath :XML Path Language
 SOAP :Simple Object Access Protocol
 WSDL :Web Services Description
Language
 UDDI :Universal Description,
Discovery, and Integration


PL/SQL
Server Pages
 PL/SQL Web
Toolkit
 Oracle Forms
Oracle9iAS Containers for J2EE
Architecture
Oracle9iAS 容器 OC4J
OC4J:
Oracle9iAS Container for J2EE
OC4J是一个快速的、轻量级的、可伸缩的符合J2EE标准
的J2EE容器,运行在标准的Java虚拟机上,包括两个
容器:
 OC4J Web Contsiner

Servlet Container

JSP Translator
 OC4J EJB Container
Servlet Container工作原理
当一个请求被映射到一个Servlet时,Servlet Container
执行如下步骤:

如果Servlet不存在,则





加载 Servlet类
实例化 Servlet类的一个实例
初始化 Servlet实例
Container 请求 Servlet,传递请求和响应对象,请求对象
(request objects)包括客户端信息、请求参数和HTTP头,
响应对象(response objects )返回Servlet的输出到客户端。
Servlet从客户端提取信息、访问外部资源,然后组装基于那
些信息的响应。
JSP Translator工作原理
 JSP Translator包括翻译器和编译器。翻译器把JSP翻译成Java源
代码文件,编译器把源文件编译成Java字节代码(.class)文件,
使用Java的运行时库在Servlet Container中执行一个Servlet。
运行时库包括解释JSP文件中的标签(Tag)和宏的支持文件 ,
Servlet Container还提供对Java API和其他服务的访问。
 当用户从JSP文件(例如http://host/Hello.jsp)请求一个URL时,
其工作步骤如下:
 Web Server 请求JSP Translator ,它翻译Hello.jsp 为Hello.java
文件。
 请求Java编译器建立 Hello.class。
 请求Java运行时库,运行Hello.class
 如果Hello.class有数据库的请求信息,则Servlet Container提供
JDBC访问,是它检索到信息并将结果返回到客户端浏览器。
OC4J EJB Container工作原理



EJB Container如何工作依赖于使用那种类型的bean,
Container管理一个J2EE应用的bean的执行。
对于会话beans(session beans)EJB Container提供
与Web Container相同的所有的服务,例如对API和虚
拟机的访问、事务服务、安全和对EJB方法授权等。
对于实体beans(entity beans),它是以永久存储机
制来表示商务对象,用户可以选择bean管理它自己的
永久存储,即bean-managed persistence (BMP)
beans;也可以使用Container管理永久存储,即
container-managed persistence (CMP) beans. 。
Oracle9iAS Containers for J2EE
Supported APIs
API
Version
JavaServer Pages(JSP)
1.2
Java Servlet
2.3
Enterprise Java Beans (EJB)
2.0
Java Database Connectivity (JDBC)
2.0
Java Transaction API (JTA)
1.0
Java Message Service (JMS)
1.0
JavaMail
1.2
JavaBeans Activation Framework
1.0
Java API for XML (JAXP
1.1
J2EE Connector API
1.0
Java Authentication and Authorization Service (JAAS)
1.0
What is JSP?(1)
JSP:Java Server Page
 Sun 公司1999年6月推出的技术,该技术受Sun公司主导,并采用了计算机
硬软件、通信、数据库领域等多家厂商意见共同制定的一种基于Java的
Web动态网页技术。
 JSP是一种基于Web服务器端的脚本语言,需要支持JSP的引擎或应用服务
器。
 它包装了Java Servlet系统的界面,简化了Java Servlet的使用难度。
 使用JSP标签(Tag)提供网页动态执行能力。
 是一种与硬件平台、操作系统、Web服务器无关的技术。
 JSP与Servlet的关系:
JSP 文件
(.JSP)
Servlet源
代码
(.java)
Java 可执行代
码(.class)
Servlet
JSP translator, JSP engine
 是翻译、执行和处理JSP页面的实体,并传递请求。
 根据实现到实现,JSP translator 的体系结构是有
变化的,但无论如何变化它是一个或多个Servlet组
成。
 JSP translator是通过servlet container执行的。
What is a Servlet?




Servlet是基于Web组件的Java技术,由Servlet
Container管理,产生动态网页内容。
Servlet是小Java程序,运行在Web Sercer端,与运行在
客户浏览器端的Applet不同。
servlets与系统平台无关。
Servlets 与 web clients交互是通过 request/response
规范由 servlet container实现的。
What is a Servlet Container?




Containers, sometimes called servlet engines, are web
server extensions that provide servlet functionality.
The servlet container is a part of a web server or application
server .
It provides the network services over which requests and
responses are sent, decodes MIME based requests, and
formats MIME based responses.
A servlet container also contains and manages servlets
through their lifecycle.
What is EJB?
EJB :Enterprise JavaBeans
J2EE其中一个引人注目的技术是EJB。它提供了一个架构来开发和配置到
客户端的分布式商业逻辑,因此可以明显减少开发扩展性、高度复杂企业
应用的难度。EJB规范定义了EJB组件应该如何及何时与它们的容器交互。
由容器来负责提供普通的服务,例如目录服务、事务管理、安全、资源池
和容错。
 The component-based application model for Java defined by
JavaSoft.
 It provides most of the system level services such as multithreading to ease application programming.
 EJB relies on various standardized enterprise services, such as
JNDI, JTS, JDBC, etc. to facilitate application programming and
enable EJB objects to be interoperable across various EJB servers.
 It fulfills the write once, run anywhere paradigm
What is EJB container?
EJB container
 The component coordinator in an EJB
application.
 The one of key EJB runtime components.
EJB application
 A framework of deploying CORBA objects
written in Java, which adhere to the EJB
specification.
EJB deployment descriptor
DD: Deployment Descriptors
 A J2EE application and each of its modules has its own deployment
descriptor (DD). A DD is an XML text-based file with an .xml
extension
 It describes the deployment settings for a component. For example, an
enterprise bean module DD declares transaction attributes and security
authorizations for an enterprise bean.
 DD information is declarative so it can be changed without modifying
the bean source code.
 At runtime, the J2EE server reads the DD and acts on the component
accordingly
EJB DD
 A serialized object that provides information, such as transaction and
security policies, about how an EJB application or object should be
deployed.
What Is a J2EE Application?

J2EE应用程序是由多个J2EE组件组成的,一个J2EE组
件是一个自含功能软件单元, J2EE应用程序用这些单
元与它相关的类和用于与其它组件通信的XML描述符文
件装配而成。 J2EE组件是用JAVA程序语言写的,与用
JAVA语言编写的其它程序有相同的编译方法。
J2EE分布式多层应用体系结构
Oracle9iAS使用了多层分布式应
用模型。一个多层分布式应
用模型按照功能把一个应用
逻辑分成组件,各种构成
J2EE应用的各种应用组件可
以安装在不同的机器上。
图:说明了两层J2EE应用分成
了 client, Web, business
logic, and enterprise data
tiers.
J2EE的客户端类型
J2EE applications 支持如下两种客户端方式:
 Application Clients: Applications running on a client machine
that directly access enterprise beans that are running in the
business logic tier. Application clients can also open an HTTP
connection to establish communication with a servlet running on
the Internet tier if a J2EE application requires it.
 Dynamic HTML and XML Pages: In the context of J2EE
applications, dynamic HTML and XML pages are generated by
servlets or pages created with JavaServer Pages technology
running in the Web tier. These pages can be extensions to
traditional static HTML pages allowing application developers to
offer customized and personalized pages to the
J2EE Application 组件类型
在J2EE applications使用的组件:
 Servlets: A servlet is a Java class used to extend the
capabilities of servers that host applications accessed through a
request-response programming model.
 JavaServer Pages: JavaServer pages (JSPs) are text files that
contain two types of information: static template data, which
can be expressed in any text-based format, such as HTML, WML
(Wireless Markup Language), or XML, and JSP elements, which
construct dynamic content.
 Enterprise Beans: Enterprise beans are server-side
components that encapsulate the business logic of an
application.
应用服务器管理员的任务
 Task1: Determine Which Oracle9iAS Solutions You
Require
 Task2: Design Your Application Server
 Task3: Install Your Application Server
 Task4: Learn to Use the Administration Tools
 Task5: Perform Postinstalltion Tasks
 Task6: Configure Your Application Server
 Task7: Deploy Applications
 Task8: Monitor Your Application Server
 Task9: Back Up Your Application Server
 Task10: Reconfigure Your Application Server Design
iAS 安装类型 (1)
 J2EE and Web Cache: Provides a basic Web server that enables you to
develop and deploy Java 2 Enterprise Edition (J2EE) applications, use J2EE and
Simple Object Access Protocol (SOAP) based Web services, accelerate Web site
performance, and manage your application server with a Web-based tool.
 Portal and Wireless: Enables you to deploy enterprise portals and wireless
applications. Includes all components available in the J2EE and Web Cache install
type.
 Business Intelligence and Forms: Enables you to analyze clickstream
data, personalize applications, perform data analysis, generate Web-based reports,
create Discoverer public connections, configure Discoverer viewer and Discoverer
Portlet Provider, and use Forms-based applications. Includes all components
available in the Portal and Wireless install type.
 Unified Messaging: Enables you to integrate different types of messages
into a single framework. Includes all of the components available in the Business
Intelligence and Forms install type.
iAS 安装类型(2)
Table : Oracle9iAS Install Types
iASAdministration Tools
Oracle Enterprise Manager Web Site
Oracle Enterprise Manager Console
Using the Console with the Oracle
Enterprise Manager Web Site
Oracle Enterprise Manager Web site
 The Oracle Enterprise Manager Web site provides Web-based
management tools designed specifically for Oracle9iAS. Using the
Web site, you can monitor and configure the components of your
Oracle9i Application Server installations. You can deploy
applications, manage security, and create and manage Oracle9i
Application Server clusters.
 The Oracle Enterprise Manager Web site consists of:
 The Enterprise Manager Home Pages you use to manage
Oracle9iAS。These Web pages provide you with a high-level view
of your Oracle9i Application Server environment.
 The underlying software technologies that keep track of your
application server instances and components
启动Oracle Enterprise Manager
Web site


1.
2.
3.
access the Welcome Page by pointing your browser to
the HTTP Server URL ,default HTTP Server URL is:
http://hostname:7777
directly to the Oracle Enterprise Manager Web site
using the following instructions:
Enter the following address in your Web browser:
http://hostnanme:<port_number>/ For example, if you
installed Oracle9i Application Server on a host called
SYS12, you would enter the following address in your
Web browser:
http://SYS12:1810
Oracle9iAS Instance Home Page
谢谢!