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

2002-07-23 Thread Dimitri PISSARENKO
ssage- >> From: Dimitri PISSARENKO [mailto:[EMAIL PROTECTED]] >> Sent: Monday, July 22, 2002 7:56 PM >> To: [EMAIL PROTECTED] >> Subject: [JBoss-user] Generating primary keys in mySQL >> >> >> Hello! >> >> I have a table in a mySQL database

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

2002-07-23 Thread Fanta Martin
Original Message- > From: Dimitri PISSARENKO [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 7:56 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-user] Generating primary keys in mySQL > > > Hello! > > I have a table in a mySQL database which I access through JB

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! >

[JBoss-user] Generating primary keys in mySQL

2002-07-22 Thread Dimitri PISSARENKO
Hello! I have a table in a mySQL database which I access through JBoss 3.0.0 (by means of CMP entity beans). In this table I have an integer primary key. When creating a new record in the table, I have to generate a new primary key with the query SELECT MAX(projectPrimaryKey)+1 FROM projects T