title: Bean-Injection failed at Hazelcast map-store class
body: <p>I wanna inject a bean which will persist the map-entries at hazelcast. </p>
  
  <pre><code>&lt;map name="storethiselements-map"&gt;
  &lt;backup-count&gt;1&lt;/backup-count&gt;
  &lt;map-store enabled="true"&gt;
  &lt;class-name&gt;name.of.MapPersistenceObject&lt;/class-name&gt;
  &lt;write-delay-seconds&gt;0&lt;/write-delay-seconds&gt;
  &lt;/map-store&gt;
  &lt;/map&gt;
  </code></pre>
  
  <p>These are constructor-args for the hazelcast-instance. 
  In the MapPersistenceObject there exists a Service which is responsible for persisting the entries. I have marked MapPersistenceObject as component and made the Service-Object Autowired so that Spring will inject the right Service-Bean with the right Datasource.</p>
  
  <p>I have tried this but i get a NullPointer where the Service should be injected. It seems to me that Spring can't connect or autowire the MapPersistenceObject with the Service. It looks like this:</p>
  
  <pre><code>@Component
  public class MapPersistenceObject implements
      MapLoader&lt;Long, DeviceWakeupAction&gt;, MapStore&lt;Long, DeviceWakeupAction&gt; {
  @Autowired
  StoreMapEntries storeMapEntriesService;
      [...]
  </code></pre>
  
  <p>Maybe somebody knows a solution of the problem?</p>
  
  <p>regards &amp;&amp; tia
    noircc</p>