[
https://issues.jboss.org/browse/JBCACHE-1601?page=com.atlassian.jira.plug...
]
Dennis Reed updated JBCACHE-1601:
---------------------------------
Steps to Reproduce:
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.2">
<eviction wakeUpInterval="1000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
<property name="timeToLive" value="1000" />
</default>
</eviction>
<loaders passivation="true" shared="false">
<loader class="org.jboss.cache.loader.FileCacheLoader"
async="false" fetchPersistentState="true"
ignoreModifications="false">
<properties>
location=${java.io.tmpdir}/JBCACHE-1601
</properties>
</loader>
</loaders>
</jbosscache>
CacheFactory factory = new DefaultCacheFactory();
Cache cache = factory.createCache("cache.xml");
cache.put ( fqn, "test", "data" );
Thread.sleep ( 3000 ); // wait for eviction
cache.getNode ( fqn );
Thread.sleep ( 3000 ); // wait for eviction
System.out.println ( cache.get ( fqn, "test" ) );
Expected result: "test"
Actual result: "null"
was:
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.2">
<eviction wakeUpInterval="1000">
<default
algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
<property name="timeToLive" value="1000"
/>
</default>
</eviction>
<loaders passivation="true" shared="false">
<loader class="org.jboss.cache.loader.FileCacheLoader"
async="false" fetchPersistentState="true"
ignoreModifications="false">
<properties>
location=${java.io.tmpdir}/dereed-cache
</properties>
</loader>
</loaders>
</jbosscache>
CacheFactory factory = new DefaultCacheFactory();
Cache cache = factory.createCache("cache.xml");
cache.put ( fqn, "test", "data" );
Thread.sleep ( 3000 ); // wait for eviction
cache.getNode ( fqn );
Thread.sleep ( 3000 ); // wait for eviction
System.out.println ( cache.get ( fqn, "test" ) );
Expected result: "test"
Actual result: "null"
cache.getNode can delete data when using a passivation cache loader
-------------------------------------------------------------------
Key: JBCACHE-1601
URL:
https://issues.jboss.org/browse/JBCACHE-1601
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Cache loaders
Affects Versions: 3.2.5.GA
Reporter: Dennis Reed
Assignee: Dennis Reed
When cache.getNode loads a passivated node, the data is not loaded, but it does trigger
an eviction event.
When eviction then passivates the node again, the data is overwritten.
Similar to JBCACHE-825.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira