<hazelcast>
...
<map name="default">
...
<map-store enabled="true">
<class-name>...</class-name>
<myproperty1>value1</myproperty1>
<myproperty2>value2</myproperty2>
...
2. Make sure your MapLoader implementation extends
com.hazelcast.core.AbstractMapStore implements MapLoader and override
AbstractMapStore.init(HazelcastInstance hazelcastInstance,
Properties properties, String mapName)
// Do all your initialization here.
witter @oztalip
> --
> You received this message because you are subscribed to the Google Groups "Hazelcast" group.
> To post to this group, send email to haze...@googlegroups.com.
> To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.
>
>
It is never called yet. We will have map.getAll(keys) which will use
loadAll(keys).
It is also part of the JCache spec.
https://jsr-107-interest.dev.java.net/javadoc/javax/cache/CacheLoader.html
twitter @oztalip
Please post the full stacktrace for the NullPointerException.
twitter @oztalip
StackTrace tells me that
1. Hazelcast called your PriceStoreLoader on get
2. PriceStoreLoader failed with NPE
3. Hazelcast propagated the NPE back to the caller
These are all looking fine from Hazelcast side. Can you tell us what
might be -Null- at PriceStoreLoader (line 43)? Please post this line
if possible.
-talip
1.9 final fixes this issue. Download 1.9 final (when it is available)
and change your PriceStoreLoader to
public class PriceStoreLoader implements MapLoader, MapLoaderLifecycleSupport {
// implement all required methods.
}
do not call PriceStoreLoader.init(...) yourself. Hazelcast will call
it when needed.
Also PriceStoreLoader should not call any Hazelcast IMap call like
put(), get()... because threads that are calling the MapStore/Loader
are limited. You should only do database (or datastore) operations
there. If you need to do extra IMap calls have your own threads do it
so that you don't block Hazelcast threads forever.
twitter @oztalip