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/core PersistenceBrokerHandle.java
Date Sat, 31 Dec 2005 19:02:50 GMT
arminw      2005/12/31 11:02:50

  Modified:    src/java/org/apache/ojb/broker/core Tag: OJB_1_0_RELEASE
                        PersistenceBrokerHandle.java
  Log:
  minor performance improvement
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.10.2.5  +8 -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.4
  retrieving revision 1.10.2.5
  diff -u -r1.10.2.4 -r1.10.2.5
  --- PersistenceBrokerHandle.java	21 Dec 2005 22:25:01 -0000	1.10.2.4
  +++ PersistenceBrokerHandle.java	31 Dec 2005 19:02:50 -0000	1.10.2.5
  @@ -20,6 +20,8 @@
   
   public class PersistenceBrokerHandle extends DelegatingPersistenceBroker
   {
  +    private Boolean closed;
  +
       /**
        * Constructor for the handle, set itself in
        * {@link PersistenceBrokerThreadMapping#setCurrentPersistenceBroker}
  @@ -32,7 +34,11 @@
   
       public boolean isClosed()
       {
  -        return super.isClosed();
  +        if(closed == null)
  +        {
  +            closed = super.isClosed() ? Boolean.TRUE : Boolean.FALSE;
  +        }
  +        return closed.booleanValue();
       }
   
       public boolean isInTransaction() throws PersistenceBrokerException
  @@ -51,6 +57,7 @@
           try
           {
               PersistenceBrokerThreadMapping.unsetCurrentPersistenceBroker(getPBKey(), this);
  +            closed = Boolean.TRUE;
               super.close();
           }
           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