pk generation, writing a JDBCPlugIn
pk generation, writing a JDBCPlugIn
- Subject: pk generation, writing a JDBCPlugIn
- From: email@hidden
- Date: Wed, 05 Nov 2003 15:49:18 CDT
- Priority: 3 (Normal)
[demime could not interpret encoding binary - treating as plain text]
Does anyone have experience writing a JDBCPlugIn sub-class?
I have one I've written for use with MS SQL Server 7. It's primary
function is to generate pks, by over-riding the newPrimaryKeys() method.
The issue is that sometimes, when executing the update query against the
EO_PK_TABLE table, the database responds with a "Your transaction
(process ID #8) was deadlocked with another process and has been chosen
as the deadlock victim. Rerun your transaction" exception. There is
really no way to write the code to avoid this absolutely it will just
happen from time to time. The appropriate response is simply to re-run
the queries included in the transaction.
I'd like to take care of this from within the JDBCPlugIn code. The
problem is, that I assume when this error happens, the entire transaction
has been rolled back by the db. I don't think EOF initiates a seperate
transaction just for the PK generation stuff, so that means other EOF db
updates may have been rolled back too. From within the JDBCPlugIn code,
I'm not sure how to properly get things back on track, and make sure that
everything that has been rolled-back is re-committed, as well as
succesfully acquire the PK. Is this even possible?
Any ideas?
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.