db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/sequence SequenceManagerNativeImpl.java SequenceManagerStoredProcedureImpl.java
Date Sun, 23 May 2004 16:38:37 GMT
brianm      2004/05/23 09:38:37

  Modified:    src/java/org/apache/ojb/broker/util/sequence
                        SequenceManagerNativeImpl.java
                        SequenceManagerStoredProcedureImpl.java
  Log:
  Better exception handling and error reporting patch submitted by Robert Sfeir.
  Submitted by:	Robert Sfeir
  
  Revision  Changes    Path
  1.17      +4 -2      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerNativeImpl.java
  
  Index: SequenceManagerNativeImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerNativeImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SequenceManagerNativeImpl.java	22 May 2004 10:03:02 -0000	1.16
  +++ SequenceManagerNativeImpl.java	23 May 2004 16:38:37 -0000	1.17
  @@ -238,10 +238,12 @@
               {
                   try
                   {
  -                    if (stmt != null) stmt.close();
  +                    stmt.close();
                   }
                   catch (SQLException e)
                   {
  +                    if(log.isDebugEnabled())
  +                        log.debug("Threw SQLException while in getLastInsert and closing
stmt" , e);
                       // ignore it
                   }
               }
  
  
  
  1.10      +5 -3      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java
  
  Index: SequenceManagerStoredProcedureImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerStoredProcedureImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SequenceManagerStoredProcedureImpl.java	22 May 2004 10:03:02 -0000	1.9
  +++ SequenceManagerStoredProcedureImpl.java	23 May 2004 16:38:37 -0000	1.10
  @@ -293,10 +293,12 @@
           {
               try
               {
  -                if (stmt != null) stmt.close();
  +                stmt.close();
               }
  -            catch (SQLException ignore)
  +            catch (SQLException sqle)
               {
  +                if(log.isDebugEnabled())
  +                    log.debug("Threw SQLException while in createSequence and closing stmt",
sqle);
                   // ignore it
               }
           }
  
  
  

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