JPA, InnoDB, and locking in multi-threaded app

2009-09-14 Thread Grover Blue
Hi everyone, I have an application that spawns various threads for inserting into various table. Additionally, another thread is launched to delete old records. They all use JPA and entity managed transactions. I think I'm getting locking issues, but I'm not sure. So, I'd like to get your thoug

Re: InnoDB and locking

2006-02-11 Thread Peter Brawley
Patrick, >c.setAutoCommit(false); ... >rs = statement.executeQuery("select request_id from requestid_innodb for update"); >... >String updateQuery = "update requestid_innodb set request_id="; > updateQuery = updateQuery + nextRequestId; >tempStatement = c.createStatement(); >tempStatement.execu

Re: InnoDB and locking

2006-02-11 Thread Heikki Tuuri
ry 10, 2006 9:01 PM Subject: Re: InnoDB and locking At 12:54 PM 2/10/2006, Mark Matthews wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patrick Duda wrote: > I guess I don't understand this locking stuff. I have a InnoDB table > that has one thing in it, a counter. All I

Re: InnoDB and locking

2006-02-10 Thread Patrick Duda
At 12:54 PM 2/10/2006, Mark Matthews wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patrick Duda wrote: > I guess I don't understand this locking stuff. I have a InnoDB table > that has one thing in it, a counter. All I want to do is have multiple > instances of the code read this counte

Re: InnoDB and locking

2006-02-10 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patrick Duda wrote: > I guess I don't understand this locking stuff. I have a InnoDB table > that has one thing in it, a counter. All I want to do is have multiple > instances of the code read this counter and increment it. I want to > make sure tha

Re: InnoDB and locking

2006-02-10 Thread Patrick Duda
At 10:52 AM 2/10/2006, [EMAIL PROTECTED] wrote: Patrick Duda <[EMAIL PROTECTED]> wrote on 10/02/2006 16:28:56: > I guess I don't understand this locking stuff. I have a InnoDB table that > has one thing in it, a counter. All I want to do is have multiple > instances of the code read this count

Re: InnoDB and locking

2006-02-10 Thread Alec . Cawley
Patrick Duda <[EMAIL PROTECTED]> wrote on 10/02/2006 16:28:56: > I guess I don't understand this locking stuff. I have a InnoDB table that > has one thing in it, a counter. All I want to do is have multiple > instances of the code read this counter and increment it. I want to make > sure t

InnoDB and locking

2006-02-10 Thread Patrick Duda
I guess I don't understand this locking stuff. I have a InnoDB table that has one thing in it, a counter. All I want to do is have multiple instances of the code read this counter and increment it. I want to make sure that each one is unique. Here is what I am doing in java: c.setAutoCommi