• 2 replies
  • Latest Post - ‏2013-08-13T13:59:16Z by MandarChatufale
18 Posts

Pinned topic WXS for Second Level Cache

‏2013-07-29T12:51:47Z |


I have a spring application with Hibernate implementation of JPA in dao layer. Now i am planning to WXS as a second level cache for Hibernate-JPA.

I have a standalone catalog server(v8.6.0.3). 

I am referring below links

As per my understanding i am using Remote Topology.


  1. As per specifications we need to have BackingMap for each entity. Where in my application can i define the BackingMap for each entity?
  2. What is significance of query region and how is is related to BackMap?
  3. Since currently i have a standalone version of wxs server which has pre defined set of Maps (Map1 and Map2) and I have entities with different can i link them together







  • MandarChatufale
    18 Posts

    Re: WXS for Second Level Cache


    Any thoughts?

  • MandarChatufale
    18 Posts

    Re: WXS for Second Level Cache


    A few more details to add

    1. I created a spring sample with hibernate-jpa. In this sample i am doing a simple search by id and search by name operation. My entity name is Customer.

    2. I have a trial version of wxs standalone server. I have created a BackingMap in objectgrid.xml with full qualified class name of entity. I have added backinmap entry in deployment.xml

          <backingMap name="domain.Customer" readOnly="false" copyKey="false"
                      lockStrategy="PESSIMISTIC" copyMode="COPY_TO_BYTES" />
        <objectgridDeployment objectgridName="Grid">
            <mapSet name="mapSet" numberOfPartitions="13" minSyncReplicas="0" maxSyncReplicas="1" >
                <map ref="Map1"/>
                <map ref="Map2"/>
                <map ref="domain.Customer"/>
    3. I am just using objectgrid.jar file.

    4. Below are my hibernate configurations

    i. Annotated entity with @Cache

    <prop key="hibernate.default_schema">${schema}</prop>

    <prop key="hibernate.show_sql">true</prop>

    <prop key="hibernate.dialect">org.hibernate.dialect.DB2Dialect</prop>

    <prop key="hibernate.cache.provider_class"></prop>

    <prop key="hibernate.cache.use_second_level_cache">true</prop>

    <prop key="hibernate.cache.use_query_cache">false</prop>

    <prop key="objectgrid.configuration">ObjectGridName=Grid,ObjectGridType=REMOTE</prop>

    4.  i execute the program but still , values are not going in cache

    Please guide, if i am missing any configuration?