Date: 2004-09-24T00:33:54
Editor: MichaelFrericks <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]