Thanks for your clarifications, and appreciated your suggestions and
guidance.  

My college and I went to ignite-cassandra module,  commented two lines,
*/testing purpose/*,  in
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.getPersistenceSettings(),
see the changes below.  Removing these two lines is to force Ignite to read
the configuration settings from the xml at runtime.  It looks the change
works and meets our requirement.  

I'm looking for the suggestions and recommendations from Ignite community
and you, and wondering if we make these changes in Ignite repository.  I
think that it's very useful for our Ignite community.  

Similar changes should be applied to
org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory.getDataSource()


    private KeyValuePersistenceSettings getPersistenceSettings() {
// comment the two line below for testing purpose.
//        if (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;
    }



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

Reply via email to