Update of /var/cvs/applications/scan/src/org/mmbase/servlet
In directory james.mmbase.org:/tmp/cvs-serv24159

Modified Files:
      Tag: MMBase-1_8
        servscan.java 
Log Message:
if servscan is extened, stuff in 'setMMBase' is happening more than once, which 
is uncessary


See also: http://cvs.mmbase.org/viewcvs/applications/scan/src/org/mmbase/servlet


Index: servscan.java
===================================================================
RCS file: /var/cvs/applications/scan/src/org/mmbase/servlet/servscan.java,v
retrieving revision 1.45.2.1
retrieving revision 1.45.2.2
diff -u -b -r1.45.2.1 -r1.45.2.2
--- servscan.java       24 Jul 2007 20:55:37 -0000      1.45.2.1
+++ servscan.java       20 Feb 2008 11:53:37 -0000      1.45.2.2
@@ -30,7 +30,7 @@
  * also use JSP for a more traditional parser system.
  *
  * @rename Servscan
- * @version $Id: servscan.java,v 1.45.2.1 2007/07/24 20:55:37 michiel Exp $
+ * @version $Id: servscan.java,v 1.45.2.2 2008/02/20 11:53:37 michiel Exp $
  * @author Daniel Ockeloen
  * @author Rico Jansen
  * @author Jan van Oosterom
@@ -40,8 +40,8 @@
     private static Logger log;
 
     // modules used in servscan
-    private static sessionsInterface sessions=null;
-    private scanparser parser;
+    private static sessionsInterface sessions;
+    private static scanparser parser;
 
     public static final String SHTML_CONTENTTYPE = "text/html";
     public static final String DEFAULT_CHARSET = "UTF-8"; // can be overriden 
by parameter 'encoding' (in web.xml)
@@ -64,15 +64,15 @@
         super.setMMBase(mmb);
 
         // bugfix #6648: scan.init() is not called, this will sometimes result 
in a crash of mmbase
+        if (log == null) { // use nullness of log to check whether these 
statics were inited already.
         log = Logging.getLoggerInstance(servscan.class);
-
         try {
             MMBaseContext.initHtmlRoot();
         } catch (Exception e){
             log.error(e);
         }
         parser = (scanparser)getModule("SCANPARSER");
-        log.info("Getting scan parser " + parser);
+            log.info("Getting scan parser " + parser, new Exception());
         if(parser == null) {
             throw new RuntimeException("Module with name 'scanparser' should 
be active");
         }
@@ -81,6 +81,7 @@
             log.warn("module with name 'sessions' is not active");
         }
     }
+    }
 
     /**
      * Adds charSet to mimetype given by SHTML_CONTENTTYPE for handling
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to