Java Data Access: JDBC, JNDI, and JAXP

Free Download

Authors:

ISBN: 0764548648

Size: 3 MB (2672994 bytes)

Pages: 389/389

File format:

Language:

Publishing Year:

Category: Tags: , ,

Thomas T.M.0764548648

This hands–on guide shows Java developers how to access data with the new 3.0 Java Database Connectivity (JDBC) API, use LDAP–enabled directory services with Java Network Directory Services (JNDI), and manipulate XML data using Java APIs for XML Processing (JAXP).
Pick up this book to acquire the skills needed to effectively create Java applications that can access a variety of data sources. Learn the basics of JDBC 3.0 and how it relates to the Java programming language as a whole. Then from this base, build your knowledge by reading about common advanced uses such as connection pooling, JSP implementations, and Enterprise JavaBeans. You will also gain an awareness of several object oriented design patterns for implementing JDBC solutions, and gain a knowledge of JNDI and how to use it to store and retrieve data using LDAP.

Table of contents :
Java Data Access—JDBC, JNDI, and JAXP……Page 2
Table of Contents……Page 6
Part I: Getting Started with Java Data Access……Page 13
Taking Stock of Enterprise Data Stores……Page 14
Database systems……Page 16
Naming and directory services……Page 17
Introducing Java Data Access Technologies……Page 18
JDBC 3.0……Page 19
JNDI……Page 20
JDO……Page 21
Summary……Page 22
The RDBMS in a Nutshell……Page 24
Understanding data storage……Page 26
Ensuring data integrity……Page 27
Reviewing SQL Basics……Page 31
Using Data Manipulation Language (DML)……Page 32
Using Data Definition Language (DDL)……Page 37
Summary……Page 40
Part II: Understanding JDBC Programming Basics……Page 41
Configuring JDBC……Page 42
Installing the JDBC driver……Page 43
Examining the Common JDBC Components……Page 44
Creating the sample application……Page 45
Compiling and running the application……Page 53
Troubleshooting the sample application……Page 54
Summary……Page 55
Understanding JDBC Drivers……Page 56
What are JDBC drivers?……Page 58
Using your JDBC driver……Page 61
Understanding JDBC URLs……Page 65
Opening connections……Page 66
Closing JDBC connections……Page 69
Summary……Page 70
Using JDBC Statements……Page 71
Introducing Statement Objects……Page 72
Using the Statement object……Page 73
JDBC batch processing……Page 82
JDBC transactions……Page 84
Working with PreparedStatement Objects……Page 88
Using the PreparedStatement object……Page 89
Creating the CallableStatement object……Page 95
Using the CallableStatement object……Page 96
Summary……Page 99
What Are JDBC Result Sets?……Page 100
Result set cursors……Page 101
Result set types……Page 102
Retrieving result set data……Page 103
Creating a standard result set……Page 105
Moving data around in a standard result set……Page 106
Using Scrollable Result Sets……Page 108
Creating scrollable result sets……Page 109
Moving around scrollable result sets……Page 110
Using Updateable Result Sets……Page 115
Creating updateable result sets……Page 116
Updating data with updateable result set……Page 117
Inserting and deleting data with updateable result sets……Page 120
Summary……Page 121
Java, Databases, and Data Types……Page 122
Java-to-JDBC Data-Type Mappings……Page 123
Standard SQL data types……Page 126
Advanced SQL data types……Page 130
Building custom data type maps……Page 140
Using custom mapping……Page 143
Summary……Page 145
The JDBC Metadata Interfaces……Page 146
Using ResultSetMetaData objects……Page 147
ResultSetMetaData example……Page 148
The DatabaseMetaData Interface……Page 152
Using DatabaseMetaData objects……Page 153
DatabaseMetaData example……Page 156
Summary……Page 161
Part III: Using Java Data Access Design Patterns……Page 162
What Are Design Patterns?……Page 163
Creational patterns……Page 164
Behavioral patterns……Page 166
Inheritance……Page 168
Composition……Page 171
Design-pattern implementation guidelines……Page 173
Summary……Page 174
What Is a Singleton Pattern?……Page 175
Structure of the Singleton Pattern……Page 176
Basic Singleton example……Page 177
Connection manager Singleton example……Page 180
Summary……Page 184
What Is the Factory Method Pattern?……Page 186
Introducing the Factory Method Structure……Page 187
Using the Factory Method……Page 188
Summary……Page 199
What Is the Façade Pattern?……Page 200
Implementing the Façade Pattern……Page 201
Summary……Page 214
Part IV: Taking It to the Enterprise……Page 215
Naming and Directory Services……Page 216
Naming services……Page 217
Directory services……Page 218
Data Access with JNDI……Page 220
JNDI architecture……Page 221
JNDI programming……Page 223
Working with the JNDI LDAP SPI……Page 226
Summary……Page 235
Working with Java DataSource Objects……Page 236
Using DataSource objects……Page 237
Looking at DataSource implementations……Page 238
A DataSource example……Page 239
Using DataSource objects with JNDI……Page 240
Implementing Connection Pooling……Page 243
A connection-pooling example……Page 244
Summary……Page 246
Transaction definition and properties……Page 247
Transaction-processing performance and availability……Page 248
Replication……Page 249
Understanding the Transaction Monitor……Page 250
Understanding the Transaction Service……Page 251
Distributed Transactions and Java……Page 254
EIS and EAI……Page 255
JTS and JTA……Page 256
EJBs……Page 257
Summary……Page 259
Introducing JDBC Rowsets……Page 260
Rowset implementations……Page 261
Examining the rowset architecture……Page 262
Working with RowSet Objects……Page 263
Configuring rowset events……Page 265
Setting rowset connection properties……Page 266
Executing SQL commands using rowsets……Page 267
Traversing data in a rowset……Page 268
Setting transaction levels……Page 269
Using the JdbcRowSet Class……Page 270
Using the CachedRowSet Class……Page 272
Serializing a CachedRowSet object……Page 273
Updating and inserting disconnected rowset data……Page 276
Using the WebRowSet Class……Page 277
Summary……Page 281
Reviewing Enterprise Web Applications……Page 283
Two-tier Web architecture……Page 284
Three-tier Web architecture……Page 285
n-tier Web architecture……Page 286
J2EE enterprise application framework……Page 287
Servlet overview……Page 288
Constructing a JDBC servlet……Page 289
Server deployment……Page 295
Design considerations……Page 296
JSP overview……Page 298
Constructing a JSP page……Page 299
Using JDBC in JSP pages……Page 302
Using JSP with JDBC JavaBeans……Page 311
Summary……Page 318
What is XML?……Page 319
Namespaces……Page 320
Document Type Definitions and XML Schemas……Page 321
XML Databases……Page 322
Parsing XML: The Simple API for XML (SAX)……Page 324
Traversing XML: The Document Object Model (DOM)……Page 329
Transforming XML: XSLT……Page 333
Where to get the JAXP API……Page 335
Using JAXP……Page 336
Parsing XML with JAXP……Page 338
Traversing XML with JAXP……Page 340
Transforming XML with JAXP……Page 342
Summary……Page 343
Working with the EJB Tier……Page 344
Enterprise bean types……Page 345
The Parts of an EJB……Page 347
Session beans……Page 349
Entity beans……Page 353
Session beans……Page 360
Entity beans……Page 361
Object serialization……Page 362
Managed persistence……Page 363
Using Data Access Objects……Page 367
Transactions and EJBs……Page 368
Summary……Page 370
Transactions……Page 371
Connection Pooling……Page 372
Data Type Enhancements……Page 373
JVMs for Linux……Page 374
Relational Database Management Systems……Page 375
Object Database Management Systems……Page 376
Object-Relational Database Management Systems……Page 377
Appendix C: JDBC Error Handling……Page 378
SQLException……Page 379
SQLWarning……Page 381
DataTruncation……Page 383
Class……Page 385
Abstract class……Page 386
Association……Page 387
Aggregation……Page 388
Instantiation……Page 389

Reviews

There are no reviews yet.

Be the first to review “Java Data Access: JDBC, JNDI, and JAXP”
Shopping Cart
Scroll to Top