db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/odmg ObjectEnvelopeTable.java
Date Thu, 05 Aug 2004 19:31:33 GMT
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


Mime
View raw message