roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r549293 - in /roller/trunk/apps/weblogger: ./ src/java/org/apache/roller/weblogger/business/ src/java/org/apache/roller/weblogger/business/hibernate/ src/java/org/apache/roller/weblogger/business/jpa/ src/java/org/apache/roller/weblogger/bu...
Date Wed, 20 Jun 2007 23:22:15 GMT
Author: agilliland
Date: Wed Jun 20 16:22:13 2007
New Revision: 549293

URL: http://svn.apache.org/viewvc?view=rev&rev=549293
Log:
more work on improving application lifecycle layering.  this commit adds in a Roller.initialize() method which is used to allow components of the business tier to initialize themselves after being bootstrapped.  This replaces the RollerFactory.initialize() method from the previous commit.

also fixing up the unit tests which need to be a little more aware of the proper way of bootstrapping the application now.


Modified:
    roller/trunk/apps/weblogger/properties.xmlf
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/PropertiesManager.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/Roller.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerFactory.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerImpl.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/hibernate/HibernatePropertiesManagerImpl.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManager.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManager.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManager.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/RollerContext.java
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/Install.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/TestUtils.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/BookmarkTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CommentTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CoreWeblogPlatformTestSuite.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FileManagerTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderCRUDTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderFunctionalityTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderParentDeletesTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/HitCountTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PermissionTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PingsTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PropertiesTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/RefererTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/TaskLockTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/UserTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryCRUDTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryFunctionalityTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryParentDeletesTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogEntryTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogPageTest.java
    roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogTest.java

Modified: roller/trunk/apps/weblogger/properties.xmlf
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/properties.xmlf?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/properties.xmlf (original)
+++ roller/trunk/apps/weblogger/properties.xmlf Wed Jun 20 16:22:13 2007
@@ -47,7 +47,7 @@
 <property name="build.dist.apache"   value="${build.dist}/apache"/>
 <property name="build.dist.binary"   value="${build.dist}/apache-roller-${ro.version}"/>
 <property name="build.dist.sources"  value="${build.dist}/apache-roller-src-${ro.version}"/>
-<property name="build.dbscripts"     value="${build.webapp}/WEB-INF/dbscripts"/>
+<property name="build.dbscripts"     value="${build.webapp}/WEB-INF/classes/dbscripts"/>
 <property name="build.tests"         value="${ro.build}/tests"/>
 <property name="build.reports"       value="${build.tests}/reports"/>
 <property name="build.docs"          value="${ro.build}/docs"/>

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/PropertiesManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/PropertiesManager.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/PropertiesManager.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/PropertiesManager.java Wed Jun 20 16:22:13 2007
@@ -1,24 +1,19 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-*  contributor license agreements.  The ASF licenses this file to You
-* under the Apache License, Version 2.0 (the "License"); you may not
-* use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.  For additional information regarding
-* copyright in this work, please see the NOTICE file in the top level
-* directory of this distribution.
-*/
-/*
- * PropertiesManager.java
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Created on April 21, 2005, 10:34 AM
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
  */
 
 package org.apache.roller.weblogger.business;
@@ -34,31 +29,39 @@
 public interface PropertiesManager {
     
     /**
+     * Initialize the properties manager.
+     *
+     * @throws InitializationException If there is a problem during initialization.
+     */
+    public void initialize() throws InitializationException;
+    
+    
+    /**
      * Release all resources associated with Roller session.
      */
     public void release();
     
     
-    /** 
-     * Save a single property 
+    /**
+     * Save a single property
      */
     public void saveProperty(RuntimeConfigProperty property) throws WebloggerException;
     
     
-    /** 
-     * Save a list of properties 
+    /**
+     * Save a list of properties
      */
     public void saveProperties(Map properties) throws WebloggerException;
     
     
-    /** 
-     * Retrieve a single property by name 
+    /**
+     * Retrieve a single property by name
      */
     public RuntimeConfigProperty getProperty(String name) throws WebloggerException;
     
     
-    /** 
-     * Retrieve a list of all properties 
+    /**
+     * Retrieve a list of all properties
      */
     public Map getProperties() throws WebloggerException;
     

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/Roller.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/Roller.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/Roller.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/Roller.java Wed Jun 20 16:22:13 2007
@@ -18,10 +18,8 @@
 
 package org.apache.roller.weblogger.business;
 
-import org.apache.roller.weblogger.business.plugins.PluginManager;
-import java.io.Serializable;
-import java.sql.Connection;
 import org.apache.roller.weblogger.WebloggerException;
+import org.apache.roller.weblogger.business.plugins.PluginManager;
 import org.apache.roller.weblogger.business.pings.AutoPingManager;
 import org.apache.roller.weblogger.business.pings.PingQueueManager;
 import org.apache.roller.weblogger.business.pings.PingTargetManager;
@@ -135,9 +133,16 @@
     
     
     /**
+     * Initialize any resources necessary for this instance of Roller.
+     */
+    public void initialize() throws InitializationException;
+    
+    
+    /**
      * Release all resources necessary for this instance of Roller.
      */
     public void shutdown();
+    
     
     /** Roller version */
     public String getVersion();    

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerFactory.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerFactory.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerFactory.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerFactory.java Wed Jun 20 16:22:13 2007
@@ -33,9 +33,6 @@
     
     private static final Log log = LogFactory.getLog(RollerFactory.class);
     
-    // have we been bootstrapped yet?
-    private static boolean bootstrapped = false;
-    
     // a reference to the bootstrapped Roller instance
     private static Roller rollerInstance = null;
     
@@ -50,7 +47,7 @@
      * True if bootstrap process was completed, False otherwise.
      */
     public static boolean isBootstrapped() {
-        return bootstrapped;
+        return (rollerInstance != null);
     }
     
     
@@ -107,74 +104,12 @@
             // do the invocation
             rollerInstance = (Roller) instanceMethod.invoke(rollerClass, (Object[])null);
             
-            // note that we've now been bootstrapped
-            bootstrapped = true;
-            
         } catch (Throwable ex) {
             // bootstrapping failed
             throw new BootstrapException("Exception doing bootstrapping", ex);
         }
         
         log.info("Roller Weblogger business tier successfully bootstrapped");
-    }
-    
-    
-    /**
-     * Initialize the Roller Weblogger business tier.
-     *
-     * Initialization is used to perform any logic that needs to happen only
-     * once after the application has been properly bootstrapped.
-     *
-     * @throws IllegalStateException If the app has not been bootstrapped yet.
-     * @throws InitializationException If there is an error during initialization.
-     */
-    public static final void initialize() throws InitializationException {
-        
-        // TODO: this initialization process should probably be controlled by
-        // a more generalized application lifecycle event framework
-        
-        if(!isBootstrapped()) {
-            throw new IllegalStateException("Cannot initialize until application has been properly bootstrapped");
-        }
-        
-        log.info("Initializing Roller Weblogger business tier");
-        
-        try {
-            
-            Roller roller = getRoller();
-            
-            // Now that Roller has been bootstrapped, initialize individual managers
-            roller.getPropertiesManager();
-            roller.getIndexManager();
-            roller.getThemeManager();
-            
-            // And this will schedule all configured tasks
-            roller.getThreadManager().startTasks();
-            
-            // Initialize ping systems
-
-            // Initialize common targets from the configuration
-            PingConfig.initializeCommonTargets();
-            
-            // Initialize ping variants
-            PingConfig.initializePingVariants();
-            
-            // Remove custom ping targets if they have been disallowed
-            if (PingConfig.getDisallowCustomTargets()) {
-                log.info("Custom ping targets have been disallowed.  Removing any existing custom targets.");
-                RollerFactory.getRoller().getPingTargetManager().removeAllCustomPingTargets();
-            }
-            
-            // Remove all autoping configurations if ping usage has been disabled.
-            if (PingConfig.getDisablePingUsage()) {
-                log.info("Ping usage has been disabled.  Removing any existing auto ping configurations.");
-                RollerFactory.getRoller().getAutopingManager().removeAllAutoPings();
-            }
-        } catch (Throwable t) {
-            throw new InitializationException("Error initializing ping systems", t);
-        }
-        
-        log.info("Roller Weblogger business tier successfully initialized");
     }
 
 }

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerImpl.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerImpl.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/RollerImpl.java Wed Jun 20 16:22:13 2007
@@ -24,6 +24,7 @@
 import java.util.Properties;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.referrers.ReferrerQueueManager;
 import org.apache.roller.weblogger.business.referrers.ReferrerQueueManagerImpl;
 import org.apache.roller.weblogger.business.runnable.ThreadManagerImpl;
@@ -32,6 +33,7 @@
 import org.apache.roller.weblogger.business.runnable.ThreadManager;
 import org.apache.roller.weblogger.business.themes.ThemeManager;
 import org.apache.roller.weblogger.business.themes.ThemeManagerImpl;
+import org.apache.roller.weblogger.config.PingConfig;
 
 
 /**
@@ -54,6 +56,7 @@
     private String buildTime = null;
     private String buildUser = null;
     
+    
     public RollerImpl() {
                 
         Properties props = new Properties();
@@ -140,6 +143,57 @@
         } catch(Throwable e) {
             mLogger.error("Error calling Roller.release()", e);
         }
+    }
+    
+    
+    /**
+     * @inheritDoc
+     */
+    public void initialize() throws InitializationException {
+        
+        mLogger.info("Initializing Roller Weblogger business tier");
+        
+        // TODO: this should probably be done in a more uniform fashion, possibly
+        // using annotations?  biggest issue is controlling ordering
+        getPropertiesManager().initialize();
+        getThemeManager().initialize();
+        getThreadManager().initialize();
+        getIndexManager().initialize();
+        
+        try {
+            // Initialize ping systems
+            // TODO: this should probably be moving inside ping manager initialize() methods?
+            
+            // Initialize common targets from the configuration
+            PingConfig.initializeCommonTargets();
+            
+            // Initialize ping variants
+            PingConfig.initializePingVariants();
+            
+            // Remove custom ping targets if they have been disallowed
+            if (PingConfig.getDisallowCustomTargets()) {
+                mLogger.info("Custom ping targets have been disallowed.  Removing any existing custom targets.");
+                RollerFactory.getRoller().getPingTargetManager().removeAllCustomPingTargets();
+            }
+            
+            // Remove all autoping configurations if ping usage has been disabled.
+            if (PingConfig.getDisablePingUsage()) {
+                mLogger.info("Ping usage has been disabled.  Removing any existing auto ping configurations.");
+                RollerFactory.getRoller().getAutopingManager().removeAllAutoPings();
+            }
+        } catch (Throwable t) {
+            throw new InitializationException("Error initializing ping systems", t);
+        }
+        
+        // we always need to do a flush after initialization because it's
+        // possible that some changes need to be persisted
+        try {
+            flush();
+        } catch(WebloggerException ex) {
+            throw new InitializationException("Error flushing after initialization", ex);
+        }
+        
+        mLogger.info("Roller Weblogger business tier successfully initialized");
     }
     
     

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/hibernate/HibernatePropertiesManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/hibernate/HibernatePropertiesManagerImpl.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/hibernate/HibernatePropertiesManagerImpl.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/hibernate/HibernatePropertiesManagerImpl.java Wed Jun 20 16:22:13 2007
@@ -28,14 +28,13 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
+import org.apache.roller.weblogger.business.InitializationException;
 import org.apache.roller.weblogger.config.RollerRuntimeConfig;
 import org.apache.roller.weblogger.config.runtime.ConfigDef;
 import org.apache.roller.weblogger.config.runtime.DisplayGroup;
 import org.apache.roller.weblogger.config.runtime.PropertyDef;
 import org.apache.roller.weblogger.config.runtime.RuntimeConfigDefs;
 import org.apache.roller.weblogger.business.PropertiesManager;
-import org.apache.roller.weblogger.business.Roller;
-import org.apache.roller.weblogger.business.RollerFactory;
 import org.apache.roller.weblogger.pojos.RuntimeConfigProperty;
 
 
@@ -59,9 +58,29 @@
         log.debug("Instantiating Hibernate Properties Manager");
         
         this.strategy = strat;
+    }
+    
+    
+    /**
+     * @inheritDoc
+     */
+    public void initialize() throws InitializationException {
+        
+        Map props = null;
+        try {
+            props = this.getProperties();
+            
+            // check for new props
+            props = initializeMissingProps(props);
+            
+            // save our changes
+            this.saveProperties(props);
+        } catch (Exception e) {
+            log.fatal("Failed to initialize runtime configuration properties."+
+                    "Please check that the database has been upgraded!", e);
+            throw new RuntimeException(e);
+        }
         
-        // TODO: and new method initialize(props)
-        init();
     }
     
     
@@ -133,25 +152,6 @@
         while (props.hasNext()) {
             this.strategy.store((RuntimeConfigProperty) props.next());
         }
-    }
-
-    
-    private void init() {
-        Map props = null;
-        try {
-            props = this.getProperties();
-            
-            // check for new props
-            props = initializeMissingProps(props);
-            
-            // save our changes
-            this.saveProperties(props);
-        } catch (Exception e) {
-            log.fatal("Failed to initialize runtime configuration properties."+
-                    "Please check that the database has been upgraded!", e);
-            throw new RuntimeException(e);
-        }
-        
     }
     
     

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java Wed Jun 20 16:22:13 2007
@@ -25,9 +25,9 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.roller.weblogger.business.jpa.JPAPersistenceStrategy;
 
 import org.apache.roller.weblogger.WebloggerException;
+import org.apache.roller.weblogger.business.InitializationException;
 
 import org.apache.roller.weblogger.business.PropertiesManager;
 import org.apache.roller.weblogger.config.RollerRuntimeConfig;
@@ -60,11 +60,37 @@
         log.debug("Instantiating JPA Properties Manager");
 
         this.strategy = strategy;
-
-        // TODO: and new method initialize(props)
-        init();
     }
+    
+    
+    /**
+     * @inheritDoc
+     */
+    public void initialize() throws InitializationException {
+        
+        Map props = null;
+        try {
+            props = this.getProperties();
 
+            if(props.size() < 1) {
+                // empty props table ... load defaults
+                props = initializeMissingProps(props);
+            } else {
+                // found existing props ... check for new props
+                props = initializeMissingProps(props);
+            }
+
+            // save our changes
+            this.saveProperties(props);
+        } catch (Exception e) {
+            log.fatal("Failed to initialize runtime configuration properties."+
+                    "Please check that the database has been upgraded!", e);
+            throw new RuntimeException(e);
+        }
+        
+    }
+    
+    
     /**
      * Retrieve a single property by name.
      */
@@ -122,30 +148,7 @@
             this.strategy.store((RuntimeConfigProperty) props.next());
         }
     }
-
-
-    private void init() {
-        Map props = null;
-        try {
-            props = this.getProperties();
-
-            if(props.size() < 1) {
-                // empty props table ... load defaults
-                props = initializeMissingProps(props);
-            } else {
-                // found existing props ... check for new props
-                props = initializeMissingProps(props);
-            }
-
-            // save our changes
-            this.saveProperties(props);
-        } catch (Exception e) {
-            log.fatal("Failed to initialize runtime configuration properties."+
-                    "Please check that the database has been upgraded!", e);
-            throw new RuntimeException(e);
-        }
-
-    }
+    
 
     /**
      * This method compares the property definitions in the RuntimeConfigDefs

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManager.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManager.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManager.java Wed Jun 20 16:22:13 2007
@@ -19,6 +19,7 @@
 package org.apache.roller.weblogger.business.runnable;
 
 import java.util.Date;
+import org.apache.roller.weblogger.business.InitializationException;
 
 
 /**
@@ -30,9 +31,11 @@
     
     
     /**
-     * Schedule execution of all configured tasks.
+     * Initialize the thread management system.
+     *
+     * @throws InitializationException If there is a problem during initialization.
      */
-    public void startTasks();
+    public void initialize() throws InitializationException;
     
     
     /**

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/runnable/ThreadManagerImpl.java Wed Jun 20 16:22:13 2007
@@ -19,7 +19,6 @@
 package org.apache.roller.weblogger.business.runnable;
 
 import java.util.Date;
-import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
@@ -28,6 +27,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
+import org.apache.roller.weblogger.business.InitializationException;
 import org.apache.roller.weblogger.config.RollerConfig;
 
 
@@ -49,7 +49,8 @@
         serviceScheduler = Executors.newScheduledThreadPool(10);
     }
     
-    public void startTasks() {
+    
+    public void initialize() throws InitializationException {
         
         Date now = new Date();
         
@@ -83,8 +84,10 @@
                     log.error("Error instantiating task", ex);
                 }
             }
-        }        
+        }
+        
     }
+    
     
     public void executeInBackground(Runnable runnable)
             throws InterruptedException {

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManager.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManager.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManager.java Wed Jun 20 16:22:13 2007
@@ -18,8 +18,8 @@
 package org.apache.roller.weblogger.business.search;
 
 import org.apache.roller.weblogger.WebloggerException;
+import org.apache.roller.weblogger.business.InitializationException;
 import org.apache.roller.weblogger.business.search.operations.IndexOperation;
-import org.apache.roller.weblogger.pojos.User;
 import org.apache.roller.weblogger.pojos.WeblogEntry;
 import org.apache.roller.weblogger.pojos.Weblog;
 
@@ -51,6 +51,15 @@
      * Release all resources associated with Roller session.
      */
     public abstract void release();
+    
+    
+    /**
+     * Initialize the search system.
+     *
+     * @throws InitializationException If there is a problem during initialization.
+     */
+    public void initialize() throws InitializationException;
+    
     
     /** Shutdown to be called on application shutdown */
     public abstract void shutdown();

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java Wed Jun 20 16:22:13 2007
@@ -93,6 +93,7 @@
      *            the path to the index directory
      */
     public IndexManagerImpl() {
+        
         // check config to see if the internal search is enabled
         String enabled = RollerConfig.getProperty("search.enabled");
         if("false".equalsIgnoreCase(enabled))
@@ -101,7 +102,6 @@
         // we also need to know what our index directory is
         // Note: system property expansion is now handled by RollerConfig
         String searchIndexDir = RollerConfig.getProperty("search.index.dir");
-        
         this.indexDir = searchIndexDir.replace('/', File.separatorChar);
         
         // a little debugging
@@ -110,8 +110,15 @@
         
         String test = indexDir + File.separator + ".index-inconsistent";
         indexConsistencyMarker = new File(test);
+    }
+    
+    
+    /**
+     * @inheritDoc
+     */
+    public void initialize() throws InitializationException {
         
-        // only setup the index if search is enabled
+        // only initialize the index if search is enabled
         if (this.searchEnabled) {
             
             // 1. If inconsistency marker exists.
@@ -164,7 +171,9 @@
                 }
             }
         }
+        
     }
+    
     
     //~ Methods
     // ================================================================

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManager.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManager.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManager.java Wed Jun 20 16:22:13 2007
@@ -20,7 +20,7 @@
 
 import java.util.List;
 import org.apache.roller.weblogger.WebloggerException;
-import org.apache.roller.weblogger.pojos.Theme;
+import org.apache.roller.weblogger.business.InitializationException;
 import org.apache.roller.weblogger.pojos.WeblogTheme;
 import org.apache.roller.weblogger.pojos.Weblog;
 
@@ -29,6 +29,14 @@
  * Manager interface for accessing Theme related objects.
  */
 public interface ThemeManager {
+    
+    /**
+     * Initialize the theme system.
+     *
+     * @throws InitializationException If there is a problem during initialization.
+     */
+    public void initialize() throws InitializationException;
+    
     
     /**
      * Get the Theme object with the given id.

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java Wed Jun 20 16:22:13 2007
@@ -19,7 +19,6 @@
 package org.apache.roller.weblogger.business.themes;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FilenameFilter;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -34,6 +33,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.FileManager;
+import org.apache.roller.weblogger.business.InitializationException;
 import org.apache.roller.weblogger.business.RollerFactory;
 import org.apache.roller.weblogger.business.UserManager;
 import org.apache.roller.weblogger.config.RollerConfig;
@@ -63,9 +63,6 @@
     
     
     public ThemeManagerImpl() {
-        
-        log.debug("Initializing ThemeManagerImpl");
-        
         // get theme directory from config and verify it
         this.themeDir = RollerConfig.getProperty("themes.dir");
         if(themeDir == null || themeDir.trim().length() < 1) {
@@ -83,9 +80,17 @@
                     !themeDirFile.canRead()) {
                 throw new RuntimeException("couldn't access theme dir ["+themeDir+"]");
             }
-            
+        }
+    }
+    
+    
+    public void initialize() throws InitializationException {
+        
+        log.debug("Initializing Theme Manager");
+        
+        if(themeDir != null) {
             // rather than be lazy we are going to load all themes from
-            // the disk preemptively during initialization and cache them
+            // the disk preemptively and cache them
             this.themes = loadAllThemesFromDisk();
             
             log.info("Loaded "+this.themes.size()+" themes from disk.");

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/RollerContext.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/RollerContext.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/RollerContext.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/core/RollerContext.java Wed Jun 20 16:22:13 2007
@@ -128,10 +128,7 @@
                 RollerFactory.bootstrap();
                 
                 // trigger initialization process
-                RollerFactory.initialize();
-                
-                // flush any changes made during initialization
-                RollerFactory.getRoller().flush();
+                RollerFactory.getRoller().initialize();
                 
             } catch (BootstrapException ex) {
                 log.fatal("Roller Weblogger bootstrap failed", ex);

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/Install.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/Install.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/Install.java (original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/ui/struts2/core/Install.java Wed Jun 20 16:22:13 2007
@@ -126,10 +126,7 @@
             RollerFactory.bootstrap();
             
             // trigger initialization process
-            RollerFactory.initialize();
-            
-            // flush any changes made during initialization
-            RollerFactory.getRoller().flush();
+            RollerFactory.getRoller().initialize();
             
             return SUCCESS;
             

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/TestUtils.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/TestUtils.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/TestUtils.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/TestUtils.java Wed Jun 20 16:22:13 2007
@@ -29,6 +29,7 @@
 import org.apache.roller.weblogger.business.RollerFactory;
 import org.apache.roller.weblogger.business.UserManager;
 import org.apache.roller.weblogger.business.WeblogManager;
+import org.apache.roller.weblogger.business.startup.WebloggerStartup;
 import org.apache.roller.weblogger.pojos.AutoPing;
 import org.apache.roller.weblogger.pojos.WeblogEntryComment;
 import org.apache.roller.weblogger.pojos.WeblogBookmarkFolder;
@@ -39,13 +40,34 @@
 import org.apache.roller.weblogger.pojos.WeblogCategory;
 import org.apache.roller.weblogger.pojos.WeblogEntry;
 import org.apache.roller.weblogger.pojos.Weblog;
-import org.apache.roller.weblogger.WebloggerException;
-
 
 /**
  * Utility class for unit test classes.
  */
 public final class TestUtils {
+    
+    
+    public static void setupWeblogger() throws Exception {
+        
+        if(!RollerFactory.isBootstrapped()) {
+            // do core services preparation
+            WebloggerStartup.prepare();
+            
+            // do application bootstrapping
+            RollerFactory.bootstrap();
+            
+            // always initialize the properties manager and flush
+            RollerFactory.getRoller().getPropertiesManager().initialize();
+            RollerFactory.getRoller().flush();
+        }
+    }
+    
+    
+    public static void shutdownWeblogger() throws Exception {
+        
+        // trigger shutdown
+        RollerFactory.getRoller().shutdown();
+    }
     
     
     /**

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/BookmarkTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/BookmarkTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/BookmarkTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/BookmarkTest.java Wed Jun 20 16:22:13 2007
@@ -55,6 +55,9 @@
      */
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("bkmrkTestUser");
             testWeblog = TestUtils.setupWeblog("bkmrkTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CommentTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CommentTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CommentTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CommentTest.java Wed Jun 20 16:22:13 2007
@@ -63,6 +63,9 @@
      */
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("commentTestUser");
             testWeblog = TestUtils.setupWeblog("commentTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CoreWeblogPlatformTestSuite.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CoreWeblogPlatformTestSuite.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CoreWeblogPlatformTestSuite.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/CoreWeblogPlatformTestSuite.java Wed Jun 20 16:22:13 2007
@@ -20,6 +20,7 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
+import org.apache.roller.weblogger.TestUtils;
 
 
 /**

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FileManagerTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FileManagerTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FileManagerTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FileManagerTest.java Wed Jun 20 16:22:13 2007
@@ -54,6 +54,9 @@
     
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("FileManagerTest_userName");
             testWeblog = TestUtils.setupWeblog("FileManagerTest_handle", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderCRUDTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderCRUDTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderCRUDTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderCRUDTest.java Wed Jun 20 16:22:13 2007
@@ -45,6 +45,9 @@
         
         log.info("BEGIN");
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("folderCRUDTestUser");
             testWeblog = TestUtils.setupWeblog("folderCRUDTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderFunctionalityTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderFunctionalityTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderFunctionalityTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderFunctionalityTest.java Wed Jun 20 16:22:13 2007
@@ -52,6 +52,9 @@
         
         log.info("BEGIN");
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("folderFuncTestUser");
             testWeblog = TestUtils.setupWeblog("folderFuncTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderParentDeletesTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderParentDeletesTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderParentDeletesTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/FolderParentDeletesTest.java Wed Jun 20 16:22:13 2007
@@ -48,6 +48,9 @@
         
         log.info("BEGIN");
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("folderParentDeletesTestUser");
             testWeblog = TestUtils.setupWeblog("folderParentDeletesTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/HitCountTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/HitCountTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/HitCountTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/HitCountTest.java Wed Jun 20 16:22:13 2007
@@ -59,6 +59,9 @@
      */
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("hitCountTestUser");
             testWeblog = TestUtils.setupWeblog("hitCountTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PermissionTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PermissionTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PermissionTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PermissionTest.java Wed Jun 20 16:22:13 2007
@@ -59,6 +59,9 @@
         
         log.info("BEGIN");
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("permsTestUser");
             testWeblog = TestUtils.setupWeblog("permsTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PingsTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PingsTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PingsTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PingsTest.java Wed Jun 20 16:22:13 2007
@@ -68,6 +68,9 @@
      */
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("wtTestUser");
             testWeblog = TestUtils.setupWeblog("wtTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PropertiesTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PropertiesTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PropertiesTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/PropertiesTest.java Wed Jun 20 16:22:13 2007
@@ -49,11 +49,11 @@
     
     
     public void setUp() throws Exception {
-        
+        // setup weblogger
+        TestUtils.setupWeblogger();
     }
     
     public void tearDown() throws Exception {
-        
     }
     
     

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/RefererTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/RefererTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/RefererTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/RefererTest.java Wed Jun 20 16:22:13 2007
@@ -70,6 +70,9 @@
      */
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("referTestUser");
             testWeblog = TestUtils.setupWeblog("referTestWeblog1", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/TaskLockTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/TaskLockTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/TaskLockTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/TaskLockTest.java Wed Jun 20 16:22:13 2007
@@ -49,6 +49,8 @@
     
     
     public void setUp() throws Exception {
+        // setup weblogger
+        TestUtils.setupWeblogger();
     }
     
     public void tearDown() throws Exception {

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/UserTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/UserTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/UserTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/UserTest.java Wed Jun 20 16:22:13 2007
@@ -51,6 +51,8 @@
     
     
     public void setUp() throws Exception {
+        // setup weblogger
+        TestUtils.setupWeblogger();
     }
     
     public void tearDown() throws Exception {

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryCRUDTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryCRUDTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryCRUDTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryCRUDTest.java Wed Jun 20 16:22:13 2007
@@ -48,6 +48,9 @@
         log.info("BEGIN");
         
         try {
+            // setup weblogger
+            TestUtils.setupWeblogger();
+            
             testUser = TestUtils.setupUser("categoryCRUDTestUser");
             testWeblog = TestUtils.setupWeblog("categoryCRUDTestWeblog", testUser);
             TestUtils.endSession(true);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryFunctionalityTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryFunctionalityTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryFunctionalityTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryFunctionalityTest.java Wed Jun 20 16:22:13 2007
@@ -55,6 +55,9 @@
         log.info("BEGIN");
         
         try {
+            // setup weblogger
+            TestUtils.setupWeblogger();
+            
             testUser = TestUtils.setupUser("categoryTestUser");
             testWeblog = TestUtils.setupWeblog("categoryTestWeblog", testUser);
             

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryParentDeletesTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryParentDeletesTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryParentDeletesTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogCategoryParentDeletesTest.java Wed Jun 20 16:22:13 2007
@@ -47,6 +47,9 @@
         log.info("BEGIN");
         
         try {
+            // setup weblogger
+            TestUtils.setupWeblogger();
+        
             testUser = TestUtils.setupUser("categoryParentDeletesTestUser");
             testWeblog = TestUtils.setupWeblog("categoryParentDeletesTestWeblog", testUser);
             TestUtils.endSession(true);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogEntryTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogEntryTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogEntryTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogEntryTest.java Wed Jun 20 16:22:13 2007
@@ -69,6 +69,9 @@
      */
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("entryTestUser");
             testWeblog = TestUtils.setupWeblog("entryTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogPageTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogPageTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogPageTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogPageTest.java Wed Jun 20 16:22:13 2007
@@ -59,6 +59,9 @@
      */
     public void setUp() throws Exception {
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("wtTestUser");
             testWeblog = TestUtils.setupWeblog("wtTestWeblog", testUser);

Modified: roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogTest.java?view=diff&rev=549293&r1=549292&r2=549293
==============================================================================
--- roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogTest.java (original)
+++ roller/trunk/apps/weblogger/test/java/org/apache/roller/weblogger/business/WeblogTest.java Wed Jun 20 16:22:13 2007
@@ -58,6 +58,9 @@
         
         log.info("BEGIN");
         
+        // setup weblogger
+        TestUtils.setupWeblogger();
+        
         try {
             testUser = TestUtils.setupUser("weblogTestUser");
             TestUtils.endSession(true);



Mime
View raw message