diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index f6f631f7..f6793bfe 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -291,11 +291,22 @@ public final class Application implements IPathElement, Runnable { public synchronized void init() throws DatabaseException, IllegalAccessException, InstantiationException, ClassNotFoundException { + init(null); + } + + /** + * Get the application ready to run, initializing the evaluators and type manager. + * + * @param ignoreDirs comma separated list of directory names to ignore + */ + public synchronized void init(String ignoreDirs) + throws DatabaseException, IllegalAccessException, + InstantiationException, ClassNotFoundException { running = true; // create and init type mananger - typemgr = new TypeManager(this); + typemgr = new TypeManager(this, ignoreDirs); try { typemgr.createPrototypes(); } catch (Exception x) { diff --git a/src/helma/framework/core/TypeManager.java b/src/helma/framework/core/TypeManager.java index 0db4dfcb..6ded8edb 100644 --- a/src/helma/framework/core/TypeManager.java +++ b/src/helma/framework/core/TypeManager.java @@ -19,6 +19,7 @@ package helma.framework.core; import helma.objectmodel.db.DbMapping; import helma.framework.repository.Resource; import helma.framework.repository.Repository; +import helma.util.StringUtils; import java.io.*; import java.net.URL; @@ -43,6 +44,9 @@ public final class TypeManager { // set of Java archives private HashSet jarfiles; + // set of directory names to ignore + private HashSet ignoreDirs; + private long lastCheck = 0; private long lastCodeUpdate; private long[] lastRepoScan; @@ -57,10 +61,17 @@ public final class TypeManager { * * @throws RuntimeException ... */ - public TypeManager(Application app) { + public TypeManager(Application app, String ignore) { this.app = app; prototypes = new HashMap(); jarfiles = new HashSet(); + ignoreDirs = new HashSet(); + // split ignore dirs list and add to hash set + if (ignore != null) { + String[] arr = StringUtils.split(ignore, ","); + for (int i=0; i