db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r489530 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
Date Fri, 22 Dec 2006 00:54:40 GMT
Author: arminw
Date: Thu Dec 21 16:54:38 2006
New Revision: 489530

URL: http://svn.apache.org/viewvc?view=rev&rev=489530
Log:
enhance log message

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java?view=diff&rev=489530&r1=489529&r2=489530
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
Thu Dec 21 16:54:38 2006
@@ -43,6 +43,7 @@
 import org.apache.ojb.broker.util.logging.Logger;
 import org.apache.ojb.broker.util.logging.LoggerFactory;
 import org.apache.ojb.broker.util.sequence.SequenceManagerException;
+import org.apache.commons.lang.ArrayUtils;
 
 /**
  * JdbcAccess is responsible for establishing performing SQL Queries against remote
@@ -118,7 +119,9 @@
             if (stmt.executeUpdate() == 0 && cld.isLocking()) //BRJ
             {
                 postHandleBatchProcess(batchSetting);
-                throw new OptimisticLockException("Object has been modified or deleted by
someone else", obj);
+                throw new OptimisticLockException("Delete failed, object of class " + obj.getClass().getName()
+                        + " has been modified by someone else, locking fields: "
+                        + ArrayUtils.toString(cld.getLockingFields()), obj);
             }
             postHandleBatchProcess(batchSetting);
 
@@ -527,7 +530,9 @@
             if ((stmt.executeUpdate() == 0) && cld.isLocking()) //BRJ
             {
                 postHandleBatchProcess(batchSetting);
-                throw new OptimisticLockException("Object has been modified by someone else",
obj);
+                throw new OptimisticLockException("Update failed, object of class " + obj.getClass().getName()
+                        + " has been modified by someone else, locking fields: "
+                        + ArrayUtils.toString(cld.getLockingFields()), obj);
             }
             postHandleBatchProcess(batchSetting);
             // Harvest any return values.



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message