没有合适的资源?快使用搜索试试~ 我知道了~
oracle9ivideo
需积分: 0 4 下载量 176 浏览量
2007-06-25
17:30:40
上传
评论
收藏 2.09MB PDF 举报
温馨提示
试读
358页
请有意学习oracle者继续关注,本人将陆续上传所有录像,QQ:457859175 文件太大,还请有意者直接联系我吧。
资源详情
资源评论
资源推荐
Oracle9
i
Enterprise JavaBeans Developer’s Guide and Reference
Release 1 (9.0.1)
June 2001
Part No. A90188-01
Oracle9i Enterprise JavaBeans Developer’s Guide and Reference, Release 1 (9.0.1)
Part No. A90188-01
Release 1 (9.0.1)
Copyright © 1996, 2001, Oracle Corporation. All rights reserved.
Primary Authors: Sheryl Maring
Contributors: Tim Smith, Ellen Barnes, Matthieu Devin, Steve Harris, Hal Hildebrand, Susan Kraft,
Thomas Kurian, Wendy Liau, Angie Long, Sastry Malladi, John O’Duinn, Jeff Schafer, Aniruddha
Thakur, Iyad Elayyan, Cheuk Chau
The Programs (which include both the software and documentation) contain proprietary information of
Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent, and other intellectual and industrial property
laws. Reverse engineering, disassembly, or decompilation of the Programs is prohibited.
The information contained in this document is subject to change without notice. If you find any problems
in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error free. Except as may be expressly permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on
behalf of the U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial
computer software" and use, duplication, and disclosure of the Programs, including documentation,
shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.
Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer
software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR
52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500
Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of such applications if the Programs are used for
such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the
Programs.
Oracle is a registered trademark, and Oracle, Oracle Database Configuration Assistant, OracleJSP,
Oracle Network Manager, Oracle Security Server, Oracle Security Service, Oracle® Wallet Manager,
Oracle9i, Oracle9i Internet Application Server, and PL/SQL are trademarks or registered
trademarks of Oracle Corporation. Other names may be trademarks of their respective owners.
iii
Contents
Send Us Your Comments................................................................................................................... xi
Preface.......................................................................................................................................................... xiii
1 Oracle9
i
Overview
About Enterprise JavaBeans............................................................................................................. 1-2
EJB Development Roles ............................................................................................................... 1-2
Oracle9i EJB Implementation Features...................................................................................... 1-3
RMI over IIOP............................................................................................................................... 1-3
IIOP Transport Protocol............................................................................................................... 1-4
JNDI................................................................................................................................................ 1-4
Stateful and Stateless Session Beans .......................................................................................... 1-5
Implementing an EJB......................................................................................................................... 1-6
Basic Concepts..................................................................................................................................... 1-7
Types of EJBs ....................................................................................................................................... 1-9
Session Beans............................................................................................................................... 1-10
Entity Beans................................................................................................................................. 1-10
2 Oracle9
i
Enterprise JavaBeans
Invoking Enterprise JavaBeans........................................................................................................ 2-2
Creating Enterprise JavaBeans......................................................................................................... 2-3
Requirements for Remote and Home Interface Implementation.......................................... 2-4
Creating the Remote Interface.................................................................................................... 2-4
Creating the Home Interface....................................................................................................... 2-6
iv
Creating the Exception Class ...................................................................................................... 2-7
Implementing the Bean ..................................................................................................................... 2-7
Interface Implemented................................................................................................................. 2-8
Bean Implementation Example................................................................................................. 2-10
Developing Your Client Application............................................................................................ 2-12
Using the getEJBHome Method................................................................................................ 2-13
Parameter Passing....................................................................................................................... 2-13
A Parameter Object..................................................................................................................... 2-14
The Client Code........................................................................................................................... 2-14
Deploying an EJB.............................................................................................................................. 2-19
Deployment Steps....................................................................................................................... 2-20
Write the Deployment Descriptor............................................................................................ 2-21
Create the Oracle Deployment Map File................................................................................. 2-25
Create a JAR File......................................................................................................................... 2-26
Publish the Home Interface....................................................................................................... 2-27
Dropping an EJB ......................................................................................................................... 2-27
Run the Example......................................................................................................................... 2-27
Programming Restrictions............................................................................................................... 2-28
Debugging Techniques.................................................................................................................... 2-29
Using a Debug Agent for Debugging Server Applications.................................................. 2-30
3 Configuring IIOP Applications
Overview............................................................................................................................................... 3-2
Oracle9i Database Templates For Default Configuration........................................................... 3-2
Advanced Configuration.................................................................................................................... 3-4
Overview of Listeners and Dispatchers .................................................................................... 3-4
Handling Incoming Requests...................................................................................................... 3-6
Configuring The Dispatcher Through Editing Initialization Files........................................ 3-8
Configuring the Listener............................................................................................................ 3-10
SSL Configuration for EJB and CORBA .................................................................................. 3-12
4 Entity Beans
Definition of an Entity Bean............................................................................................................. 4-2
Managing Persistent Data............................................................................................................ 4-2
Uniquely Identified by a Primary Key ...................................................................................... 4-2
v
Performing Complex Logic Involving Dependent Objects.................................................... 4-2
Difference Between Session and Entity Beans............................................................................. 4-5
Implementing Callback Methods.................................................................................................... 4-5
Using ejbCreate and ejbPostCreate............................................................................................ 4-7
Using setEntityContext................................................................................................................ 4-8
Using ejbRemove.......................................................................................................................... 4-8
Using ejbStore and ejbLoad......................................................................................................... 4-9
Creating Entity Beans......................................................................................................................... 4-9
Home Interface............................................................................................................................ 4-10
Remote Interface......................................................................................................................... 4-12
Primary Key................................................................................................................................. 4-12
Entity Bean Class ........................................................................................................................ 4-15
Create Database Table and Columns for Entity Data ........................................................... 4-23
Deploying the Entity Bean ........................................................................................................ 4-24
Client Accessing Deployed Entity Bean.................................................................................. 4-26
Difference Between Bean-Managed and Container-Managed Beans.................................... 4-27
Container-Managed Persistence............................................................................................... 4-28
Accessing EJB References and JDBC DataSources.................................................................... 4-37
EJB References............................................................................................................................. 4-37
JDBC DataSources ...................................................................................................................... 4-38
5 JNDI Connections and Session IIOP Service
JNDI Connection Basics.................................................................................................................... 5-2
The Name Space.................................................................................................................................. 5-3
Execution Rights to Database Objects............................................................................................ 5-4
URL Syntax .......................................................................................................................................... 5-5
URL Components and Classes ................................................................................................... 5-6
Using JNDI to Access Bound Objects............................................................................................. 5-7
Importing JNDI Support Classes................................................................................................ 5-9
Retrieving the JNDI InitialContext............................................................................................. 5-9
Session IIOP Service........................................................................................................................ 5-13
Session IIOP Service Overview ................................................................................................ 5-13
Session Management.................................................................................................................. 5-15
Service Context Class................................................................................................................. 5-16
Session Context Class................................................................................................................. 5-17
剩余357页未读,继续阅读
Tanpeiyong
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0