Understanding EclipseLink,
2.6
Contents
List of Examples
Title and Copyright Information
Preface
Audience
Related Documents
Conventions
1
Overview of EclipseLink
Understanding EclipseLink
What Is the Object-Persistence Impedance Mismatch?
The EclipseLink Solution
Key Features
Key Concepts
EclipseLink Metadata
Entities
Descriptors
Mappings
Data Access
Caching
Queries
Expression Framework
NoSQL Databases
Performance Monitoring and Profiling
Key Components
EclipseLink Core and API
Object-Relational (JPA 2.1) Component
JAXB Component
MOXy Component
SDO Component
Database Web Services Component
Key Tools
Oracle JDeveloper
Eclipse
NetBeans
2
Understanding Object-Relational and MOXy Internals
About Metadata
Advantages of the Metadata Architecture
Creating Project Metadata
Entity Mappings
Data Source Login Information
Creating Session Metadata
About the Object-Relational Solution
Understanding Object-Relational Entity Architecture
Entities
Persistence and Persistence Units
Entity Managers
Adding Metadata Using Annotations
Advantages and Disadvantages of Using Annotations
About Configuration Basics
Default Annotation Values
Configuring Persistence Units Using persistence.xml
Object-Relational Data Type Mappings
About Data Sources
About EclipseLink Caches
Defining Cache Behavior
Caching in Clustered Environments
About Database Queries
About the MOXy Solution
Using EclipseLink MOXy as the JAXB Provider
Understanding MOXy Architecture
JAXB Contexts and JAXB Context Factories
Serving Metadata for MOXy
About XML Bindings
Querying Objects by XPath
3
Understanding the Persistence Unit
About the Persistence Unit
About the Persistence Unit Name
About the Persistence Provider
About the Transaction Type Data Source
About Logging
About Vendor Properties
About Mapping Files
About Managed Classes
About the Deployment Classpath
About Persistence Unit Packaging Options
About the Persistence Unit Scope
About Composite Persistence Units
Building and Using the Persistence Layer
Implementation Options
Using EclipseLink JPA Metatdata, Annotations, and XML
Using EclipseLink Metadata Java API
Using Method and Direct Field Access
Using Java Byte-code Weaving
Persistent Class Requirements
Persistence Layer Components
Mapping Metadata
Cache
Queries and Expressions
About Persisting Objects
Application Object Model
Data Storage Schema
Primary Keys and Object Identity
Mappings
Foreign Keys and Object Relationships
Inheritance
Concurrency
Caching
Nonintrusive Persistence
Indirection
Mutability
Migrating Applications to the EclipseLink Persistence Manager
About Weaving
Using Dynamic Weaving
Using Static Weaving
Weaving POJO Classes
Weaving and Java EE Application Servers
Disabling Weaving with Persistence Unit Properties
4
Understanding Entities
Identifying Entities
Entities and Persistent Identity
Entities and Database Tables
Entities and Inheritance
Entities and Embedded Objects
Entities and Sequence Generation
Entities and Locking
Extensible Entities
5
Understanding Descriptors
Common Descriptor Concepts
Descriptor Architecture
Descriptors and Inheritance
Specifying a Class Indicator
Inheritance and Primary Keys
Single and Multi-Table Inheritance
Aggregate and Composite Descriptors and Inheritance
Descriptors and Aggregation
Descriptor Customization
Amendment Methods
Descriptor Event Manager
Object-Relational Descriptor Concepts
Fetch Groups
AttributeGroup Types and Operations
FetchGroup
Default FetchGroup
Named FetchGroup
Full FetchGroup
Load/LoadAll with FetchGroup
LoadGroup
CopyGroup
Merging
Descriptor Query Manager
Descriptors and Sequencing
Descriptors and Locking
Optimistic Version Locking Policies
Pessimistic Locking Policies
Applying Locking in an Application
Descriptor Files
Using orm.xml for Object-Relational Mappings
Using eclipselink-orm.xml for EclipseLink Object-Relational Mappings
Overriding and Merging Mapping Information
Validating the XML Schema
Advantages and Disadvantages of Using XML
Using eclipselink-oxm.xml for EclipseLink MOXy Mappings
6
Understanding Mappings
Common Mapping Concepts
Mapping Architecture
Mapping Examples
Mapping Converters
Serialized Object Converter
Type Conversion Converter
Object Type Converter
Transformation Mapping
Object-Relational Mapping Concepts
Indirection (Lazy Loading)
Indirection, Serialization, and Detachment
Value Holder Indirection
Transparent Indirection
Proxy Indirection
Proxy Indirection Restrictions
Weaved Indirection
About JPA Mapping Types
Basic Mappings
Default Conversions and Converters
Collection Mappings
Using Optimistic Locking
MOXy Mapping Concepts
Understanding an XML Data Representation
Mapping Values
Object-JSON Mapping Concepts
7
Understanding Data Access
About Externally Managed Transactional Data Sources
About Data Source Login Types
About Data Source Platform Types
About Authentication
Simple JDBC Authentication
Oracle Database Proxy Authentication
Auditing
About Connections
About Connection Pools
Internal Connection Pools
External Connection Pools
Default (Write) and Read Connection Pools
Sequence Connection Pools
Application-Specific Connection Pools
About Data Partitioning Policies
About Tenant Isolation
Single Table Multi-Tenancy
Table-Per-Tenant Multi-Tenancy
VPD Multi-Tenancy
About Heterogeneous Batch Writing
8
Understanding Caching
About Cache Architecture
Persistence Unit Cache
Persistence Context Cache
Application Managed Persistence Contexts
Container Managed Persistence Contexts
Shared, Isolated, Protected, Weak, and Read-only Caches
Isolated Cache
Shared Cache
Protected Cache
Weak Reference Mode
Read-Only Entities
About Cache Type and Size
FULL Cache Type
WEAK Cache Type
SOFT Cache Type
SOFT_WEAK and HARD_WEAK Cache Type
NONE and CACHE
Guidelines for Configuring the Cache and Identity Maps
About the Internals of Weak, Soft, and Hard Cache Types
About Queries and the Cache
About Query Cache Options and In-memory Querying
About Handling Stale Data
Configuring a Locking Policy
Optimistic Locking
Pessimistic Locking
Configuring the Cache on a Per-Class Basis
Forcing a Cache Refresh when Required on a Per-Query Basis
Configuring Cache Invalidation
Configuring Cache Coordination
About Explicit Query Refreshes
About Cache Indexes
Database Event Notification and Oracle CQN
Oracle Continuous Query Notification
About Query Results Cache
About Cache Coordination
When to Use Cache Coordination
Clustering and Cache Coordination
Coordinating JMS and RMI Caches
Coordinating Custom Caches
Clustering and Cache Consistency
Cache Interceptors
9
Understanding Queries
Query Concepts
Call Objects
DatabaseQuery Objects
Data-Level and Object-Level Queries
Summary Queries
Descriptor Query Manager
Query Keys
About JPQL Queries
EclipseLink Extensions to JPQL
EclipseLink Special Operators in JPQL
About SQL Query Language
Stored Procedures
EclipseLink Extensions to Stored Procedures
About the Criteria API
EclipseLink Extensions to the Criteria API
About Native SQL Queries
EclipseLink Extensions to Native Query Support
About Query Hints
JPA Cache Query Hints
EclipseLink Extensions to Cache Query Hints
About Query Casting
EclipseLink Expression Support for Downcasting
About Oracle Extensions for Queries
Query Hints
Hierarchical Queries
Flashback Queries
Stored Functions
10
Understanding EclipseLink Expressions
About the Expression Framework
About Expression Components
Boolean Logic
Database Functions and Operators
Oracle XMLType Functions
Platform and User-Defined Functions
Expressions for One-to-One and Aggregate Object Relationships
Expressions for Joining and Complex Relationships
About Joins
Using EclipseLink Expression API for Joins
11
Understanding Non-relational Data Sources
NoSQL Platform Concepts
About NoSQL Persistence Units
Persistence Unit Properties for NoSQL Platforms
About JPA Applications on the NoSQL Platform
Mapping Restrictions on JPA Annotations
About Mapping NoSQL Objects
About Queries and the NoSQL Platform
About Transactions and the NoSQL Platform
A
Database and Application Server Support
Database Support
Application Server Support
EclipseLink MOXy as the JAXB Provider for Application Servers
Non-SQL Standard Database Support: NoSQL
Copyright © 2012 by The Eclipse Foundation under the
Eclipse Public License (EPL)