Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/Examples/JPA/Ehcache
< EclipseLink | Examples | JPA
Revision as of 10:31, 17 June 2010 by Unnamed Poltroon (Talk) (EclipseLink/Examples/JPA/Terracotta moved to EclipseLink/Examples/JPA/Ehcache: All open source)
Integrating EclipseLink with Terracotta Network Attached Memory
DISCLAIMER: This page reflects investigation into how EclipseLink users can integrate with Terracotta ehcache. It does NOT imply any formal certification that EclipseLink supports the Terracotta API at this time.
Contents
Purpose
- Integration of EclipseLink EclipseLink with the Ehcache Distributed Cache - a (L2) shared cache.
- This investigation is specific to Ehcache. See the following page for Oracle TopLink Grid (Coherence based distributed shared (L2) cache) that currently integrates with EclipseLink.
Summary
- This document in progress as of 20100326 details how to integrate EclipseLink with Ehcache. We will explore both the Ehcache open source version as well as the commercial Terracotta Inc. version - (via a TIM - Terracotta Integration Module) into the Terracotta Inc. Network Attached Memory (Distributed JVM-aware transparent Cache).
- The goal of this investigation is to define and publish a procedure on using EclipseLink as the JPA provider in a distributed memory application based on Terracotta Inc. Caching API.
- The motivation of this work is in learning and leveraging 'ehcache from Terracotta Inc. and details/issues of the technical space surrounding distributing caching in general as described in the paper on the new Java5 memory model by William Pugh - The Java Memory Model.
- I am interested in the following...
- Use as a JVM bridge, or JVM agnostic application (IE: Mixed J9, SUN, JRockit implementations)
- Q) If orm relationships are computed, then how to override outside of using @OneToMany(mappedBy="") annotation and differentiate between unidirectional and bidirectional 1:M relationships.
Setup
Tutorial Source
Development Environment
- We will be using a cluster of 3 identical machines (Low power P4-630 CPU's) running 32 bit versions of the SUN JDK 1.6.0_18
Prerequisites
- We will attempt to keep all software open-source if possible.
Setup Cluster
- We are using 3 P4-630 32 bit machines and 1 Corei7 64 bit machine.
Install Eclipse EE
- We are using Eclipse 3.5 Galileo EE edition (32 bit).
Install a Database
- We will start with Derby 10 but possibly use MySQL if we run into any limitations.
Install Application Servers
- We will use GlassFish V3 Final Open Source Edition (the JEE6 RI). See the JPA tutorial for GlassFish V3 for a quickstart run.
Install JPA provider
- We will be using EclipseLink 2.0 (the JEE6 RI) that is shipped with GlassFish.
Install Terracotta
- Download Terracotta 3.2.1 open source version or use your own enterprise version of Terracotta
- I installed to c:/opt/terracotta321 by running the executable terracotta-3.2.1-installer.jar.
- Follow instructions in INSTALL.TXT.
Hello World Testing
- Start the local Terracotta server by running bin/start-tc-server.bat.
- You should see the following screen...
Design Issues
Open Issues
References
- Oracle TopLink Grid - A Coherence based distributed shared (L2) cache that integrates with EclipseLink JPA
- Terracotta + GlassFish + EclipseLink
- Terracotta Inc. Discussion Forum
- Terracotta forum post - integration request 20080812 3rd level Cache
- Terracotta forum post - integration request 20090518 TIM
- Terracotta forum post - integration request 20090614 Spring EclipseLink
- Terracotta forum post - integration request 20090616 Custom ClassLoader
- Eclipselink coordinated cache integration - 20081221 New TIM (Terracotta Integration Module)
- EclipseLink coordinated cache integration with Terracotta 20081221 - request
- See Chapter 6 p.131 of "Terracotta - Cluster the JVM for Spring, Hibernate and POJO Scalability" - available from Apress.