On Thu, Apr 26, 2012 at 12:25 AM, anucekay <anuce
...@gmail.com> wrote:
> 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:
> > '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
> > On Wed, Apr 25, 2012 at 2:46 AM, anucekay <anuce...@gmail.com> wrote:
> > > 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 received this message because you are subscribed to the Google
> Groups
> > > "Hazelcast" group.
> > > To post to this group, send email to hazelcast@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > hazelcast+unsubscribe@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/hazelcast?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "Hazelcast" group.
> To post to this group, send email to hazelcast@googlegroups.com.
> To unsubscribe from this group, send email to
> hazelcast+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hazelcast?hl=en.