SCBCD Exam Study Kit: Java Business Component Developer Certification for EJB
暫譯: SCBCD 考試學習套件:Java 商業元件開發人員認證 (EJB)

Paul Sanghera

  • 出版商: Manning
  • 出版日期: 2005-05-01
  • 售價: $1,880
  • 貴賓價: 9.5$1,786
  • 語言: 英文
  • 頁數: 450
  • 裝訂: Paperback
  • ISBN: 1932394400
  • ISBN-13: 9781932394405
  • 相關分類: Java 程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

Description:

There is probably no Java certification more valuable to you than Sun Certified Business Component Developer CX-310-090. To pass you need a readable, no-nonsense book focused like a laser beam on the exam goals. SCBCD Exam Study Kit is that book.

The study kit makes sure you first understand all the concepts you need to know, large and small, and then covers every single exam topic. It provides more than 130 review questions with answers distributed over all chapters and an Exam's Eye View section at the end of each chapter on the important points to remember.

Although SCBCD Exam Study Kit has only one purpose - to help you get certified - you will find yourself returning to it as a reference after passing the exam. A demo on how to install the necessary software, write a simple bean, deploy the bean, and execute it, as well as a free SCBCD exam simulator can be downloaded from the publisher's website.

 

Table of Contents:

preface xvii
acknowledgments xxi
about the exam xxiii
about the exam simulator xxvii
about the cover illustration xxix



Part 1  Enterprise JavaBeans   1

1  Introduction to J2EE   3
1.1 The J2EE architecture 4
Bird's-eye view of the J2EE architecture 4
Characteristics of the J2EE architecture 5
J2EE platform containers 7
1.2 J2EE application system 8
Using J2EE technologies for application development 9
J2EE platform support for applications 10
1.3 The J2EE implementation 12
J2EE implementation roles 12
The J2EE reference implementation 14
1.4 The J2EE and EJB versions 14
1.5 Summary 14
2  Overview of Enterprise JavaBeans   16
2.1 Understanding the EJB architecture 17
EJB architecture: The big picture 18
Defining container requirements 20
2.2 Understanding the EJB components 21
Characteristics of enterprise beans 22
JavaBeans and Enterprise JavaBeans 23
2.3 Benefits of EJB technology 24
Reduced time to market 24
Cost effectiveness 24
Reliability and robustness 25
2.4 Three flavors of enterprise beans 25
Beans that handle synchronous communication: Entity beans and session beans 26
Beans that handle asynchronous communication: Message-driven beans 27
2.5 Specifying EJB roles and responsibilities 28
Enterprise bean provider 28
Application assembler 29
Bean deployer 29
EJB server provider and container provider 30
System administrator 31
Overlap of roles 31
2.6 Programming the beans 32
Coding the bean class 32
Coding the bean interfaces 33
Writing the deployment descriptor 36
Programming restrictions 37
2.7 The EJB environment 39
The bean's home in the environment: JNDI 39
Deployment descriptor elements for the environment 40
Required APIs and services 45
2.8 Packaging the beans into a JAR file 46
2.9 Lab exercise 46
2.10 Summary 47

Part 2  Session beans   55

3  Client view of a session bean    57
3.1 Session beans in EJB land 58
3.2 Session bean remote home interface 59
Required methods in the remote home interface 59
The create and remove methods in the home interface 62
3.3 Session bean remote component interface 65
Methods in the remote component interface 65
Methods from the EJBObject interface 67
Getting and using the remote component interface 69
3.4 Local interfaces 69
Local interfaces and their methods 70
Writing local interfaces 72
3.5 Using the client view 73
Locating the home interface 73
Accessing a session bean concurrently 75
3.6 Summary 76
4  Birth of a session bean   81
4.1 Introducing session beans 82
4.2 Implementing a session bean 84
Implementing the methods from the client view 84
Implementing methods from the SessionBean interface 86
Putting it all together in code 88
4.3 Constructing and creating a session bean 90
Creating a session bean instance 90
The stateful session bean creation process 91
The ejbCreate methods 92
4.4 Using the SessionContext interface 93
4.5 Operations permitted during bean creation 96
Operations allowed during bean construction 96
Operations permitted during bean creation 98
4.6 Responsibilities of the container 99
4.7 Summary 99
5  Lifecycle of a session bean   105
5.1 The stateful session bean lifecycle: An overview 106
The does not exist state 106
The method ready state 108
The passive state 108
5.2 The stateless session bean lifecycle: To be or not to be 109
5.3 Into and out of a nap: Passivation and activation 111
Implementing ejbPassivate() and ejbActivate() 111
Permitted operations and access 112
5.4 Removing a session bean instance 114
5.5 Where the bean rocks: The business methods 116
Implementation of business methods 116
Operations from the business methods 117
5.6 Summary 118

Part 3  Entity beans   123

6  Client view of an entity bean   125
6.1 Introducing entity beans 126
The core functionality of an entity bean 127
Entity, entity bean, and entity bean instance 129
Characteristics of an entity bean 131
6.2 Entity bean remote home interface 131
Required methods in the remote home interface 132
Additional methods in the home interface 134
6.3 Entity bean remote component interface 138
Methods in the remote component interface 138
Getting and using the remote component interface 140
6.4 Local interfaces 141
6.5 Using the client view 142
Locating the home interface 143
Accessing an entity bean 144
Accessing an entity bean concurrently 145
6.6 Summary 146
7  Birth of an entity bean   151
7.1 Here comes entity bean persistence 152
Synchronizing entity and entity bean 153
CMP and BMP entity beans 154
7.2 Implementing a CMP entity bean 155
Implementing methods from the interfaces 155
Methods for virtual persistent fields 159
Putting it all together in code 160
7.3 Constructing an entity bean 163
Constructing a bean instance 163
Using the EntityContext interface 164
Operations allowed during bean construction 166
7.4 Creating an entity bean 168
CMP entity bean creation process 168
Operations allowed during bean creation 171
7.5 Identifying entity beans 172
Constructing the primary key 173
Identifying entity beans with primary keys 174
7.6 Summary 175
8  Lifecycle of an entity bean    181
8.1 Entity bean lifecycle overview 182
The does not exist state 182
The pooled state: No strings attached 184
The ready state: I'm yours until I go back to the pool 185
8.2 Finding a bean and doing a select 186
The ejbFind methods 186
The ejbSelect methods 187
8.3 Doing business from home 188
Writing home business methods 189
Using EntityContext: Communicating with the container 189
8.4 In and out of the pool 190
Activating a bean instance 191
Passivating a bean instance 192
8.5 Where the bean rocks: The ready state 193
Implementation of business methods 193
Operations from business methods 194
Removing a bean instance 195
8.6 Summary 196
9  Entity bean relationships   202
9.1 Using beans to represent database tables 203
Beans representing related tables 203
Establishing a relationship between two entity beans 206
9.2 Container-managed relationships 207
One-to-one relationships 207
One-to-many relationships 208
Many-to-many relationships 210
9.3 Managing persistence and relationships 211
Container-managed persistent fields 212
Container-managed relationship fields 214
9.4 Programming for CMP and CMR 217
9.5 Relationships and remove protocols 221
9.6 Summary 221
10  EJB query language   227
10.1 The role of EJB QL in persistence 228
Pieces of the persistence puzzle 228
From abstract schema to database table 229
10.2 Abstract schema and query syntax 231
EJB QL syntax and definitions 231
Handling the query return types 232
10.3 Query domains and navigation 233
Navigating the path 233
Dealing with Collections in path navigation 234
10.4 Identifiers and input parameters 235
Identifiers 235
Input parameters 236
10.5 Operators and expressions 237
Operators 237
Expressions 238
10.6 Summary 239

Part 4  Message-driven beans   245

11  Message-driven beans   247
11.1 Using message-driven beans for asynchronous communication 248
Message-driven bean: A JMS message consumer 249
Client view of an MDB 250
11.2 Implementing a message-driven bean 251
Writing an MDB class 251
Requirements for an MDB class 253
11.3 The lifecycle of a message-driven bean 254
States of the lifecycle 254
Using the MessageDrivenContext interface 256
11.4 The message destination types 258
The Queue destination 258
The Topic destination 258
11.5 Summary 259

Part 5  EJB services   265

12  EJB transactions   267
12.1 Understanding transactions 268
Defining transactions 268
Distributed transactions 270
12.2 Implementing EJB transactions 270
Interfaces for transactions 271
Using bean-managed transactions demarcation 272
Using container-managed transaction demarcation 274
12.3 Transaction attributes 274
Defining transaction attributes 275
Transaction attributes in action 278
Using transaction attributes 279
Transaction attributes used by beans 281
12.4 Specifying transactions in a deployment descriptor 282
Specifying the transaction type for a bean 282
Specifying the transaction attribute for a bean method 282
12.5 Transaction synchronization 284
12.6 Summary 286
13  EJB exceptions   292
13.1 Exceptions in Java 293
The exceptions tree in Java 293
Checked exceptions and runtime exceptions 294
13.2 Exceptions in EJB 295
Standard EJB application exceptions 295
Standard EJB system exceptions 298
13.3 Bean provider's responsibilities 301
Dealing with application exceptions 301
Dealing with system exceptions 303
13.4 Container's responsibilities 304
Application exceptions 304
System exceptions 304
13.5 Summary 305
14  EJB security    310
14.1 Implementing security in EJB 311
Understanding basic security concepts 311
Security in EJB 312
14.2 Defining the security roles 313
14.3 Defining method permissions 314
Granting permission to all methods 314
Granting permission method by method 315
Distinguishing between overloaded methods 316
Distinguishing between interfaces 316
14.4 Controlling the propagating security identity 317
14.5 Disabling methods 319
14.6 Programming security 319
Limitations of declarative security 319
Implementing programmatic security 320
References to security roles 321
14.7 Responsibilities in implementing EJB security 322
Implementing EJB security 322
Deploying EJB security 323
14.8 Summary 324
A  Installing and running RI J2SDKEE 1.3   329
B  An introduction to XML   344
C  A sample deployment descriptor file   355
D  Review questions and answers   359
E  Exam Quick Prep   404

商品描述(中文翻譯)

**描述:**
可能沒有比 Sun Certified Business Component Developer CX-310-090 更有價值的 Java 認證。要通過考試,您需要一本可讀性高、內容簡明的書籍,專注於考試目標。**SCBCD 考試學習套件**就是這本書。

這本學習套件確保您首先理解所有需要知道的概念,無論大小,然後涵蓋每一個考試主題。它提供了超過 130 道覆蓋所有章節的複習問題及其答案,並在每章的結尾有一個「考試重點」部分,強調重要的記憶要點。

雖然**SCBCD 考試學習套件**只有一個目的——幫助您獲得認證——但您會發現自己在通過考試後仍會將其作為參考資料。您可以從出版商的網站下載有關如何安裝必要軟體、編寫簡單的 bean、部署 bean 和執行它的示範,以及免費的 SCBCD 考試模擬器。

**目錄:**
*前言 xvii*
*致謝 xxi*
*關於考試 xxiii*
*關於考試模擬器 xxvii*
*關於封面插圖 xxix*

**第一部分 企業 JavaBeans 1**
*1 J2EE 簡介 3*
1.1 J2EE 架構 4
- J2EE 架構的鳥瞰圖 4
- J2EE 架構的特徵 5
- J2EE 平台容器 7
1.2 J2EE 應用系統 8
- 使用 J2EE 技術進行應用開發 9
- J2EE 平台對應用的支持 10
1.3 J2EE 實現 12
- J2EE 實現角色 12
- J2EE 參考實現 14
1.4 J2EE 和 EJB 版本 14
1.5 總結 14

*2 企業 JavaBeans 概述 16*
2.1 理解 EJB 架構 17
- EJB 架構:全貌 18
- 定義容器需求 20
2.2 理解 EJB 組件 21
- 企業 bean 的特徵 22
- JavaBeans 和企業 JavaBeans 23
2.3 EJB 技術的好處 24
- 縮短上市時間 24
- 成本效益 24
- 可靠性和穩健性 25
2.4 企業 bean 的三種類型 25
- 處理同步通信的 bean:實體 bean 和會話 bean 26
- 處理異步通信的 bean:消息驅動 bean 27
2.5 指定 EJB 角色和責任 28
- 企業 bean 提供者 28
- 應用組合器 29
- bean 部署者 29
- EJB 伺服器提供者和容器提供者 30
- 系統管理員 31
- 角色重疊 31
2.6 編程 bean 32
- 編寫 bean 類 32
- 編寫 bean 介面 33
- 編寫部署描述符 36
- 編程限制 37
2.7 EJB 環境 39
- bean 在環境中的家:JNDI 39
- 環境的部署描述符元素 40
- 所需的 API 和服務 45
2.8 將 bean 打包成 JAR 文件 46
2.9 實驗練習 46
2.10 總結 47

**第二部分 會話 bean 55**
*3 會話 bean 的客戶端視圖 57*
3.1 EJB 環境中的會話 bean 58
3.2 會話 bean 遠程家介面 59
- 遠程家介面中的必要方法 59
- 家介面中的 create 和 remove 方法 62
3.3 會話 bean 遠程組件介面 65
- 遠程組件介面中的方法 65
- EJBObject 介面中的方法 67
- 獲取和使用遠程組件介面 69
3.4 本地介面 69
- 本地介面及其方法 70
- 編寫本地介面 72
3.5 使用客戶端視圖 73
- 定位家介面 73
- 同時訪問會話 bean 75
3.6 總結 76

*4 會話 bean 的誕生 81*
4.1 介紹會話 bean 82
4.2 實現會話 bean 84
- 實現來自客戶端視圖的方法 84
- 實現來自 SessionBean 介的方法 86
- 將所有內容整合到代碼中 88
4.3 構建和創建會話 bean 90
- 創建會話 bean 實例 90
- 有狀態會話 bean 的創建過程 91
- ejbCreate 方法 92
4.4 使用 SessionContext 介面 93
4.5 在 bean 創建期間允許的操作 96
- 在 bean 構建期間允許的操作 96
- 在 bean 創建期間允許的操作 98
4.6 容器的責任 99
4.7 總結 99

*5 會話 bean 的生命週期 105*
5.1 有狀態會話 bean 的生命週期:概述 106
- 不存在狀態 106
- 方法就緒狀態 108
- 被動狀態 108
5.2 無狀態會話 bean 的生命週期:存在與否 109
5.3 進入和退出小憩:被動化和激活 111
- 實現 ejbPassivate() 和 ejbActivate() 111
- 允許的操作和訪問 112
5.4 移除會話 bean 實例 114
5.5 bean 的核心:業務方法 116
- 業務方法的實現 116
- 來自業務方法的操作 117
5.6 總結 118

**第三部分 實體 bean 123**
*6 實體 bean 的客戶端視圖 125*
6.1 介紹實體 bean 126
- 實體 bean 的核心功能 127
- 實體、實體 bean 和實體 bean 實例 129
- 實體 bean 的特徵 131
6.2 實體 bean 遠程家介面 131
- 遠程家介面中的必要方法 132