Chapter9 - Chapter13
9.事務
---9.1 事務邊界和自動提交(Auto-commit)
------9.1.1 禁用自動提交模式
---9.2 事務隔離級別
------9.2.1 使用setTransactionIsolation方法
------9.2.2 性能考慮
---9.3 保存點(Savepoints)
------9.3.1 設置和回滾保存點
------9.3.2 釋放(release)保存點
10.連接
---10.1 驅動程序分類
---10.2 Driver接口
-------10.2.1 加載一個實現了java.sql.Driver接口的驅動
---10.3 DriverManager類
-------10.3.1 SQLPermission類
---10.4 DataSource接口
-------10.4.1 DataSource屬性
-------10.4.2 JNDI類庫和應用移植能力(Application Portability)
-------10.4.3 用DataSource對象獲得連接
11.連接池
---11.1 ConnectionPoolDataSource類和PooledConnection類
---11.2 連接事件
---11.3 三層架構中的連接池
---11.4 DataSource的實現和連接池
---11.5 部署
---11.6 用池連接(Pooled Connections)實現語句(Statement)重用
-------11.6.1 使用池語句(Pooled Statement)
-------11.6.2 關閉池語句
---11.7 ConnectionPoolDataSource類的屬性
12.分布式事務
---12.1 基礎設施
---12.2 XADataSource和XAConnection接口
-------12.2.1 部署一個XADataSource對象
-------12.2.2 獲得一個連接
---12.3 XAResource接口
---12.4 事務管理
-------12.4.1 兩階段提交
---12.5 關閉連接
---12.6 XAResource接口的局限
13.語句(Statements)
---13.1 Statement接口
-------13.1.1 創建Statements
-------------13.1.1.1 設置ResultSet的相關特征
-------13.1.2 執行Statement
-------------13.1.2.1 返回ResultSet對象
-------------13.1.2.2 返回影響行數(Update Count)
-------------13.1.2.3 使用execute方法
-------13.1.3 關閉Statement
---13.2 PreparedStatement接口
-------13.2.1 創建PreparedStatement對象
-------------13.2.1.1 設置ResultSet的相關特征
-------13.2.2 參數設置
-------------13.2.2.1 類型轉換
-------------13.2.2.2 本地字符集轉換(National Character Set Conversions)
-------------13.2.2.3 使用setObject方法進行類型轉換
-------------13.2.2.4 設置NULL參數
-------13.2.3 描述PreparedStatement的輸出和輸入
-------13.2.4 執行PreparedStatement
-------------13.2.4.1 返回ResultSet對象
-------------13.2.4.2 返回影響行數
-------------13.2.4.3 使用execute方法
---13.3 CallableStatement接口
-------13.3.1 創建CallableStatement對象
-------13.3.2 參數設置
-------------13.3.2.1 IN參數
-------------13.3.2.2 OUT參數
-------------13.3.2.3 INOUT參數
-------13.3.3 執行CallableStatement
-------------13.3.3.1 返回單個ResultSet對象
-------------13.3.3.2 返回影響行數
-------------13.3.3.3 返回Unknown或多個結果
---13.4 轉義語法(Escape Syntax)
-------13.4.1 標量方法(Scalar Functions)
-------13.4.2 日期和時間字符串
-------13.4.3 外聯結(Outer Joins)
-------13.4.4 存儲過程
-------13.4.5 LIKE轉義符
---13.5 性能提示(Hints)
---13.6 獲取由數據庫自動生成的關鍵字
英文原文:
9. Transactions 53
9.1 Transaction Boundaries and Auto-commit 53
9.1.1 Disabling Auto-commit Mode 54
9.2 Transaction Isolation Levels 55
9.2.1 Using the setTransactionIsolation Method 56
9.2.2 Performance Considerations 56
9.3 Savepoints 57
9.3.1 Setting and Rolling Back to a Savepoint 57
9.3.2 Releasing a Savepoint 58
10. Connections 59
10.1 Types of Drivers 60
10.2 The Driver Interface 60
10.2.1 Loading a driver that implements java.sql.Driver 61
10.3 The DriverManager Class 61
10.3.1 The SQLPermission Class 63
10.4 The DataSource Interface 63
10.4.1 DataSource Properties 64
10.4.2 The JNDI API and Application Portability 65
10.4.3 Getting a Connection with a DataSource Object 66
11. Connection Pooling 67
11.1 ConnectionPoolDataSource and PooledConnection 69
11.2 Connection Events 70
11.3 Connection Pooling in a Three-tier Environment 71
11.4 DataSource Implementations and Connection Pooling 72
11.5 Deployment 74
11.6 Reuse of Statements by Pooled Connections 75
11.6.1 Using a Pooled Statement 76
11.6.2 Closing a Pooled Statement 77
11.7 ConnectionPoolDataSource Properties 78
12. Distributed Transactions 81
12.1 Infrastructure 81
12.2 XADataSource and XAConnection 84
12.2.1 Deploying an XADataSource Object 85
12.2.2 Getting a Connection 86
12.3 XAResource 86
12.4 Transaction Management 87
12.4.1 Two-phase Commit 88
12.5 Closing the Connection 90
12.6 Limitations of the XAResource Interface 90
13. Statements 93
13.1 The Statement Interface 93
13.1.1 Creating Statements 93
13.1.1.1 Setting ResultSet Characteristics 94
13.1.2 Executing Statement Objects 94
13.1.2.1 Returning a ResultSet object 95
13.1.2.2 Returning an Update Count 95
13.1.2.3 Using the Method execute 95
13.1.3 Closing Statement Objects 96
13.2 The PreparedStatement Interface 97
13.2.1 Creating a PreparedStatement Object 97
13.2.1.1 Setting ResultSet Characteristics 97
13.2.2 Setting Parameters 98
13.2.2.1 Type Conversions 98
13.2.2.2 National Character Set Conversions 99
13.2.2.3 Type Conversions Using the Method setObject 99
13.2.2.4 Setting NULL Parameters 100
13.2.3 Describing Outputs and Inputs of a PreparedStatement
Object 101
13.2.4 Executing a PreparedStatement Object 102
13.2.4.1 Returning a ResultSet Object 102
13.2.4.2 Returning a Row Count 102
13.2.4.3 Using the Method execute 103
13.3 The CallableStatement Interface 103
13.3.1 Creating a CallableStatement Object 104
13.3.2 Setting Parameters 104
13.3.2.1 IN Parameters 105
13.3.2.2 OUT Parameters 105
13.3.2.3 INOUT Parameters 106
13.3.3 Executing a CallableStatement Object 106
13.3.3.1 Returning a Single ResultSet Object 107
13.3.3.2 Returning a Row Count 107
13.3.3.3 Returning Unknown or Multiple Results 107
13.4 Escape Syntax 109
13.4.1 Scalar Functions 110
13.4.2 Date and Time Literals 111
13.4.3 Outer Joins 111
13.4.4 Stored Procedures 112
13.4.5 LIKE Escape Characters 113
13.5 Performance Hints 113
13.6 Retrieving Auto Generated Keys 113
歡迎提出修改意見