Shiva, For such situations , please use the IDENTITY key-generator as explaind at
http://castor.codehaus.org/key-generator.html Thanks Werner -----Ursprüngliche Nachricht----- Von: Shiva P. Kodityala [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 02. August 2005 17:57 An: [email protected] Betreff: RE: [castor-user] DuplicateIdentityException >From the Castor documentation, this Exception must not be thrown. In my mapping.xml: <class name="ClassName" identity="IDN" key-generator="MAX" > The value of column IDN is, in fact, is autogenerated. That means, if I put the row through sqlplus client, in my insert statement, I do not need to have any column 'IDN'. In that case, what should be key-generator? Do I have to have this key-generator at all? Thanks -----Original Message----- From: Shiva P. Kodityala [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 29, 2005 11:36 AM To: [email protected] Subject: [castor-user] DuplicateIdentityException I am getting this exception once in a while. If I understand it correctly, it is possible in the application I am working in. Two processes process the (different) xml data and put to table simultaneously. Table has primary key which is auto generated (so, not taken from xml). Does DuplicateIdentityException mean that inserts are happening simultaneously and getting the same autogenearted primary key (happening before another's commit)? Fortunately, the application tries (certain number of times) again to insert the same xml, in case of failure, and the insert succeeds. I don't know if it is a good way. Pls advise. Thanks ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] ------------------------------------------------- ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] ------------------------------------------------- ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

