This feature is to look at caching the metadata project so that the setup can avoid costs associated with reading in multiple orm.xml and annotation processing on entities within a persistence unit to rebuild it unnecessarily.

This feature is to look at caching the metadata project so that the setup can avoid costs associated with reading in multiple orm.xml and annotation processing on entities within a persistence unit to rebuild it unnecessarily.

−

== Requirements ==

+

== Requirements ==

−

# EntityManagerFactory and EntityManager instance creation use properties that allow overriding metadata settings/properties the same as it would if project caching was not used

+

#EntityManagerFactory and EntityManager instance creation use properties that allow overriding metadata settings/properties the same as it would if project caching was not used

−

# Project caching must allow weaving to happen

+

#Project caching must allow weaving to happen

−

# It must be configurable to allow alternate implementations to cache the project differently

+

#It must be configurable to allow alternate implementations to cache the project differently

−

# The project will be read from/writen to the cache prior to login, prior to converting String ClassNames into Classes.

+

#The project will be read from/writen to the cache prior to login, prior to converting String ClassNames into Classes.

−

== Design ==

+

== Design ==

+

=== PersistenceUnitProperties ===

−

=== PersistenceUnitProperties ===

+

public static final String PROJECT_CACHE_ACCESSOR = "eclipselink.project-cache-accessor"; will be the base property to configure this feature, and will take a string value representing shipped implementations or the a &lt;package.class&gt; name of a subclass implementation of the ProjectCache interface. By default a project cache accessor will not be used.

The "eclipselink.project-cache-accessor.&lt;implementationShortName&gt;" subset of properties will be used for implementation specific properties.

−

will be the base property to configure this feature, and will take a string value representing shipped implementations or the a <package.class> name of a subclass implementation of the ProjectCache interface. By default a project cache accessor will not be used.

+

−

The "eclipselink.project-cache-accessor.<implementationShortName>" subset of properties will be used for implementation specific properties.

This feature will include a ProjectCacheAccessor implementation that uses java serialization to read to/write from a file which can be used by specifying the PROJECT_CACHE_ACCESSOR property with a value of "java-serialization"

+

This feature will include a ProjectCacheAccessor implementation that uses java serialization to read to/write from a file which can be used by specifying the PROJECT_CACHE_ACCESSOR property with a value of "java-serialization" This implementation will also require the file location be specified, and will rely on a "eclipselink.project-cache-accessor.java-serialization.file" property being defined.

−

This implementation will also require the file location be specified, and will rely on a "eclipselink.project-cache-accessor.java-serialization.file" property being defined.

+

Revision as of 16:03, 23 May 2012

Contents

EclipseLink Metadata Cache

Purpose

This feature is to look at caching the metadata project so that the setup can avoid costs associated with reading in multiple orm.xml and annotation processing on entities within a persistence unit to rebuild it unnecessarily.

Requirements

EntityManagerFactory and EntityManager instance creation use properties that allow overriding metadata settings/properties the same as it would if project caching was not used

Project caching must allow weaving to happen

It must be configurable to allow alternate implementations to cache the project differently

The project will be read from/writen to the cache prior to login, prior to converting String ClassNames into Classes.

Design

PersistenceUnitProperties

public static final String PROJECT_CACHE_ACCESSOR = "eclipselink.project-cache-accessor"; will be the base property to configure this feature, and will take a string value representing shipped implementations or the a <package.class> name of a subclass implementation of the ProjectCache interface. By default a project cache accessor will not be used.

The "eclipselink.project-cache-accessor.<implementationShortName>" subset of properties will be used for implementation specific properties.

Interface

Included Implementation

This feature will include a ProjectCacheAccessor implementation that uses java serialization to read to/write from a file which can be used by specifying the PROJECT_CACHE_ACCESSOR property with a value of "java-serialization" This implementation will also require the file location be specified, and will rely on a "eclipselink.project-cache-accessor.java-serialization.file" property being defined.