getNextSeqId() bumping up sequences (creating new banks every call)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

getNextSeqId() bumping up sequences (creating new banks every call)

Ritesh Trivedi
Hi,

I am using MySQL DB wih Ofbiz, every time I call getNextSeqId(seqName, 1) (note staggerMax = 1) it seems to create sequence bank and consumes 10 ids - whats even wierd is the id I get is sometimes 20+ numbers apart!!

Any clues?
Reply | Threaded
Open this post in threaded view
|

Re: getNextSeqId() bumping up sequences (creating new banks every call)

Scott Gray
Are you sure it's every time and not just between server restarts?

Regards
Scott

On 23/01/2008, Ritz123 <[hidden email]> wrote:

>
>
> Hi,
>
> I am using MySQL DB wih Ofbiz, every time I call getNextSeqId(seqName, 1)
> (note staggerMax = 1) it seems to create sequence bank and consumes 10 ids
> -
> whats even wierd is the id I get is sometimes 20+ numbers apart!!
>
> Any clues?
> --
> View this message in context:
> http://www.nabble.com/getNextSeqId%28%29-bumping-up-sequences-%28creating-new-banks-every-call%29-tp15033839p15033839.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: getNextSeqId() bumping up sequences (creating new banks every call)

Ritesh Trivedi
Yes it is everytime.

The only thing different I might have is, I have a delegator as a static variable for the class and all the methods in the class are static too (since its more of a utility class). Service methods are static by design and I am storing the reference to the delegator which is derived in the service call and is used in all the static methods that get called as a result of the service call - so are in the same flow.

Scott Gray wrote
Are you sure it's every time and not just between server restarts?

Regards
Scott

On 23/01/2008, Ritz123 <ritesh.trivedi@gmail.com> wrote:
>
>
> Hi,
>
> I am using MySQL DB wih Ofbiz, every time I call getNextSeqId(seqName, 1)
> (note staggerMax = 1) it seems to create sequence bank and consumes 10 ids
> -
> whats even wierd is the id I get is sometimes 20+ numbers apart!!
>
> Any clues?
> --
> View this message in context:
> http://www.nabble.com/getNextSeqId%28%29-bumping-up-sequences-%28creating-new-banks-every-call%29-tp15033839p15033839.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>