Hi,

I'm not a database expert, so please forbear with me ;-)

Edson Carlos Ericksson Richter wrote:
Hi!

There is a very long time since my last problem with OJB - thank you guys, it's awesome how good work was done until now. In last month, I was migrating from Oracle to MS SQL, and changed from Sequence Manager Oracle native to Procedure based on MS SQL. Worked great on tests, but when in production, sometimes procedure returns same value for two users, overriding content of child tables (it override child tables, then throw duplicate primary key exception for parent table but changes on child tables are not being rolled back).

Are you sure that the changes written to database or could it be a caching problem?


I'm sure I'm beginning and rollbacking transactions, and opening and closing connections (i never had this problem with Oracle, by example).

Did you made concurrency tests against SequenceManagerStoredProcedureImpl? In OJB test-suite you can find a test case called SequenceManagerTest. This test case include concurrency sequence generation tests.
Is the issue reproduceable via unit tests?

In SequenceManagerStoredProcedureImpl source code I can't find critical sections. So I assume it's a MSSQL concurrency problem. Does
UPDATE OJB_NEXTVAL_SEQ...
exclusive lock the table row?

regards,
Armin


I was thinking if the problem wasn't default transaction level for MS SQL being different from Oracle (and MaxDB, that I used before getting in nervous with constant crashes/bad performance...).

Someone has faced similar problems?

Thanks,


Edson Richter



------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to