Hi Val,
Thank you for the response. I got the options you mentioned. I have still
one more clarification required.
I have configured Custom Cache Store which internally uses Spring
Repository. Please check below code.
public class PercentageModelStore extends CacheStoreAdapter<String,
MstTeucPercentageModel>
{
@CacheStoreSessionResource
public CacheStoreSession ses;
@SpringResource(resourceClass=PercentageDataRespository.class)
public IPercentageDataRespository repository;
@Override public void
loadCache(IgniteBiInClosure<String,PercentageModel>
clo, Object... args)
{
System.out.println("Loading cache entries from database starts
!!!!");
List<PercentageData> listTeucPercentageData=repository.findAll();
for(MstTeucPercentageData data:listTeucPercentageData)
{
clo.apply(data.PercentageId().toString(),
(PercentageModel)this.getModel(data));
}
System.out.println("Loading cache entries from database ends
!!!!");
return;
}
}
I am using SpringResource(PercentageDataRespository.class) to inject the
Spring Repository Component into my CacheStore. Basically I dont want to go
through JDBC and want to use hibernate for loading data into cache store.
If I go with the first approach you mentioned and start with Ignition.start
I believe this repository would not be injected. This is the main reason I
am using IgniteSpring.start passing the Spring context so that for all my
cache stores I can have injected repositories. This is working fine as of
now. On top of it I want to use Ignite as Spring Cache Provider.
Kindly correct me if I am not getting the concepts.
Regards
Monil
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/