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 7959053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:30:47+00:00 2026-06-04T04:30:47+00:00

I’m evaluating Hazelcast as a distributed data grid solution for an application I’m working

  • 0

I’m evaluating Hazelcast as a distributed data grid solution for an application I’m working on. Hazelcast is setup on a distributed cluster, and my application uses Spring to define an Hazelcast client in this way:

<hz:client id="hazelcastClient" group-name="dev" group-password="dev-pass">
<hz:member>localhost:5701</hz:member>
</hz:client>

On my Hazelcast node, in the hazelcast.xml file I’ve setup a map, with all the configuration needed. Let’s say this map is called myMap. I can see this map set up properly when using the Hazelcast webapp for monitoring (mancenter).

I have now to configure the map to get injected into my bean, on the application side. If I do something like

<hz:map id="myMap" instance-ref="hazelcastClient" name="myMap" />

And I inject this map into my bean that containst the fetching logic, I’ve got no problems.

However, I’ve also written a class that implements MapLoader interface, in order to handle the missing data from the cache. My problem is now that I don’t know how to tie this Maploader to the cache I defined. If I try something like

<hz:map id="myMap" instance-ref="hazelcastClient" name="myMap">
    <hz:map-store enabled="true" implementation="myMapLoader"/>
</hz:map>

I’m getting an XML parse error, as it seems that when hz:map is used as a top-level element (and not inside a hz:config, for example), you cannot specify inner elements. This makes me think that you need to define a hz:config element. But it’s not very clear from the documentation if you can define a hz:config element for a client. To me it seems that you need to use hz:config if you want your application to be part of the cluster. I’m not sure however if it’s logically correct that my app should be part of the cluster – it’s basically a client of the data grid.

Do you have any thoughts on how can I configure my app to achieve the behavior I want?

  • 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-04T04:30:48+00:00Added an answer on June 4, 2026 at 4:30 am

    You can not configure a map on the client side. You should configure myMap and its MapLoader/MapStore on Hazelcast node. MapStore/MapLoader operations are executed by Hazelcast node that owns the data, not by client.

    Hazelcast Node

    <hz:config>
        ...
        <hz:map name="myMap" backup-count="1" max-size="0">
            <hz:map-store enabled="true" implementation="myMapLoader" />
        </hz:map>
        ...
    </hz:config>
    

    -OR- using hazelcast.xml

    <map name="myMap">
        <backup-count>1</backup-count>
        <time-to-live-seconds>0</time-to-live-seconds>
        <max-idle-seconds>0</max-idle-seconds>
    
        <map-store enabled="true">
            <class-name>foo.bar.MyMapLoader</class-name>
            <write-delay-seconds>0</write-delay-seconds>
        </map-store>
    </map>
    

    On client side just instantiate myMap;

    <hz:map id="myMap" instance-ref="hazelcastClient" name="myMap" />
    

    When client puts to / gets from that map, the node handles client’s request will call MapLoader/MapStore.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to construct a data frame in an Rcpp function, but when I
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.