You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Rupert St John Webster <ru...@impress-solutions.com> on 2018/02/06 09:30:09 UTC

C# native client problem

Dear All,

Per https://stackoverflow.com/questions/48628342/ I have a C# class Geode.cs that sets up a native client local cache, pool and region and does some work.

I want to reuse the class and have 2 or more local caches that do work (ultimately to have different callbacks<http://gemfire-native.docs.pivotal.io/geode/dotnet-caching-api/application-callbacks.html>) but very simply like in the Program.cs

new Geode();
new Geode();

The 2nd time around to create a new local cache and find the server connection pool is fine, but to initialise a region at the following code:

IRegion<string, string> test = rf.SetPoolName("myPool").Create<string, string>("test");

I get the error:

[cid:image001.png@01D39F2C.E14ACEF0]

I have attached a simple test program to show this. Please can you let me know what’s wrong?

Thanks 😊


Kind regards

Rupert St John Webster
FX Consultant

Re: C# native client problem

Posted by Jacob Barrett <jb...@pivotal.io>.
Right, that is why I’m curious what SHA because the sources on develop for the last few months allow multiple caches in a process or app domain. 

> On Feb 6, 2018, at 6:38 AM, Michael Stolz <ms...@pivotal.io> wrote:
> 
> Also could be that he's hitting the Cache singleton. Hard to tell from what
> he wrote, but I think he's attempting to new multiple Caches in the same
> process.
> 
> --
> Mike Stolz
> Principal Engineer - Gemfire Product Manager
> Mobile: 631-835-4771
> 
>> On Feb 6, 2018 9:35 AM, "Jacob Barrett" <jb...@pivotal.io> wrote:
>> 
>> Since there is no official release of the Geode Native C# client can you
>> please tell us what SHA you have compiled?
>> 
>> Quickly I can say you can’t create two regions with the same name in the
>> same cache.
>> 
>> -Jake
>> 
>> 
>>> On Feb 6, 2018, at 1:30 AM, Rupert St John Webster <
>> rupert@impress-solutions.com> wrote:
>>> 
>>> Dear All,
>>> 
>>> Per https://stackoverflow.com/questions/48628342/ I have a C# class
>> Geode.cs that sets up a native client local cache, pool and region and does
>> some work.
>>> 
>>> I want to reuse the class and have 2 or more local caches that do work
>> (ultimately to have different callbacks) but very simply like in the
>> Program.cs
>>> 
>>> new Geode();
>>> new Geode();
>>> 
>>> The 2nd time around to create a new local cache and find the server
>> connection pool is fine, but to initialise a region at the following code:
>>> 
>>> IRegion<string, string> test = rf.SetPoolName("myPool").Create<string,
>> string>("test");
>>> 
>>> I get the error:
>>> 
>>> <image001.png>
>>> 
>>> I have attached a simple test program to show this. Please can you let
>> me know what’s wrong?
>>> 
>>> Thanks 😊
>>> 
>>> 
>>> Kind regards
>>> 
>>> Rupert St John Webster
>>> FX Consultant
>>> <Geode.cs>
>>> <Program.cs>
>> 

Re: C# native client problem

Posted by Michael Stolz <ms...@pivotal.io>.
Also could be that he's hitting the Cache singleton. Hard to tell from what
he wrote, but I think he's attempting to new multiple Caches in the same
process.

--
Mike Stolz
Principal Engineer - Gemfire Product Manager
Mobile: 631-835-4771

On Feb 6, 2018 9:35 AM, "Jacob Barrett" <jb...@pivotal.io> wrote:

> Since there is no official release of the Geode Native C# client can you
> please tell us what SHA you have compiled?
>
> Quickly I can say you can’t create two regions with the same name in the
> same cache.
>
> -Jake
>
>
> > On Feb 6, 2018, at 1:30 AM, Rupert St John Webster <
> rupert@impress-solutions.com> wrote:
> >
> > Dear All,
> >
> > Per https://stackoverflow.com/questions/48628342/ I have a C# class
> Geode.cs that sets up a native client local cache, pool and region and does
> some work.
> >
> > I want to reuse the class and have 2 or more local caches that do work
> (ultimately to have different callbacks) but very simply like in the
> Program.cs
> >
> > new Geode();
> > new Geode();
> >
> > The 2nd time around to create a new local cache and find the server
> connection pool is fine, but to initialise a region at the following code:
> >
> > IRegion<string, string> test = rf.SetPoolName("myPool").Create<string,
> string>("test");
> >
> > I get the error:
> >
> > <image001.png>
> >
> > I have attached a simple test program to show this. Please can you let
> me know what’s wrong?
> >
> > Thanks 😊
> >
> >
> > Kind regards
> >
> > Rupert St John Webster
> > FX Consultant
> > <Geode.cs>
> > <Program.cs>
>

Re: C# native client problem

Posted by Jacob Barrett <jb...@pivotal.io>.
Since there is no official release of the Geode Native C# client can you please tell us what SHA you have compiled?

Quickly I can say you can’t create two regions with the same name in the same cache.

-Jake


> On Feb 6, 2018, at 1:30 AM, Rupert St John Webster <ru...@impress-solutions.com> wrote:
> 
> Dear All,
>  
> Per https://stackoverflow.com/questions/48628342/ I have a C# class Geode.cs that sets up a native client local cache, pool and region and does some work.
>  
> I want to reuse the class and have 2 or more local caches that do work (ultimately to have different callbacks) but very simply like in the Program.cs
>  
> new Geode();
> new Geode();
>  
> The 2nd time around to create a new local cache and find the server connection pool is fine, but to initialise a region at the following code:
>  
> IRegion<string, string> test = rf.SetPoolName("myPool").Create<string, string>("test");
>  
> I get the error:
>  
> <image001.png>
>  
> I have attached a simple test program to show this. Please can you let me know what’s wrong?
>  
> Thanks 😊
>  
>  
> Kind regards
>  
> Rupert St John Webster
> FX Consultant
> <Geode.cs>
> <Program.cs>