Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "EclipseLink/DesignDocs/219683"

(Functionality)
Line 18: Line 18:
 
= Project overview =
 
= Project overview =
  
This feature will introduce Interceptor interfaces that can be implemented by users to intercept certain internal EclipseLink component interactions.  This will include cache access, query execution, Call execution and others.
+
This feature will introduce Interceptor "interfaces" that can be implemented by users to intercept certain internal EclipseLink component interactions.  This will include cache access, query execution and others.
  
 
Goals:
 
Goals:
Line 26: Line 26:
 
= Concepts =
 
= Concepts =
 
===Interceptors===
 
===Interceptors===
Within TopLink logical operations like cache access or database writes flow naturally through different components.  If points of intercept were added at the logical points of delegation within the TopLink architecture these operations could be intercepted and augmented or redirected.  Developing these interception points and Interceptor interfaces increases the extensibility of TopLink beyond the scope of our current extensibility.  Our current extension points exist within the datasource access paradigm of TopLink limiting users to extensions within the confines of TopLink behaviours.  Interceptors provide the opportunity to extend the behaviour of TopLink beyond datasource access into data management.  Offering the potential for TopLink to access data, like in the case of Coherence, that is not datasource based.
+
Within EclipseLink logical operations like cache access or database writes flow naturally through different components.  If points of intercept were added at the logical points of delegation within the EclipseLink architecture these operations could be intercepted and augmented or redirected.  Developing these interception points and Interceptor interfaces increases the extensibility of EclipseLink beyond the scope of our current extensibility.   
  
 
= Requirements =
 
= Requirements =
  
The following sections will expand the goals of this project into more concrete requirements.
+
Produce configurable interception points and interfaces for interception.  The configuration should be simple while providing flexability.
 
+
  
  
 
= Functionality =
 
= Functionality =
  
== Session Interceptors ==
+
== Interceptors ==
The session will have 2 sets of interceptors.  A global set will be inherited by any acquired childrenUsers will also be able to set local interceptors which will not be inherited by child sessions.
+
=== The Cache Interceptor ===
 +
If a developer wishes to intercept EclipseLink's cache access the org.eclipse.persistence.sessions.interceptors.CacheInterceptor class should be extended and those methods that should be intercepted implementedThe user's implementation class should be set on the descriptor that should be interceptedFor Inheritance only set the class on the root of the tree as EclipseLink will store all subclasses in the same Cache.  Once set the provided class will receive all caching calls. 
 +
The existing EclipseLink cache settings will still be used and any calls allowed to continue to the EclipseLink cache will execute against the configured cache.
 +
 
 +
=== Query Interceptors ===
 +
For Query Interception the existing Query Redirectors will be leveraged but the configuration is being updated to allow for default Query Redirector
 +
 
  
 
= Design Constraints =
 
= Design Constraints =

Revision as of 13:48, 5 May 2008

Design Specification: Interceptors

ER 219683

Document History

Date Author Version Description & Notes
2008-02-21 Gordon Yorke Working Draft

Project overview

This feature will introduce Interceptor "interfaces" that can be implemented by users to intercept certain internal EclipseLink component interactions. This will include cache access, query execution and others.

Goals:

  • Provide extension points that intercept internal EcliseLink operations instead of the current options of responding to operations through events.
  • Choose interception points that provide the best leverage.

Concepts

Interceptors

Within EclipseLink logical operations like cache access or database writes flow naturally through different components. If points of intercept were added at the logical points of delegation within the EclipseLink architecture these operations could be intercepted and augmented or redirected. Developing these interception points and Interceptor interfaces increases the extensibility of EclipseLink beyond the scope of our current extensibility.

Requirements

Produce configurable interception points and interfaces for interception. The configuration should be simple while providing flexability.


Functionality

Interceptors

The Cache Interceptor

If a developer wishes to intercept EclipseLink's cache access the org.eclipse.persistence.sessions.interceptors.CacheInterceptor class should be extended and those methods that should be intercepted implemented. The user's implementation class should be set on the descriptor that should be intercepted. For Inheritance only set the class on the root of the tree as EclipseLink will store all subclasses in the same Cache. Once set the provided class will receive all caching calls. The existing EclipseLink cache settings will still be used and any calls allowed to continue to the EclipseLink cache will execute against the configured cache.

Query Interceptors

For Query Interception the existing Query Redirectors will be leveraged but the configuration is being updated to allow for default Query Redirector


Design Constraints

Maintainability

GUI

Config files

Documentation

Open Issues

This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.

Issue # Owner Description / Notes

Decisions

This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.

Issue # Description / Notes Decision

Future Considerations

During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.

Back to the top