Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7741333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:59:59+00:00 2026-06-01T08:59:59+00:00

I wanna inject a bean which will persist the map-entries at hazelcast. <map name=storethiselements-map>

  • 0

I wanna inject a bean which will persist the map-entries at hazelcast.

<map name="storethiselements-map">
<backup-count>1</backup-count>
<map-store enabled="true">
<class-name>name.of.MapPersistenceObject</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>

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.

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:

@Component
public class MapPersistenceObject implements
    MapLoader<Long, DeviceWakeupAction>, MapStore<Long, DeviceWakeupAction> {
@Autowired
StoreMapEntries storeMapEntriesService;
    [...]

Maybe somebody knows a solution of the problem?

regards && tia
noircc

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:00:00+00:00Added an answer on June 1, 2026 at 9:00 am

    You should use Spring configuration, not Hazelcast xml configuration.

    <hz:hazelcast id="hazelcast">
        <hz:config>
            ...
            <hz:map name="storethiselements-map" backup-count="1">
                <hz:map-store enabled="true" implementation="mapPersistenceObject" write-delay-seconds="0"/>
            </hz:map>
            ...
        </hz:config>
    </hz:hazelcast>
    
    <bean id="mapPersistenceObject" class="name.of.MapPersistenceObject"/>
    

    See Hazelcast Spring integration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanna link a movie clip which has instace name test1 to a external
I wanna to detect an input tag that its name is: some[en] in jquery.
I wanna split an string using C++ which contains spaces and punctuations. e.g. str
I wanna implement divide and conquer using pthread, but I don't know what will
I wanna load a video file into NSData,if I use dataWithContentsOfFile:,it will spend lots
I wanna show this Shapefile data that extracted from SHP file in google map
i wanna store some configuration data in some objects, and i've a problem... class
I wanna build a gallery, but the my problem is how to load the
i wanna do a single selection in my table view here is my code
i wanna creat a website for downloading some files (pdf,word,xls, such as these files),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.