Thanks for your recommendations!
1) The dynamicConfigurationReload is not able to reset once
cacheStoreFactory is cached.  It means that cacheStoreFactory does not read
this value unless cacheStoreFactory is first instantiated.  Do I miss
something?  Which factory should I put dynamicConfigurationReload in the xml
configuration file?

2) can you please elaborate more about your comments "the data source may
come from local Spring context on each node.".  


        <bean class="org.apache.ignite.configuration.CacheConfiguration">
                <property name="name" value="Uom"/>
                <property name="atomicityMode" value="TRANSACTIONAL"/>
                <property name="cacheMode" value="REPLICATED"/>
                <property name="readThrough" value="true"/>
                <property name="writeThrough" value="false"/>
                <property name="sqlSchema" value="catalog"/>
                
                <property name="cacheStoreFactory">
                        <bean
class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory"> 
                                <property name="dynamicConfigurationReload"
value ="true" />
                                <property name="dataSource"
ref="cassandra"/>
                                <property name="persistenceSettingsBean"
value="catalog_uom_persistence_settings"></property>
                        </bean>
                </pro


CassandraCacheStoreFactory changes

private boolean dynamicConfigurationReload;

    /**
     * @return Persistence settings.
     */
    private KeyValuePersistenceSettings getPersistenceSettings() {
                
              if (!isDynamicConfigurationReload() && persistenceSettings != 
null)
              return persistenceSettings;
                
                if (persistenceSettingsBean == null) {
                    throw new IllegalStateException("Either persistence settings
bean or persistence settings itself " +
                        "should be specified");
                }
        
                if (appCtx == null) {
                    throw new IllegalStateException("Failed to get Cassandra
persistence settings cause Spring application " +
                        "context wasn't injected into 
CassandraCacheStoreFactory");
                }
        
                Object obj = loadSpringContextBean(appCtx,
persistenceSettingsBean);
        
                if (!(obj instanceof KeyValuePersistenceSettings)) {
                    throw new IllegalStateException("Incorrect persistence 
settings
bean '" +
                        persistenceSettingsBean + "' specified");
                }
                
                return persistenceSettings = (KeyValuePersistenceSettings)obj;
                
        
    }
    
    
    public void setDynamicConfigurationReload(boolean
dynamicConfigurationReload ) {
        this.dynamicConfigurationReload = dynamicConfigurationReload;
    }
    
    public boolean isDynamicConfigurationReload() {
        return dynamicConfigurationReload;
    }



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to