Update of /var/cvs/applications/scan/src/org/mmbase/servlet
In directory james.mmbase.org:/tmp/cvs-serv24245
Modified Files:
servscan.java
Log Message:
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.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- servscan.java 21 Jun 2007 15:50:24 -0000 1.46
+++ servscan.java 20 Feb 2008 11:55:33 -0000 1.47
@@ -30,7 +30,7 @@
* also use JSP for a more traditional parser system.
*
* @rename Servscan
- * @version $Id: servscan.java,v 1.46 2007/06/21 15:50:24 nklasens Exp $
+ * @version $Id: servscan.java,v 1.47 2008/02/20 11:55:33 michiel Exp $
* @author Daniel Ockeloen
* @author Rico Jansen
* @author Jan van Oosterom
@@ -41,7 +41,7 @@
// modules used in servscan
private static sessionsInterface sessions=null;
- private scanparser parser;
+ 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)
@@ -63,25 +63,23 @@
public void setMMBase(MMBase mmb) {
super.setMMBase(mmb);
+ if (log == null) { // use nullness of log to check whether these
statics were inited /already.
// bugfix #6648: scan.init() is not called, this will sometimes result
in a crash of mmbase
log = Logging.getLoggerInstance(servscan.class);
-
try {
MMBaseContext.initHtmlRoot();
} catch (Exception e){
log.error(e);
}
- log.info("Getting scan parser");
parser = (scanparser)getModule("SCANPARSER");
+ log.info("Getting scan parser " + parser, new Exception());
if(parser == null) {
- String msg = "Module with name 'scanparser' should be active";
- log.error(msg);
- throw new RuntimeException(msg);
+ throw new RuntimeException("Module with name 'scanparser'
should be active");
}
sessions = (sessionsInterface)getModule("SESSION");
if(sessions == null) {
- String msg = "module with name 'sessions' is not active";
- log.warn(msg);
+ log.warn("module with name 'sessions' is not active");
+ }
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs