New Posts New Posts RSS Feed: [Resolved] using PooledNumericIdGenerator
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

[Resolved] using PooledNumericIdGenerator

 Post Reply Post Reply
Author
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Topic: [Resolved] using PooledNumericIdGenerator
    Posted: 15-Oct-2007 at 11:57am
I would like to use the PooledNumericIdGenerator.
 
What would be the best way to implement this?
 
The NumericIdGenerator is built into the core. And, as far as I can tell it is not something I can override.
 
If I add it to my solution which will be used, since there will be to IIdGenerator classes?


Edited by orcities - 15-Oct-2007 at 2:20pm
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 12:51pm
Only one or the other can be used...I don't think both can be used at the same time.  If both existed, I would guess that the NumericIdGenerator would be the default.
 
I use the PooledNumericIdGenerator.  Works quite well in the CAB app; however, I spent a gob of time getting it to work outside of the CAB app.  It took me a while to figure out the best way to use it.  I did write a bunch of forum entries along the way (with David K.).  They should still be available.
 
Moving it over was basically a drag and drop exercise.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 12:56pm
I am kind of wondering if recompiling the Cab Lib is the best option. Then I have to keep up with the upates.
 
If this is the case maybe there is a way to choose which IIdGenerator you wish to use in FoundationModule class in the future.
 
 
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 12:58pm
I don't think it is part of the LIB (core).  The classes are part of the Model project.  Implementing one or the other is a matter of building the model with one of these classes.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:01pm
The only place I found it implemented was in the IdeaBlade.Common.EntityModel. Which is in the core.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:17pm
There is a sample solution somewhere (I cannot find it at the moment) that walks through an implementation of the PooledNumericIdGenerator.  It is quite good.  I can attest that the pooled generator works in CAB without any tweaking.  You should not have to touch the LIB source, at all.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:20pm
The NumericIdGenerator is implemented already in the core (IdeaBlade.Common.EntityMode).
 
So are you saying you have added it to you solution and it is using that one?
 
 Cause if you are that means that you have to IIdGenerator class instances and it is using the one in your solution rather then the one in the core.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:32pm
The PooledNumericIdGenerator inherits from IIdGenerator, if that's what you mean.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:35pm
I realize that. But, we currently alread have one in our solution. It is in the IdeaBlade.Common.EntityModel. 
 
If you have it in your solution where do you have it?
 
Bill J. please chime in.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:43pm

The PooledNumericIdGenerator.cs is a separate class file that resides within the Model project.  There is an example of this in one of the IdeaBlade tutorials.  I basically copied the file and pasted it into my model project.  There are a good set of comments within that file that will help you get things setup correctly.

Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 1:48pm
We are going around in circles.
 
What I am trying to say is that it is already exists in the Core. Under the IdeaBlade.Common.EntityModel which is referenced in the Model project.
 
But, from what you are saying it can also be in the Model.
 
I will put the Pool class in the Model until someone says there is a better place for it.
 
tx Linguinut
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 2:02pm
Originally posted by orcities

What would be the best way to implement this?
 
Not trying to get you to use red letters, just trying to answer your question.  I think I did--sorry for not being more clear.  Read the comments in those files (NumericIdGenerator.cs and PooledNumericIdGenerator) for more information.
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 2:05pm

If the NumericIdGenerator supplied with Cabana in the IdeaBlade.Common.EntityModel assembly doesn't do what you want, you can write your own and put it in your Model assembly.  Your implementation may or may not (your choice) inherit from NumericIdGenerator.

DevForce decides which one to use by searching the probe assemblies listed in your IdeaBlade.ibconfig file.
 
Bill J.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 2:06pm
So I take it that it searches our currently assembly first?
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 15-Oct-2007 at 2:07pm
Sorry, they really didn't need to be read I just chose a color. I was just trying to highlight that I understood all of that. I understand where it is suppose to go and how to use it.
 
But, I was wondering since it is already part of our solution, as a ref, if it can still be or should still be put in the Model project.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down