Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Using <hz:client> config element
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
anucekay  
View profile  
 More options Apr 24 2012, 7:46 pm
From: anucekay <anuce...@gmail.com>
Date: Tue, 24 Apr 2012 16:46:09 -0700 (PDT)
Local: Tues, Apr 24 2012 7:46 pm
Subject: Using <hz:client> config element
Here is my use case:

I have a hazel cluster that is spawn and running.

I want to have the client side configuration for this cluster.

  <hz:client id="myHazelcast" group-name="${hazelcast.group}" group-
password="mypassword" >
       <hz:member>${hazelcast.vip}</hz:member>
    </hz:client>

within the java code, i want to get this client instance and create
maps/add entries etc.

   hcmap =
Hazelcast.getHazelcastInstanceByName("myHazelcast").getMap(name);

Does not seem to work. I get NPE
Hazelcast.getHazelcastInstanceByName("myHazelcast");

My question is what is the best way to get at the hazelcast instance
that was created by the hz:client spring
configration.

Thanks
Anu


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mehmet Dogan  
View profile  
 More options Apr 25 2012, 2:33 am
From: Mehmet Dogan <meh...@hazelcast.com>
Date: Wed, 25 Apr 2012 09:33:38 +0300
Local: Wed, Apr 25 2012 2:33 am
Subject: Re: Using <hz:client> config element

'Hazelcast.getHazelcastInstanceByName' returns actual Hazelcast instances
not clients (although they implement the same interface;
HazelcastInstance). The best way to get a Hazelcast instance (or client)
that was created with Spring is to make Spring inject that bean into place
we need. (That is Spring built for, isn't it?)

@mmdogan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anucekay  
View profile  
 More options Apr 25 2012, 5:25 pm
From: anucekay <anuce...@gmail.com>
Date: Wed, 25 Apr 2012 14:25:55 -0700 (PDT)
Local: Wed, Apr 25 2012 5:25 pm
Subject: Re: Using <hz:client> config element
My old code which used the hazelcast intance would look it up from the
Hazelcast class and i expected the same code to work when
i moved to using the client. Was able to work around it.

When i was using the actual hazelcast instances, i was able to
redirect the logs to our specific log files by specifying
hazelcast.logging.type as shown below and then specifying
the appropriate logger for com.hazelcast in logback.xml

I wanted to redirect the logs from the client, i tried the
same but does not seem to work. Any pointers?

  <hz:hazelcast id="MyInstance">
       <hz:config>
        <hz:instance-name>MyInstance</hz:instance-name>
        <hz:properties>
            <hz:property name="hazelcast.logging.type">slf4j</
hz:property>
        </hz:properties>
        <hz:network port="5702" port-auto-increment="true">
                      ......
        </hz:network>

On Apr 24, 11:33 pm, Mehmet Dogan <meh...@hazelcast.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mehmet Dogan  
View profile  
 More options Apr 26 2012, 1:20 am
From: Mehmet Dogan <meh...@hazelcast.com>
Date: Thu, 26 Apr 2012 08:20:35 +0300
Local: Thurs, Apr 26 2012 1:20 am
Subject: Re: Using <hz:client> config element

You should set 'hazelcast.logging.type' as system property. (This works for
both Hazelcast server and client.)

-Dhazelcast.logging.type=slf4j

@mmdogan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »