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

Pinned topic WXS for Second Level Cache

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

Hi,

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

http://pic.dhe.ibm.com/infocenter/wxsinfo/v8r6/index.jsp?topic=%2Fcom.ibm.websphere.extremescale.javadoc.doc%2Ftopics%2Fcom%2Fibm%2Fwebsphere%2Fobjectgrid%2Fhibernate%2Fcache%2FObjectGridHibernateCacheProvider.html

http://publib.boulder.ibm.com/infocenter/wxsinfo/v7r1/index.jsp?topic=%2Fcom.ibm.websphere.extremescale.admin.doc%2Frxsjpacache.html

As per my understanding i am using Remote Topology.

Questions

  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 name...how can i link them together

Thanks!

 

 

 

 

 

  • MandarChatufale
    MandarChatufale
    18 Posts

    Re: WXS for Second Level Cache

    ‏2013-07-31T06:44:30Z  

    Any thoughts?

  • MandarChatufale
    MandarChatufale
    18 Posts

    Re: WXS for Second Level Cache

    ‏2013-08-13T13:59:16Z  

    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"/>
            </mapSet>
        </objectgridDeployment>
    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">com.ibm.websphere.objectgrid.hibernate.cache.ObjectGridHibernateCacheProvider</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?