Skip Headers

Table of Contents Image Oracle9iAS TopLink Foundation Library Guide
Release 2 (9.0.3)

Part Number B10064-01
Go To Documentation Library
Home
Go To Solution Area
Solution Area
Go To Index
Index

Go to next page

Contents

Title and Copyright Information

Send Us Your Comments

Preface

1 Working with Database Sessions

Understanding Database sessions
DatabaseSession class
Creating a database session
Registering TopLink Mapping Workbench descriptors with a session
Registering Java descriptors with a session
Registering descriptors after login
Connecting to the database
Database interaction
Caching objects
Logging out of the database
Logging SQL and messages
Profiler
Integrity checker
Exception handlers
JTS and external transaction controllers
Creating database sessions: examples
Reference
Using the Conversion Manager
Creating custom types with the Conversion Manager
Assigning custom classes to a TopLink session
The Conversion Manager class loader
Resolving class loader exceptions
Database login information
Creating a login object
Specifying database and driver information
Using the Sun JDBC-ODBC bridge
Using a different driver
Setting login parameters
Table Creator/Qualifier
Native SQL
Sequence number parameters
Binding and parameterized SQL
Batch writing
Data optimization
Cache isolation
Manual transactions
External transactions and connection pooling
Other database connections
Direct connect drivers
Using JDBC 2.0 data sources
Custom database connections
Building database logins: examples
Reference
Using the query framework
Session queries
Query objects
Custom SQL queries
Database exceptions
Querying on an inheritance hierarchy
Querying on interfaces
Using session queries
Reading objects from the database
Read operation
Read all operation
Refresh operation
Using expression builder
Using query by example
Writing objects to the database
Writing a single object to the database
Writing all objects to the database
Adding new objects to the database
Modifying existing objects in the database
Deleting objects in the database
Writing objects: Examples
Using transactions
Transaction operations
Nesting transactions
Implementing a transaction in Java code
Using units of work
Understanding the unit of work
Creating a unit of work
Registering existing objects with a unit of work
Reading objects using a unit of work
Creating new objects in a unit of work
Writing objects using a unit of work
Deleting objects through a unit of work
Resuming a unit of work
Reverting a unit of work
Executing queries from the unit of work
Nested and parallel units of work
Inside a unit of work
Advanced features
Read-only classes
Read-Only descriptors
Always Conform Descriptors
Merging
Validation
Troubleshooting the unit of work
Examples of units of work
Reference
Working with locking policies
Using optimistic lock
Advantages and disadvantages
Version locking policies
Field locking policies
Java implementation of optimistic locking
Advanced optimistic locking policies
Using optimistic read lock
Working with version fields
Pessimistic locking
Advantages and disadvantages
Reference
Session event manager
Session events
Using the session event manager: examples
Reference
Query objects
Query object components
Query types
Creating query objects
Executing queries
Query timeout
Read query objects
Parameterized SQL
Ordering for read all queries
Specifying the collection class
Using cursoring for a ReadAllQuery
Query optimization
Query return maximum rows
Partial object reading
Refreshing the identity map cache during a read query
In-memory querying and unit of work conforming
Conforming results in a unit of work
Handling exceptions resulting from in-memory queries
Disabling the identity map cache update during a read query
Internal query object caches
Write query objects
Non-cascading write queries
Disabling the identity map cache during a write query
Using query objects to customize the default database operations
Creating custom query operations
Using Query Redirectors
Reference
Query by example
Defining a sample instance
Defining a query by example policy
Combining query by example with expressions
Reference
Report query
Reference
Cursored streams and scrollable cursors
Java streams
Supporting streams
Using cursored streams and scrollable cursors: examples
Optimizing streams
Java iterators
Supporting scrollable cursor
Traversing scrollable cursors
SQL and stored procedure call queries
SQL Queries
Data-level queries
Stored procedure calls
Output parameters
Cursor output parameters
Output parameter event
Reference

2 Developing Enterprise Applications

Three-tier and enterprise applications
Client and server sessions
Client sessions
Server sessions
Caching database information on the server
Providing client read access
Providing client write access
Concurrency
Connection pooling
ServerSession connection options
Connection options
ClientSession connection options
Connection policies
Reference
Remote sessions
Architectural overview
Application layer
Transport layer
Server layer
Accessibility issues
Queries
Refreshing
Indirection
Cursored streams
Unit of work
Creating a remote connection using RMIConnection
Session broker
Two-phase/two-stage commits
Using the session broker
Using the session broker in a three-tier architecture
Creating multiple projects in the Mapping Workbench
Limitations
Advanced use
Reference
Java Transaction Service (JTS)
Review of transactions and transaction management
Distributed transactions
Transaction managers
Two-phase commit with presumed rollback
Relationship between OMG Object Transaction Service (OTS) and
Java Transaction Service (JTS)
JTS transaction synchronization
TopLink unit of work and the synchronization interface
Writing to a database in three-tier environment
External connection pools and external transaction control
Extending TopLink's JTS capabilities
TopLink support for Java Data Objects (JDO)
Understanding the JDO API
JDO implementation
JDOPersistenceManagerFactory
JDOPersistenceManager
JDOQuery
JDOTransaction
Running the TopLink JDO demo
Distributed Cache Synchronization
Controlling the sessions: the Cache Synchronization Manager
Using Cache Synchronization Manager options
Using a clustering service
Configuring cache synchronization
Connecting the sessions
Using Java Messaging Service
Preparing to use JMS
Setting up JMS in the session configuration file
Setting up JMS in Java

3 Working with Enterprise JavaBeans

The EJB specification
Additional information
Using the session bean model
Session beans and DatabaseSessions
Interactions with JTS
Using session beans with TopLink's three-tier application model
Using the Session Manager
Retrieving a session from a SessionManager
Using the default configuration file: sessions.xml
Using the XMLLoader
Using the entity bean model
TopLink and container-managed persistent entity beans

4 EJBQL Support

Why use EJBQL?
EJBQL structure
Basic structure
The FROM clause
The FROM clause defined
Using the FROM clause: a few examples
The SELECT clause
Using the SELECT clause: a few examples
The WHERE clause
Using constants
Comparison Operators
Logical operators
Null Comparison Expressions: Null
Range Expressions
Functional Expressions
Input Parameters
Combining Clauses
Multiple clauses: a few examples
Using EJBQL with TopLink
ReadAllQuery
Session

5 SDK for XML and Non-relational Database Access

Using the TopLink SDK
Accessor
Data Store Connection
Call Execution
Transaction Processing
Calls
Read Object Call
Read All Call
Insert Call
Update Call
Delete Call
Does Exist Call
Custom Call
Database Row
FieldTranslator
SDKDataStoreException
Descriptors and Mappings
SDKDescriptor
Standard mappings
SDK Mappings
Sessions
SDKPlatform
SDKLogin
TopLink Project
Session
Unsupported features
Using TopLink XML support
Getting Started
Configure your Login using an XMLFileLogin.
Build your Project.
Build your Descriptors using XMLDescriptors.
Build your Mappings
Build your DatabaseSession and log in.
Build your sequences, if necessary.
Use the Session
Customizations
Implementation details
XMLFileAccessor
XMLAccessor implementation
Directory creation
XMLCall
XMLStreamPolicy
XMLTranslator
XMLTranslator implementations
XMLDescriptor
XMLPlatform
XMLFileLogin
XMLSchemaManager
XMLAccessor
XMLTranslator
DefaultXMLTranslator
SDKAggregateObjectMapping
SDKDirectCollectionMapping
XML Zip File Extension
Using the Zip file extension
Configure direct file access with Zip File extension
Implementation details

6 Performance Optimization

Basic performance optimization
TopLink reading optimization features
Reading Case 1: Displaying names in a list - optimized through partial object reading and report query
Partial object reading
Conclusion
Reading Case 2: Batch reading objects
Conclusion
Reading Case 3: Using complex custom SQL queries
Reading Case 4: Viewing objects
TopLink writing optimization features
Writing Case 1: Batch writes
Batching and cursoring
Sequence number pre-allocation
Batch writing
Parameterized SQL
Multi-processing
Optimization check list
Schema optimization
Schema Case 1: Aggregation of two tables into one
Domain
Schema Case 2: Splitting one table into many
Domain
Schema Case 3: Collapsed hierarchy
Domain
Schema Case 4: Choosing one out of many
Domain

7 Mapping Implementation

Direct mappings
Direct-to-field mappings
Reference
Type conversion mappings
Reference
Object type mappings
Reference
Serialized object mappings
Reference
Transformation mappings
Implementing transformation mappings in Java
Reference
Relationship mappings
Aggregate object mappings
Reference
One-to-one mappings
Reference
Variable one-to-one mappings
Reference
Direct collection mappings
Reference
Aggregate collections
When to use aggregate collections
Aggregate collections and inheritance
Java implementation
Reference
Direct map mappings
Reference
One-to-many mappings
Reference
Many-to-many mappings
Reference
Object relational mappings
Array mappings
Implementing array mappings in Java
Reference
Object array mappings
Implementing object array mappings in Java
Reference
Structure mappings
Implementing structure mappings in Java
Reference
Reference mappings
Implementing reference mappings in Java
Reference
Nested table mappings
Implementing nested table mappings in Java
Reference

8 Descriptor Implementation

Implementing primary keys in Java
Implementing inheritance in Java
Reference
Implementing interfaces in Java
Setting the copy policy using Java
Implementing multiple tables in Java code
Primary keys match
Primary keys are named differently
Tables related by foreign key relationships
Non-standard table relationships
Implementing sequence numbers in Java
Overriding the instantiation policy using Java code
Implementing locking in Java
Implementing identity maps in Java
Implementing query keys in Java
Implementing indirection in Java
Implementing proxy indirection in Java
Implementing object-relational descriptors in Java
Changing Java classes to use indirection
Setting the wrapper policy using Java code
Implementing events using Java
Registering event listeners
Reference

A Sessions.xml DTD

sessions.xml dtd

B TopLink Development Tools

The Schema Manager
Using the Schema Manager to create tables
Creating a table definition
Adding fields to a table definition
Defining Sybase and SQL Server sequence numbers
Example of table definition
Creating tables on the database
Creating the sequence table
Using the Schema Manager to manage Java and database type conversions
Session management services
RuntimeServices
DevelopmentServices
Using session management services
The stored procedure generator
Generation of stored procedures
Attaching the stored procedures to the descriptors
The Session Console
Requirements
Using session console features
Launching the session console from code
The Performance Profiler
Using the profiler
Browsing the profiler results

C TopLink Session Configuration File

Contents of the sessions.xml file
Converting from TOPLink.properties file to sessions.xml

D EJBQL Syntax

About Backus Naur Form
EJBQL language definition

Index


Go to next page
Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Solution Area
Solution Area
Go To Index
Index