You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by br...@apache.org on 2004/08/05 21:31:33 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/odmg ObjectEnvelopeTable.java
brj 2004/08/05 12:31:33
Modified: src/java/org/apache/ojb/odmg ObjectEnvelopeTable.java
Log:
indicate the obj that caused the lock-exception (by charles anthony)
Revision Changes Path
1.33 +5 -4 db-ojb/src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java
Index: ObjectEnvelopeTable.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- ObjectEnvelopeTable.java 24 Jun 2004 15:36:56 -0000 1.32
+++ ObjectEnvelopeTable.java 5 Aug 2004 19:31:32 -0000 1.33
@@ -169,12 +169,13 @@
log.error("Commit on object level failed for tx " + transaction, t);
if (t instanceof OptimisticLockException)
{
- // PB OptimisticLockException should be clearly signalled to the user
- throw new LockNotGrantedException(t.getMessage());
+ // PB OptimisticLockException should be clearly signalled to the user
+ Object sourceObject = ((OptimisticLockException) t).getSourceObject();
+ throw new LockNotGrantedException("(" + sourceObject + ")" + t.getMessage());
}
- else
+ else
{
- throw new TransactionAbortedExceptionOJB(t);
+ throw new TransactionAbortedExceptionOJB(t);
}
}
finally
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org