Changeset 5321

Show
Ignore:
Timestamp:
08/27/10 10:57:34 (18 months ago)
Author:
mtld
Message:

don't throw exception if same docroot is set multiple times

Location:
branches/release-0.13.x/pfixcore/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-0.13.x/pfixcore/src/de/schlund/pfixxml/config/GlobalConfig.java

    r4642 r5321  
    5555    static void setDocroot(String path) { 
    5656        if (docroot != null || servletContext != null) { 
     57            if(docroot.equals(path)) return; 
    5758            throw new IllegalStateException("Docroot or servlet context may only be set once!"); 
    5859        } 
  • branches/release-0.13.x/pfixcore/src/org/pustefixframework/http/internal/FactoryInitWorker.java

    r5179 r5321  
    9999     
    100100    private final static Object initLock = new Object(); 
    101     private static boolean initRunning = false; 
     101    private static boolean initialized = false; 
    102102 
    103103    public static void tryReloadLog4j() { 
     
    128128    public static void init(ServletContext servletContext) throws ServletException { 
    129129        synchronized (initLock) { 
    130             if (!initRunning) { 
    131                 initRunning = true; 
     130            if (!initialized) { 
    132131                (new FactoryInitWorker()).doInit(servletContext); 
     132                initialized = true; 
    133133            } 
    134134        }