Re: [hibernate-dev] Feature for handling getNextValue work in same transaction.

2013-09-05 Thread Jeremy Whiting
Hi Steve, Since my last response I have gone back to the drawing board to re-evaluate and test the proposed change. In brief the change does inline the sql in the current transaction and uses pessimistic locking. This is a change to the initial ideas suggested. Reasons for that are later in t

Re: [hibernate-dev] Feature for handling getNextValue work in same transaction.

2013-08-16 Thread Jeremy Whiting
On 12/08/13 02:51, Steve Ebersole wrote: > First, you lump sequences and table-based sequence together here, but I > assure you sequences (real database sequences) are read inline with the > current transaction. In the case of a real sequence, the database > already handles the isolation of the

Re: [hibernate-dev] Feature for handling getNextValue work in same transaction.

2013-08-11 Thread Steve Ebersole
First, you lump sequences and table-based sequence together here, but I assure you sequences (real database sequences) are read inline with the current transaction. In the case of a real sequence, the database already handles the isolation of the generated values outside transactional context.

Re: [hibernate-dev] Feature for handling getNextValue work in same transaction.

2013-08-11 Thread Sanne Grinovero
On 9 August 2013 19:08, Jeremy Whiting wrote: > Hi Scott, > To the database the sequence of statements will be as follows. The > statements around the read and write of sequence table are an example to > put the sequence_table work into context. > > tx1 BEGIN > SELECT blah > SELECT blah >

Re: [hibernate-dev] Feature for handling getNextValue work in same transaction.

2013-08-09 Thread Jeremy Whiting
Hi Scott, To the database the sequence of statements will be as follows. The statements around the read and write of sequence table are an example to put the sequence_table work into context. tx1 BEGIN SELECT blah SELECT blah UPDATE blah SELECT * from sequence_table; UPDATE sequence_table

Re: [hibernate-dev] Feature for handling getNextValue work in same transaction.

2013-08-09 Thread Scott Marlow
On 08/08/2013 11:21 AM, Jeremy Whiting wrote: > Hi, >I am looking for feedback on changes to provide the ability for work > to be completed in a currently running transaction. For example when a > TableGenerator or SequenceGenerator is being used for generating unique > ids. The statements that

[hibernate-dev] Feature for handling getNextValue work in same transaction.

2013-08-08 Thread Jeremy Whiting
Hi, I am looking for feedback on changes to provide the ability for work to be completed in a currently running transaction. For example when a TableGenerator or SequenceGenerator is being used for generating unique ids. The statements that select then update the db are executed in a separate