Most of setter method of the properties in PersistentStoreConfiguration are
returned as PersistentStoreConfiguration, which leads a spring injection
error if we try to simply configure the properties of
PersistentStoreConfiguration by doing the spring bean configure in the
spring bean .xml config file.
which is quite inconvenient, we must have to change it programmatically by
loading the PersistentStoreConfiguration from the spring context, Is it a
oversight of the 2.1 ?
e.g.
/**
* Returns a path the root directory where the Persistent Store will
persist data and indexes.
*/
public String getPersistentStorePath() {
return persistenceStorePath;
}
/**
* Sets a path to the root directory where the Persistent Store will
persist data and indexes.
* By default the Persistent Store's files are located under Ignite work
directory.
*
* @param persistenceStorePath Persistence store path.
*/
public PersistentStoreConfiguration setPersistentStorePath(String
persistenceStorePath) {
this.persistenceStorePath = persistenceStorePath;
return this;
}
<property name="persistentStoreConfiguration">
<bean
class="org.apache.ignite.configuration.PersistentStoreConfiguration">
<property name="persistenceStorePath" value="/xx/xx"/>
</bean>
</property>
Got error -
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
property 'persistenceStorePath' of bean class
[org.apache.ignite.configuration.PersistentStoreConfiguration]: Bean
property 'persistenceStorePath' is not writable or has an invalid setter
method. Did you mean 'persistentStorePath'?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/2-1-PersistentStoreConfiguration-is-not-configurable-by-spring-injection-tp16324.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.