Oracle9i Enterprise JavaBeans Developer’s Guide and Reference

Free Download

Authors:

Edition: release 9.0.1

Size: 2 MB (2189228 bytes)

Pages: 358/358

File format:

Language:

Publishing Year:

Category:

Maring S.

Anyone developing server-side Enterprise JavaBeans for Oracle9i will benefit from reading this guide. Written especially for programmers, it will also be of value to architects, systems analysts, project managers, and others interested in network-centric database applications. To use this guide effectively, you must have a working knowledge of Java and Oracle9i.

Table of contents :
Oracle9i……Page 1
Send Us Your Comments……Page 11
Preface……Page 13
1 Oracle9i Overview……Page 19
EJB Development Roles……Page 20
RMI over IIOP……Page 21
JNDI……Page 22
Stateful and Stateless Session Beans……Page 23
Implementing an EJB……Page 24
Basic Concepts……Page 25
Persistence……Page 27
Entity Beans……Page 28
2 Oracle9i Enterprise JavaBeans……Page 29
Invoking Enterprise JavaBeans……Page 30
Creating Enterprise JavaBeans……Page 31
Creating the Remote Interface……Page 32
Example……Page 33
Creating the Home Interface……Page 34
Implementing the Bean……Page 35
Interface Implemented……Page 36
Using setSessionContext……Page 37
Bean Implementation Example……Page 38
Developing Your Client Application……Page 40
Parameter Passing……Page 41
The Client Code……Page 42
About JNDI……Page 43
Getting the Initial Context……Page 44
Getting the Home Interface Object……Page 45
Invoking EJB Methods……Page 46
Deploying an EJB……Page 47
Deployment Steps……Page 48
Write the Deployment Descriptor……Page 49
Create the Oracle Deployment Map File……Page 53
Create a JAR File……Page 54
Run the Example……Page 55
Programming Restrictions……Page 56
Debugging Techniques……Page 57
Using a Debug Agent for Debugging Server Applications……Page 58
3 Configuring IIOP Applications……Page 61
Oracle9i Database Templates For Default Configuration……Page 62
Overview of Listeners and Dispatchers……Page 64
Redirect to GIOP Dispatcher……Page 66
Hand Off to Generic Dispatcher……Page 67
Configuring The Dispatcher Through Editing Initialization Files……Page 68
Direct Dispatcher Connection……Page 69
Dynamic Listener Endpoint Registration……Page 70
Static Configuration of the Oracle Net Services Listener……Page 71
SSL Configuration for EJB and CORBA……Page 72
Configure the Wallet Location through Oracle Net Manager……Page 73
4 Entity Beans……Page 77
Performing Complex Logic Involving Dependent Objects……Page 78
Implementing Callback Methods……Page 81
Using ejbCreate and ejbPostCreate……Page 83
Using ejbRemove……Page 84
Creating Entity Beans……Page 85
Home Interface……Page 86
Primary Key……Page 88
Defining the Primary Key in a Class……Page 89
Manage the Primary Key……Page 90
Entity Bean Class……Page 91
2. Implementing Remote Interface Methods……Page 92
3. Implementing EntityBean Interface Methods……Page 93
4. LineItem Class……Page 98
Create Database Table and Columns for Entity Data……Page 99
Deploying the Entity Bean……Page 100
Access an Existing Entity Bean……Page 102
Difference Between Bean-Managed and Container-Managed Beans……Page 103
Modify Bean Class Callback Methods……Page 104
Define Your Primary Key……Page 107
Declare Persistence Provider……Page 110
Map Container-Managed Persistence Fields……Page 112
EJB References……Page 113
JDBC DataSources……Page 114
5 JNDI Connections and Session IIOP Service……Page 117
JNDI Connection Basics……Page 118
The Name Space……Page 119
Execution Rights to Database Objects……Page 120
URL Syntax……Page 121
URL Components and Classes……Page 122
Using JNDI to Access Bound Objects……Page 123
URL_PKG_PREFIXES……Page 125
SECURITY_AUTHENTICATION……Page 126
The JNDI InitialContext Methods……Page 127
lookup……Page 128
Session IIOP Service Overview……Page 129
Oracle9i JVM Tools……Page 130
Session Management……Page 131
Methods……Page 132
Session Context Class……Page 133
Session Management Scenarios……Page 134
Setting Session Timeout……Page 143
Retrieving the Oracle9i Version Number……Page 144
Invoking EJB Objects From Applets……Page 145
Performing Object Lookup in Applets……Page 146
Modifying HTML for Applets that Access EJB Objects……Page 147
6 IIOP Security……Page 151
Overview……Page 152
Using the Secure Socket Layer……Page 153
SSL Version Negotiation……Page 154
Authentication……Page 155
Client-Side Authentication……Page 156
Using JNDI for Authentication……Page 158
Providing Username and Password for Client-Side Authentication……Page 159
Username Sent by Setting JNDI Properties for the Login Protocol……Page 160
Username Sent by Explicitly Activating a Login Object……Page 161
Specifying Certificates in a File……Page 163
Specifying Certificates in Individual JNDI Properties……Page 164
AuroraCertificateManager Class……Page 166
requestClientCertificate……Page 167
setProtocolVersion……Page 168
Typical Client/Server……Page 170
Callbacks using Security……Page 171
Authorization……Page 176
Parsing Through the Server’s Certificate Chain……Page 177
getNegotiatedCipherSuite……Page 178
getPeerDERCertificateChain……Page 179
getNegotiatedProtocolVersion……Page 180
7 Transaction Handling……Page 183
Transaction Overview……Page 184
Demarcating Transactions……Page 185
UserTransaction Interface……Page 186
Container-Managed Transactions……Page 187
Transaction Context Propagation……Page 189
Propagating the Transactional Context to Container-Managed Transactional Beans……Page 190
Enlisting Resources……Page 191
Default Enlistment……Page 192
Explicitly Enlisting the Database……Page 193
Two-Phase Commit……Page 194
Environment Initialization……Page 195
Methods for Enlisting Database Resources……Page 196
Summary of Single-Phase and Two-Phase Commit……Page 197
Differences Between Container and Bean-Managed Transactions……Page 198
Container-Managed Transactions……Page 201
Bean-Managed Transactions……Page 205
Bean-Managed Transactional Deployment Descriptor……Page 206
Enlisting Resources in Bean-Managed Transactions……Page 207
JTA Client-Side Demarcation……Page 208
Developing the Client Application……Page 209
JTA Client-Side Demarcation Including Databases……Page 210
Developing the Client Application……Page 212
Local Database Resource Enlistment……Page 214
Using SQLJ After Database Enlistment……Page 217
Remote Oracle9i Database Enlistment……Page 218
Bind UserTransaction Object in the Namespace……Page 219
Bind DataSource Object in the Namespace……Page 221
Configuring Two-Phase Commit Engine……Page 223
Global Transactions in an Oracle9i Application Server Environment……Page 230
Creating DataSource Objects Dynamically……Page 231
Setting the Transaction Timeout……Page 232
afterBegin……Page 233
afterCompletion……Page 234
Nested Transactions……Page 235
JDBC Restrictions……Page 236
A XML Deployment Descriptors……Page 237
Header……Page 239
Enterprise JavaBeans Descriptor……Page 240
Bean Names……Page 241
Entity Bean Elements……Page 243
Bean Services……Page 246
Environment Elements……Page 247
Defining Security……Page 257
Defining Transactions……Page 261
EJB Client JAR Section……Page 264
Header……Page 265
Specifying Multiple Beans in Deployment JAR File……Page 266
Defining Mappings……Page 267
EJB Reference……Page 268
Security Role……Page 269
Defining Oracle-Specific Elements for Transactions……Page 270
Enabling Branches Within the Transaction……Page 271
Defining Run-As Identity……Page 272
Persistence Provider……Page 273
Persistence Fields……Page 275
DTD for Oracle-Specific Deployment Descriptor……Page 279
B Example Code: EJB……Page 283
README……Page 284
Client……Page 288
Bean Implementation for Hello……Page 289
Hello.xml……Page 290
README……Page 291
Client……Page 294
Remote Interface……Page 295
EmployeeBean.sqlj……Page 296
Employee.xml……Page 297
README……Page 298
Client……Page 302
FooHome.java……Page 303
BarBean.java……Page 304
FooBar.xml……Page 305
FooBarMap.xml……Page 307
Client……Page 308
Home Interface……Page 310
Exception……Page 311
PurchaseOrderBean.sqlj……Page 312
PurchaseOrder.xml……Page 316
PurchaseOrderMap.xml……Page 317
Database Table Updates……Page 318
Client……Page 319
Home Interface……Page 321
Bean Implementation……Page 322
Customer.xml……Page 324
CustomerMap.xml……Page 325
Database Table Updates……Page 326
Client……Page 327
Bean Implementation……Page 328
Hello.xml……Page 330
HelloMap.xml……Page 331
README……Page 332
Client……Page 333
Bean Implementation……Page 334
Hello.xml……Page 335
README……Page 337
Client……Page 338
Bean Implementation……Page 339
Hello.xml……Page 340
HelloMap.xml……Page 341
C Abbreviations and Acronyms……Page 343
Index……Page 351

Reviews

There are no reviews yet.

Be the first to review “Oracle9i Enterprise JavaBeans Developer’s Guide and Reference”
Shopping Cart
Scroll to Top