You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/08/09 16:22:52 UTC
cvs commit: jakarta-turbine/src/java/org/apache/turbine Turbine.java
jvanzyl 01/08/09 07:22:52
Modified: src/java/org/apache/turbine Turbine.java
Log:
- pushed all the logic for the module loader into the module loader class
where it belongs. slims down Turbine.java and will allow module loaders
to be used on a per app basis.
Revision Changes Path
1.83 +3 -54 jakarta-turbine/src/java/org/apache/turbine/Turbine.java
Index: Turbine.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/Turbine.java,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- Turbine.java 2001/08/08 13:27:49 1.82
+++ Turbine.java 2001/08/09 14:22:52 1.83
@@ -108,7 +108,7 @@
* @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
* @author <a href="mailto:krzewski@e-point.pl">Rafal Krzewski</a>
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: Turbine.java,v 1.82 2001/08/08 13:27:49 jvanzyl Exp $
+ * @version $Id: Turbine.java,v 1.83 2001/08/09 14:22:52 jvanzyl Exp $
*/
public class Turbine
extends HttpServlet
@@ -478,10 +478,6 @@
*/
private static ModuleLoader moduleLoader;
- //!! this will have to be done on a per app basis
- // when the app service is checked in. jvz.
- private static Hashtable defaultModules;
-
private static Pipeline pipeline;
/**
@@ -563,49 +559,9 @@
// application running under Turbine but we are trying,
// for the time being to work in a BC fashion.
moduleLoader = new ModuleLoader();
+ moduleLoader.setConfiguration(configuration);
+ moduleLoader.init();
- Configuration moduleTypes = configuration.subset("module.default");
- if (moduleTypes == null)
- {
- throw new TurbineException(
- "module.default subset is missing from TR.props");
- }
-
- Iterator j = moduleTypes.getKeys();
-
- // Make container for default modules
- defaultModules = new Hashtable();
-
- while (j.hasNext())
- {
- String moduleType = (String) j.next();
- String defaultModule = moduleTypes.getString(moduleType);
-
- Log.debug("Adding module type " + moduleType +
- " with a default of " + defaultModule);
-
- moduleLoader.addModuleType(moduleType);
-
- // Add the default module for the particular
- // module type to our container for module defaults.
- defaultModules.put(moduleType, defaultModule);
- }
-
- // Add the default set of modules which live within
- // the org.apache.turbine.module namespace.
- moduleLoader.addModulePackage(DEFAULT_MODULE_PACKAGE);
-
- // Grab our list of module packages so that we can
- // add them to the search list of the ModuleLoader.
- Vector modulePackages = configuration.getVector(MODULE_PACKAGES);
-
- Iterator i = modulePackages.iterator();
-
- while (i.hasNext())
- {
- moduleLoader.addModulePackage((String) i.next());
- }
-
// Set some system properties
Configuration systemProperties = configuration.subset("system");
@@ -780,12 +736,5 @@
public static Configuration getConfiguration()
{
return configuration;
- }
-
- // New module stuff
-
- public static String getDefaultModule(String moduleType)
- {
- return (String) defaultModules.get(moduleType);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org