java - OpenJPA Cache not working -


i using openjpa 2.1.0 manage entities , trying activate cache 1 of them. have followed next steps:

i have added next lines in persistence.xml file.

    <shared-cache-mode>enable_selective</shared-cache-mode>     <properties>        <property name="openjpa.datacache" value="true(types=com.example.entitytocache)"/>        <property name="openjpa.remotecommitprovider" value="sjvm"/>     </properties> 

and annotation @cacheable in entity.

    @entity     @javax.persistence.cacheable     public class entitytocache implements serializable {         @id         private string id;     } 

but cache not seem work. debugging can see entitytocache objects added cache, , cache.get method called everytime want retrieve object, calls database executed every time. failing cache.

any ideas why not working?

thanks in in advance.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -