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/broker/platforms PlatformDefaultImpl.java
Date Mon, 05 Sep 2005 23:37:26 GMT
arminw      2005/09/05 16:37:26

  Modified:    src/java/org/apache/ojb/broker/core Tag: OJB_1_0_RELEASE
                        DelegatingPersistenceBroker.java
                        PersistenceBrokerHandle.java
               src/java/org/apache/ojb/broker/platforms Tag:
                        OJB_1_0_RELEASE PlatformDefaultImpl.java
  Log:
  minor improvement, code cleanup
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.11.2.7  +3 -3      db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java
  
  Index: DelegatingPersistenceBroker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java,v
  retrieving revision 1.11.2.6
  retrieving revision 1.11.2.7
  diff -u -r1.11.2.6 -r1.11.2.7
  --- DelegatingPersistenceBroker.java	9 Aug 2005 20:03:20 -0000	1.11.2.6
  +++ DelegatingPersistenceBroker.java	5 Sep 2005 23:37:26 -0000	1.11.2.7
  @@ -165,12 +165,12 @@
   
       public boolean isInTransaction() throws PersistenceBrokerException
       {
  -        return m_broker != null ? getBroker().isInTransaction() : false;
  +        return m_broker != null && getBroker().isInTransaction();
       }
   
   	public boolean isClosed()
   	{
  -		return m_broker != null ? getBroker().isClosed() : true;
  +		return m_broker == null || getBroker().isClosed();
   	}
   
   	public void setClosed(boolean closed)
  
  
  
  1.10.2.3  +1 -1      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerHandle.java
  
  Index: PersistenceBrokerHandle.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerHandle.java,v
  retrieving revision 1.10.2.2
  retrieving revision 1.10.2.3
  diff -u -r1.10.2.2 -r1.10.2.3
  --- PersistenceBrokerHandle.java	7 May 2005 16:51:09 -0000	1.10.2.2
  +++ PersistenceBrokerHandle.java	5 Sep 2005 23:37:26 -0000	1.10.2.3
  @@ -36,7 +36,7 @@
   
       public boolean isInTransaction() throws PersistenceBrokerException
       {
  -        return isClosed() ? false : super.isInTransaction();
  +        return !isClosed() && super.isInTransaction();
       }
   
       /**
  
  
  
  No                   revision
  No                   revision
  1.27.2.6  +8 -6      db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java
  
  Index: PlatformDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java,v
  retrieving revision 1.27.2.5
  retrieving revision 1.27.2.6
  diff -u -r1.27.2.5 -r1.27.2.6
  --- PlatformDefaultImpl.java	16 Aug 2005 20:11:19 -0000	1.27.2.5
  +++ PlatformDefaultImpl.java	5 Sep 2005 23:37:26 -0000	1.27.2.6
  @@ -260,11 +260,13 @@
           }
           else
           {
  -            if (log.isDebugEnabled()) {
  -                log.debug("Default setObjectForStatement, sqlType=" + sqlType +
  -                          ", value class=" + (value == null ? "NULL!" : value.getClass().getName())
  -                            + ", value=" + value);
  -            }
  +// arminw: this method call is done very, very often, so we can improve performance
  +// by comment out this section
  +//            if (log.isDebugEnabled()) {
  +//                log.debug("Default setObjectForStatement, sqlType=" + sqlType +
  +//                          ", value class=" + (value == null ? "NULL!" : value.getClass().getName())
  +//                            + ", value=" + value);
  +//            }
               ps.setObject(index, value, sqlType);
           }
       }
  
  
  

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