Re: [JBoss-user] Generating primary keys in mySQL

2002-07-23 Thread Dimitri PISSARENKO
Hello! Now, I've implemented the first solution proposed in the book you suggested (Sequence bean generating and caching integer primary keys). It works well, but at the very first usage of it the transaction times out. Precisely, the call of "SequenceEntityBean.getValueAfterIncrementingBy" seem

RE: [JBoss-user] Generating primary keys in mySQL

2002-07-23 Thread Fanta Martin
Try to take a look at the excellent EJB Design Patterns book by Floyd Marinescu at TheServerSide.com: http://www.theserverside.com/books/EJBDesignPatterns/index.jsp There's a whole chapter [chapter 5] about primary key generation strategies, maybe it might help you. HTH Martin > -Original Me

Re: [JBoss-user] Generating primary keys in mySQL

2002-07-23 Thread Dimitri PISSARENKO
Thanks! On Tue, 23 Jul 2002 09:35:51 +0530 (IST), you wrote: >Dimitri, >As someone already pointed out, your pk generation strategy might not >gaurentee absolutely unique integers under concurrent access situations. >This problem has been debated extensively on different forums/lists and >you ca

Re: [JBoss-user] Generating primary keys in mySQL

2002-07-22 Thread Binil Thomas
Dimitri, As someone already pointed out, your pk generation strategy might not gaurentee absolutely unique integers under concurrent access situations. This problem has been debated extensively on different forums/lists and you can find the concise results of those discussions by taking a look at

Re: [JBoss-user] Generating primary keys in mySQL

2002-07-22 Thread David Jencks
The method you have chosen doesn't give unique pk values with more than one thread/user. There are many many ways to do this right, including I think an id generator bean included with jboss. Look in the archives. david jencks On 2002.07.22 13:25:58 -0400 Dimitri PISSARENKO wrote: > Hello! >