db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/odmg DatabaseImpl.java
Date Sun, 04 Jan 2004 01:33:23 GMT
arminw      2004/01/03 17:33:23

  Modified:    src/java/org/apache/ojb/odmg DatabaseImpl.java
  Log:
  generate more detailed error message on db.close()
  
  Revision  Changes    Path
  1.22      +8 -5      db-ojb/src/java/org/apache/ojb/odmg/DatabaseImpl.java
  
  Index: DatabaseImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/DatabaseImpl.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DatabaseImpl.java	6 Feb 2003 21:20:25 -0000	1.21
  +++ DatabaseImpl.java	4 Jan 2004 01:33:23 -0000	1.22
  @@ -207,10 +207,13 @@
                   getTransaction().isOpen() &&
                   getTransaction().getAssociatedDatabase().equals(this))
           {
  -            log.error("Could not close database, found active transaction. tx-status was
'"+
  -            TxUtil.getStatusString(getTransaction().getStatus())+"'");
  -            throw new TransactionInProgressException("Database cannot be closed, associated
Tx is still open."+
  -                    "\nUsed PBKey was "+getTransaction().getBroker().getPBKey());
  +            String txStatus = TxUtil.getStatusString(getTransaction().getStatus());
  +            TransactionInProgressException ex = new TransactionInProgressException(
  +                    "Database cannot be closed, associated Tx is still open." +
  +                    " Transaction status is '" + txStatus + "'." +
  +                    " Used PBKey was "+getTransaction().getBroker().getPBKey());
  +            log.error(ex);
  +            throw ex;
           }
           isOpen = false;
           // remove the current PBKey
  
  
  

---------------------------------------------------------------------
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