Skip Headers
Oracle® Fusion Middleware Integration Guide for Oracle TopLink with Coherence Gird
11g Release 1 (11.1.1)

Part Number E16596-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF


This section includes information on the following:

Wrapping and Unwrapping

When storing Entities with relationships in the Coherence cache, TopLink Grid generates a wrapper class that maintains the relationship information. In this way, when the object is read from the Coherence cache (eager or lazy), the relationship can be resolved.

If you read Entities directly from the Coherence cache using the Coherence API, the wrappers are not automatically removed. You must configure automatic unwrapping on a get in your code or by setting the property on the serializer, as shown in Example 16. You can also set the system property as eclipselink.coherence.not-eclipselink to automatically unwrap an entity.

When configured properly, the read will return the wrapped Entity.

Example 16 Unwrapping an Entity

WrapperSerializer wrapperSerializer = (WrapperSerializer)myCache.getCacheService().getSerializer();
wrapperSerializer.setNotEclipseLink(true); // to let the Serializer know it needs to unwrap when clients get() from the cache