Alexey Olenev created ISPN-4348:
-----------------------------------
Summary: Configuration parser loses <persistence/> element
configuration
Key: ISPN-4348
URL:
https://issues.jboss.org/browse/ISPN-4348
Project: Infinispan
Issue Type: Bug
Components: Configuration, Loaders and Stores
Affects Versions: 6.0.2.Final
Reporter: Alexey Olenev
Assignee: Dan Berindei
I have a following configuration of named cache:
<namedCache name="string-cache">
<clustering mode="distribution">
<sync />
<stateTransfer fetchInMemoryState="true" />
<hash numOwners="2" />
</clustering>
<persistence>
<store class="org.sproot_grid.infinispan.cachestore.StringCacheStore"
fetchPersistentState="false" ignoreModifications="false"
purgeOnStartup="false">
</store>
</persistence>
</namedCache>
where StringCacheStore is my own implementation of CacheStore (implements
AdvancedLoadWriteStore).
I start cluster using constructor DefaultCacheManager(String configurationFile), but cache
modifications don't trigger write-through because there is no stores in Configuration
object.
I investigated it in debug mode and found that configuration parser (Parser60) reads
<store /> element but doesn't apply it to ConfigurationBuilder object if store
is not an instance of SingleFileStore or ClusterLoader, so it means that I can't
configure my custom CacheStore
This is a copy of my stack during configuration reading:
Thread [main] (Suspended (breakpoint at line 640 in Parser60))
Parser60.parseStore(XMLExtendedStreamReader, ConfigurationBuilderHolder) line: 640
Parser60.parsePersistence(XMLExtendedStreamReader, ConfigurationBuilderHolder) line:
555
Parser60.parseCache(XMLExtendedStreamReader, ConfigurationBuilderHolder) line: 150
Parser60.parseNamedCache(XMLExtendedStreamReader, ConfigurationBuilderHolder) line:
109
Parser60.readElement(XMLExtendedStreamReader, ConfigurationBuilderHolder) line: 76
ParserRegistry.parseElement(XMLExtendedStreamReader, ConfigurationBuilderHolder) line:
141
ParserRegistry.parse(XMLExtendedStreamReader, ConfigurationBuilderHolder) line: 123
ParserRegistry.parse(InputStream, ConfigurationBuilderHolder) line: 110
ParserRegistry.parse(InputStream) line: 97
DefaultCacheManager.<init>(InputStream, boolean) line: 253
DefaultCacheManager.<init>(String, boolean) line: 226
DefaultCacheManager.<init>(String) line: 213
ClusterFacade.init() line: 48
ClusterFacade.getFacade() line: 41
ClusterFacadeTest.initCluster() line: 21
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native
method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 601
FrameworkMethod$1.runReflectiveCall() line: 44
FrameworkMethod$1(ReflectiveCallable).run() line: 15
FrameworkMethod.invokeExplosively(Object, Object...) line: 41
RunBefores.evaluate() line: 27
BlockJUnit4ClassRunner(ParentRunner<T>).run(RunNotifier) line: 236
JUnit4TestMethodReference(JUnit4TestReference).run(TestExecution) line: 50
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)