I have CacheLoader and CacheWriter written using spring data JPA and data-source as spring bean to connect to database and fetch data...now I need to plug in these loader and writer at server cache...How Can I do that effectively.
I think I need to use below element in the cache.xml and refer this xml file from gfsh command shell :
<initializer>
<class-name>org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer</class-name>
<parameter name="contextConfigLocations">
<string>application-context.xml</string>
</parameter>
</initializer>
In this context I have the below questions:
1.The above approach of bootstrapping spring application context from gemfire is advised for production ?
2.what are other alternatives to achieve this ?
3.I have done a work around of creating a client cache in my client and have plugged in these cache loader and cache writer and they are getting executed since my client is a spring application but is this approach advised for production?