Understanding EclipseLink,
2.5
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
New Features
RESTful Services
Tenant Isolation
NoSQL
JSON
Database Change Notification
Extensible Entities
Composite Persistence Units
External Metadata Sources
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.0) Component
Object-XML (JAXB 2.2) Component
SDO Component
Database Web Services Component
Key Tools
Oracle JDeveloper
Eclipse
NetBeans
2
Understanding Mappings
About Object-Relational Mapping
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 Configuration Values
Configuring Persistence Units Using persistence.xml
Object-Relational Data Type Mappings
Overriding and Merging Mapping Information
Validating the XML Schema
Advantages and Disadvantages of Using XML
About Data Sources
About EclipseLink Caches
Defining Cache Behavior
Caching in Clustered Environments
About Database Queries
About Object-XML Mapping
Using EclipseLink Object-XML as the JAXB Provider
Understanding Object-XML Architecture
JAXB Contexts and JAXB Context Factories
Serving Metadata for Object-XML
About XML Bindings
Specifying EclipseLink Object-XML Mappings Using eclipselink-oxm.xml
About Object-XML Data Type Mappings
Querying Objects by XPath
3
Understanding Application Development
Typical Development Stages
Target Platforms
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 Application Deployment
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
About Metadata
Advantages of the Metadata Architecture
Creating Project Metadata
Descriptors and Mappings
Data Source Login Information
Creating Session Metadata
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
5
Understanding Application Deployment
Integrating with an Application Server
Software Requirements
Setting Security Permissions
Migrating Applications to the EclipseLink Persistence Manager
About the Persistence Unit
About the Persistence Unit Name
About the Transaction Type, Persistence Provider and Data Source
About Mapping Files
About Managed Classes
About Vendor Properties
About the Deployment Classpath
About Persistence Unit Packaging Options
About the Persistence Unit Scope
Integrating Clustering
6
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 and After-Load 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
Object-XML Descriptor Concepts
Default Root Element
Descriptor API
7
Understanding Mappings
Common Mapping Concepts
Mapping Architecture
Mapping Examples
Using Lazy Loading
Mapping Converters and Transformers
Serialized Object Converter
Type Conversion Converter
Object Type Converter
Transformation Mappings
Transformation Mapping
Object-Relational Mapping Concepts
Indirection (Lazy Loading)
Value Holder Indirection
Transparent Indirection
Proxy Indirection
Proxy Indirection Restrictions
Weaved Indirection
Indirection and JPA
Indirection, Serialization, and Detachment
Object-XML Mapping Concepts
Simple Type Translation
Default Read Conversions
Default Write Conversions
Object-JSON Mapping Concepts
About JPA Mapping Types
Basic Mappings
Default Conversions and Converters
Collection Mappings
One-to-Many Mapping
Many-to-Many Mapping
Using Optimistic Locking
Optimistic Locking in a Stateless Environment
Optimistic Version Locking
8
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 Clustered Databases and Oracle RAC
9
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_CACHE and HARD_CACHE 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 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
Refresh Policy
About Cache Expiration and Invalidation
Advanced Cache Invalidation
About Cache Indexes
About Query Results Cache
About Cache Locking and Transaction Isolation
About Cache Optimization
About Cache Coordination
When to Use Cache Coordination
Coordinated Cache Architecture and Types
JMS Coordinated Cache
RMI Coordinated Cache
Custom Coordinated Cache
Coordinated Cache and Clustering
Persistence Property Extensions for Cache Coordination
Cache Coordination and Oracle WebLogic
Cache Coordination and Glassfish
Cache Coordination and IBM WebSphere
10
Understanding Queries
Query Concepts
Call Objects
DatabaseQuery Objects
Data-Level and Object-Level Queries
Summary Queries
Descriptor Query Manager
EclipseLink Expressions
Query Keys
About JPQL Queries
Select Queries
SELECT Clause
FROM Clause
ORDER BY clause
GROUP BY Clause
HAVING Clause
UNION
WHERE Clause
Update Queries
Delete Queries
Parameters
Literals
Functions
EclipseLink Special Operators
EclipseLink Extensions
About SQL Query Language
About the Criteria API
CriteriaBuilder
CriteriaQuery
Where
Subquery
Parameters
Functions
Special Operations
Metamodel
Tuple Queries
JpaCriteriaBuilder and EclipseLink Extensions
About Native SQL Queries
Parameters
Named Native SQL Queries
SQL Result Set Mapping
About Advanced Native Query Support
About JPA Query Hints
About Query Casting
JPA 2.0 Type
Downcasting in JPQL
JPA Criteria API
EclipseLink Expression Support for Downcast
About Oracle Extensions for Queries
Query Hints
Hierarchical Queries
Flashback Queries
Stored Functions
11
Understanding EclipseLink Expressions
About the Expression Framework
Comparing Expressions to SQL
About Expression Components
Boolean Logic
Database Functions and Operators
Database Functions
Database Operators
Mathematical Functions
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
12
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
13
Understanding Performance Monitoring and Profiling
Performance Profiling
Fetch Group Monitoring
Performance Monitoring
Query Monitoring
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)