hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hivemind-...@jakarta.apache.org
Subject [Jakarta HiveMind Wiki] Updated: FrequentlyAskedQuestions
Date Fri, 24 Sep 2004 07:33:54 GMT
   Date: 2004-09-24T00:33:54
   Editor: MichaelFrericks <Michael-Frericks@web.de>
   Wiki: Jakarta HiveMind Wiki
   Page: FrequentlyAskedQuestions
   URL: http://wiki.apache.org/jakarta-hivemind/FrequentlyAskedQuestions

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -20,4 +20,27 @@
 
 I have configuration data which may change reasonably often, and which I'd like an administrator
to be able to change without rebuilding an ear/war file. What's the best way to make this
available to HiveMind?
 
+'''Answer'''
+Michael Frericks:
+You could add files that reside outside the classpath as modulees this way:
+{{{
+ClassResolver resolver = new DefaultClassResolver();
+RegistryBuilder builder = new RegistryBuilder();
+
+// process classpath modules
+builder.processModules(resolver);
+
+
+// process modules located anywhere else
+File[] modules = getHiveModules(confPaths);
+
+for (int i = 0; i < modules.length; i++)
+{
+    File module = modules[i];
+    builder.processModule(resolver,
+	new URLResource(module.toURL()));
+}
+
+Registry registry = builder.constructRegistry(Locale.getDefault());
+}}}
 

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message