You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Janssen, Roger" <Ro...@ibanx.nl> on 2003/05/08 14:34:40 UTC

Feature request - Sequence Manager

hi,

sometimes i need to acquire more then one generated id (not 1 or 2, no maybe
40 or 50 id's).

i do not want to call a method, resulting in a database transaction, of the
sequencemanager for every id (performance killer).
[ a work around is to increase grabsize, but then this increases grabsize
for ALL sequences, i do not want that to happen ]
i need to be able to generate a batch of id's (or increase the increment ad
hoc, just for this method call) with one method call and one database
transaction. 

a different approach would be to implement the ability to set grabsize per
sequence.

is anybody working on these features, or are there already ways to achieve
this with ojb that i missed?

roger janssen


*************************************************************************
The information contained in this communication is confidential and is
intended solely for the use of the individual or entity to  whom it is
addressed.You should not copy, disclose or distribute this communication 
without the authority of iBanx bv. iBanx bv is neither liable for 
the proper and complete transmission of the information has been maintained
nor that the communication is free of viruses, interceptions or interference.

If you are not the intended recipient of this communication please return
the communication to the sender and delete and destroy all copies.

Re: Feature request - Sequence Manager

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Roger,

> sometimes i need to acquire more then one generated id (not 1 or 2, no
maybe
> 40 or 50 id's).
>
> i do not want to call a method, resulting in a database transaction,
of the
> sequencemanager for every id (performance killer).
> [ a work around is to increase grabsize, but then this increases
grabsize
> for ALL sequences, i do not want that to happen ]
> i need to be able to generate a batch of id's (or increase the
increment ad
> hoc, just for this method call) with one method call and one database
> transaction.
>
> a different approach would be to implement the ability to set grabsize
per
> sequence.
>
> is anybody working on these features,

No, I think nobody working on that stuff..

> or are there already ways to achieve
> this with ojb that i missed?

No currently there is no way to achieve this, you have
to implement yout own sequence manager or enhance
an  existing implementation.

Your 'set grabsize per sequence' feature should be easy
to implement, using a custom-attribute in field-descriptor
to set the grabSize per sequence-name (only pitfall, when
using 'extents' with same sequence-name, but set different
grabSize in field-descriptor - which grabSize should be used?).

Take a look in SequenceManagerHighLowImpl, think it's a good
starting point (by changing a few lines of code it should be
made possible).

If you willing to share your code, we are interested
in all enhancements ;-)

regards,
Armin

>
> roger janssen
>
>
>
************************************************************************
*
> The information contained in this communication is confidential and is
> intended solely for the use of the individual or entity to  whom it is
> addressed.You should not copy, disclose or distribute this
communication
> without the authority of iBanx bv. iBanx bv is neither liable for
> the proper and complete transmission of the information has been
maintained
> nor that the communication is free of viruses, interceptions or
interference.
>
> If you are not the intended recipient of this communication please
return
> the communication to the sender and delete and destroy all copies.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>