ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi Puri <ravikumarpur...@gmail.com>
Subject can we make generic class for cachehibernatepojostore?
Date Wed, 20 Apr 2016 06:50:55 GMT
i have a query 

i have one class which loads cacheconfiguration class(CacheConfig) with its
cachehibernatepojostore(specific to class) passed in factory builder which i
passed as T.

public class CacheConfig {

	private static final long serialVersionUID = 1L;
	private static final String HIBERNATE_CFG = "hibernate.cfg.xml";

	@SuppressWarnings({ "unchecked", "rawtypes" })
	public static CacheConfiguration<String, Class> loadConfig(String
			 Class  T) {
		CacheConfiguration<String, Class> cacheCfg = new

		// Set atomicity as transaction, since we are showing transactions in
		// example.

		// Configure JDBC store.

		// Configure hibernate session listener.
Factory<CacheStoreSessionListener>() {
			private static final long serialVersionUID = 1L;

			public CacheStoreSessionListener create() {
				CacheHibernateStoreSessionListener lsnr = new


				return lsnr;

		System.out.println("ended configuration loadConfig");

		return cacheCfg;

so form main i can access
CacheConfig objCacheConfig = new CacheConfig();
	IgniteCache<String, Class> cache= objCacheConfig .loadConfig("CacheName",
CacheHibernatePersonStore .class);
		cache.loadCache(null, 100_00);

IT LOAD ALL DATA RELATED TO CacheHibernatePersonStore extends
CacheStoreAdapter<Integer, Person>
means in short it load all the data to server side

now m using client side and has different ignite.xml 

now i want to access the data to this client side in different package of
eclipse which was loaded in server side with different config.(as m able to
connect server and client is connected )
but when m trying to fetch it shows
Failed to create an instance of CacheHibernatePersonStore class

how can i able to load it??

View this message in context: http://apache-ignite-users.70518.x6.nabble.com/can-we-make-generic-class-for-cachehibernatepojostore-tp4355.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message