-
1. Re: Infinispan key/value data types and persistence
wdfink Sep 5, 2014 3:50 AM (in response to epewall)You can use any Object but it must be serializable.
Do you see any error messages?
How your configuration look like?
Do you use library or client-server mode?
-
2. Re: Infinispan key/value data types and persistence
nadirx Sep 5, 2014 3:52 AM (in response to wdfink)Even better, use Externalizable: http://infinispan.org/docs/6.0.x/user_guide/user_guide.html#_plugging_infinispan_with_user_defined_externalizers
-
3. Re: Infinispan key/value data types and persistence
epewall Sep 5, 2014 8:20 AM (in response to epewall)Thanks guys! I can see no error messages, everything looks fine. Data is just not persisted.
I'm running a single instance of Jboss AS with an infinispan cache setup for clustering, one more node will be used later. I don't know if I'm running library or client-server .. :-/ ?
I tried with the Externalizable, however it still refuses to persist the data. I went with the basic "implements Externalizer<SomeClass>". Couldn't really get how to implement the getTypeClasses in the Advanced way of doing it ...
Anyway, thanks! I'll continue to play with the Externalizable/Serializable. Any/all ideas are most welcome!
-
4. Re: Infinispan key/value data types and persistence
nadirx Sep 5, 2014 8:24 AM (in response to epewall)You're running embedded. Client/server is when HotRod is involved.
Can we see the cache configuration please ?
-
5. Re: Infinispan key/value data types and persistence
epewall Sep 8, 2014 2:57 AM (in response to nadirx)Configuration loc = new ConfigurationBuilder()
.jmxStatistics()
.enable()
.clustering()
.cacheMode(CacheMode.REPL_SYNC)
// .cacheMode(CacheMode.DIST_SYNC)
// .hash().numOwners(2)
.loaders()
.passivation(false)
.shared(true)
.preload(true)
.addFileCacheStore()
.fetchPersistentState(true)
.ignoreModifications(false)
.purgeOnStartup(false)
.location(getPersistentCacheLocation())
.async()
.enabled(true)
.threadPoolSize(5)
.build();
-
6. Re: Infinispan key/value data types and persistence
epewall Sep 8, 2014 4:41 AM (in response to epewall)Just adding ...
this works:
someCache.put(String, Range) - persisted.
this does not:
someCache.put(Range, String) - not persisted.
Both variants behave nicely when it comes to retrieval of data though.