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/cache ObjectCacheTwoLevelImpl.java
Date Thu, 29 Sep 2005 17:26:34 GMT
arminw      2005/09/29 10:26:34

  Modified:    src/java/org/apache/ojb/broker/cache Tag: OJB_1_0_RELEASE
                        ObjectCacheTwoLevelImpl.java
  Log:
  minor code cleanup, get ProxyFactory from broker instance instead of using a helper class
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.11  +7 -7      db-ojb/src/java/org/apache/ojb/broker/cache/Attic/ObjectCacheTwoLevelImpl.java
  
  Index: ObjectCacheTwoLevelImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/Attic/ObjectCacheTwoLevelImpl.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- ObjectCacheTwoLevelImpl.java	12 Aug 2005 16:36:39 -0000	1.1.2.10
  +++ ObjectCacheTwoLevelImpl.java	29 Sep 2005 17:26:34 -0000	1.1.2.11
  @@ -142,7 +142,7 @@
           }
           this.sessionCache = new HashMap(100);
           // this.enabledReadCache = false;
  -        setupApplicationCache(broker, prop);
  +        setupApplicationCache(this.broker, prop);
           // we add this instance as a permanent PBStateListener
           broker.addListener(this, true);
       }
  @@ -156,7 +156,7 @@
           return broker;
       }
   
  -    private void setupApplicationCache(PersistenceBroker broker, Properties prop)
  +    private void setupApplicationCache(PersistenceBrokerImpl broker, Properties prop)
       {
           if(log.isDebugEnabled()) log.debug("Start setup application cache for broker "
+ broker);
           if(prop == null)
  @@ -177,9 +177,9 @@
           String forceProxyValue = prop.getProperty(FORCE_PROXIES, "false").trim();
           forceProxies = Boolean.valueOf(forceProxyValue).booleanValue();
           
  -        if (forceProxies && ProxyHelper.getProxyFactory().interfaceRequiredForProxyGeneration()){
  +        if (forceProxies && broker.getProxyFactory().interfaceRequiredForProxyGeneration()){
               log.warn("'" + FORCE_PROXIES + "' is set to true, however a ProxyFactory implementation
" +
  -                    "[" + ProxyHelper.getProxyFactory().getClass().getName() +"] " +
  +                    "[" + broker.getProxyFactory().getClass().getName() +"] " +
                       " that requires persistent objects to implement an inteface is being
used. Please ensure " +
                       "that all persistent objects implement an interface, or change the
ProxyFactory setting to a dynamic " +
                       "proxy generator (like ProxyFactoryCGLIBImpl).");
  @@ -621,7 +621,7 @@
               Object target = ClassHelper.buildNewObjectInstance(cld);
               // perform main object values
               FieldDescriptor[] flds = cld.getFieldDescriptions();
  -            FieldDescriptor fld = null;
  +            FieldDescriptor fld;
               for(int i = 0; i < flds.length; i++)
               {
                   fld = flds[i];
  @@ -645,7 +645,7 @@
               HashMap target = oldObject != null ? (HashMap) oldObject : new HashMap();
               // perform main object values
               FieldDescriptor[] flds = cld.getFieldDescriptions();
  -            FieldDescriptor fld = null;
  +            FieldDescriptor fld;
               for(int i = 0; i < flds.length; i++)
               {
                   fld = flds[i];
  
  
  

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