Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » org.eclipse.persistence.annotations.CacheInterceptor(org.eclipse.persistence.annotations.CacheInterceptor)
org.eclipse.persistence.annotations.CacheInterceptor [message #1064091] Mon, 17 June 2013 15:03
P Soma is currently offline P SomaFriend
Messages: 9
Registered: May 2013
Junior Member
CacheInterceptor annotation does not supporting to inheritance. Currently, forcing us to configure CacheInterceptor annotation on each entity as below.

Example:
@CacheInterceptor(value = JcCacheInterceptor.class)
public class Sample1 extends JcBaseBO{

}

@CacheInterceptor(value = JabCacheInterceptor.class)public class Sample2 extends JcBaseBO{

}

But we would like to configure the CacheInterceptor annotation in the base class as below in JcBaseBO and then all the subclass (i.e. Sample1 & Sample2) of the JcBaseBO class should automatically inherite the CacheInterceptor functionality.

Expected:
@CacheInterceptor(value = JcCacheInterceptor.class)
public abstract class JcBaseBO implements Serializable {

}

public class Sample1 extends JcBaseBO{

}

public class Sample2 extends JcBaseBO{

}

So, please add the @Inherited annotation in CacheInterceptor interface as below.


@Target({TYPE})
@Retention(RUNTIME)
@Inherited
public @interface CacheInterceptor {
/**
* The Class that will be used to intercept EclipseLink's cache access.
*/
Class value();
}

Created a bug for the same and you can refer from Bug 410924 link.
Previous Topic:ClassLoader problem using JPA with Native Eclipselink project file
Next Topic:Mapping Joda Interval
Goto Forum:
  


Current Time: Thu Nov 27 17:26:07 GMT 2014

Powered by FUDForum. Page generated in 0.01610 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software