Re: Use IgniteQueue in client

2017-11-13 Thread Evgeniy Stanilovskiy

ticket https://issues.apache.org/jira/browse/IGNITE-6437 already created


Hi,

I want to create an IgniteQueue on a server node and get a reference to  
this
queue on a client node. I get a null pointer exception on client when I  
do

this.

This has been asked before in a very old thread and is reportedly fixed  
as
per  this issue   .  
But I

am getting the same behaviour using both ignite version 2.2 and 2.3 . Can
someone aware of the development in this regard please update me with the
status of this? Is this a reasonable expectation? Or are there other  
ways to

achieve this?

Thanks,
Arun



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Use IgniteQueue in client

2017-11-13 Thread arunkjn
Thanks Alexey.

I think the problem is that Ignite.queue and Ignite.set javadocs mention
that null is an acceptable entry and also suggest that null can be used when
we do not want to create a new set or queue. 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Use IgniteQueue in client

2017-11-13 Thread Alexey Kukushkin
Created https://issues.apache.org/jira/browse/IGNITE-6889 (ignite.queue()
returns null when queue configuration is null)


Re: Use IgniteQueue in client

2017-11-13 Thread Alexey Kukushkin
Hi,

Two things:

   1. You must use same configuration (limit and CollectionConfiguration)
   on both client and server
   2. You cannot pass "null" as CollectionConfiguration. Pass empty
   CollectionConfiguration (new CollectionConfiguration()) if you have no
   specific settings.

This code must work (just tried a queue sample):

Server:
IgniteQueue q = ignite.queue("MyQueue", 10, new
CollectionConfiguration());

Client:
IgniteQueue q = ignite.queue("MyQueue", 10, new
CollectionConfiguration());


I do see a usability issue here that we cannot specify null as a collection
configuration. I will open a bug.