Update of /var/cvs/src/org/mmbase/module/corebuilders
In directory james.mmbase.org:/tmp/cvs-serv6212

Modified Files:
        InsRel.java 
Log Message:
 MMB-1686


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/corebuilders
See also: http://www.mmbase.org/jira/browse/MMB-1686


Index: InsRel.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/corebuilders/InsRel.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- InsRel.java 11 Feb 2007 19:21:12 -0000      1.54
+++ InsRel.java 18 Jul 2008 05:05:43 -0000      1.55
@@ -29,7 +29,7 @@
  *
  * @author Daniel Ockeloen
  * @author Pierre van Rooden
- * @version $Id: InsRel.java,v 1.54 2007/02/11 19:21:12 nklasens Exp $
+ * @version $Id: InsRel.java,v 1.55 2008/07/18 05:05:43 michiel Exp $
  */
 public class InsRel extends MMObjectBuilder {
 
@@ -75,8 +75,8 @@
      */
 
     private Cache<Integer, Vector<MMObjectNode>> relatedCache = new 
Cache<Integer, Vector<MMObjectNode>>(25) {
-        public String getName()        { return "RelatedCache"; }
-        public String getDescription() { return "Cache for Related Nodes"; }
+        public String getName()        { return "RelatedCache_" + 
InsRel.this.getTableName(); }
+        public String getDescription() { return "Cache for Related Nodes of 
builder " + InsRel.this.getTableName(); }
         };
 
 
@@ -92,8 +92,6 @@
      * needed for autoload
      */
     public InsRel() {
-        relatedCache.putCache();
-        // relationsCache.putCache();
     }
 
     /**
@@ -115,19 +113,21 @@
             // and continues without directionality (backward compatibility).
             //
             if (usesdir && !hasDirField && 
(!getTableName().equals(INSREL_BUILDER))) {
-                log.fatal("FATAL ERROR: Builder "+getTableName()+" has no dir 
field but directionality support was turned on.");
-                log.fatal("Table for "+getTableName()+" was NOT created.");
-                log.fatal("MMBase continues, but use of the "+getTableName()+" 
builder will fail.");
+                log.fatal("FATAL ERROR: Builder " + getTableName() + " has no 
dir field but directionality support was turned on.");
+                log.fatal("Table for " + getTableName() + " was NOT created.");
+                log.fatal("MMBase continues, but use of the " + getTableName() 
+ " builder will fail.");
                 return false;
             }
         }
-        boolean res=super.init();
+        boolean res = super.init();
         checkAddTmpField("_dnumber");
         checkAddTmpField("_snumber");
         if (res && usesdir && !hasDirField) {
             log.warn("No dir field. Directionality support turned off.");
             usesdir = false;
         }
+        relatedCache.putCache();
+        // relationsCache.putCache();
         return res;
     }
 
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to