hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-hivemind Wiki] Update of "NewAndNoteworthyFeaturesInAnnotationBranch" by AchimHuegen
Date Thu, 02 Nov 2006 14:25:18 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-hivemind Wiki" for change
notification.

The following page has been changed by AchimHuegen:
http://wiki.apache.org/jakarta-hivemind/NewAndNoteworthyFeaturesInAnnotationBranch

------------------------------------------------------------------------------
  
  The definition of service points, configuration points, contributions etc. is
  possible now without xml. 
+ 
  More info: ["RegistryDefinitionAPI"]
  
- == Registry Building And Autoloading ==
+ == Registry Building ==
  
  To reflect the various possible sources for module definitions the process of 
  building a registry has changed. 
@@ -64, +65 @@

  
  }}}
  
+ == Registry Autoloading ==
+ 
+ HiveMind 1.x was able to load all "META-INF/hivemodule.xml" files automatically.
+ The concept of autolading was broadened and made more extensible.
+ The RegistryBuilder now has a method autoDetectModules.
+ It tries to detect so called RegistryProviders by searching the classpath for
+ a global manifest entry "hivemind-provider".
+ 
+ Example of MANIFEST.MF:
+ {{{
+ Manifest-Version: 1.0
+ hivemind-provider: org.apache.hivemind.impl.XmlRegistryProvider
+ }}}
+ 
+ An instance of the specified class is created and the registry definition
+ is passed via the RegistryProvider interface:
+ {{{
+ public interface RegistryProvider
+ {
+     public void process(RegistryDefinition registryDefinition, ErrorHandler errorHandler);
  
+ }
+ }}}
+ 
+ In the moment only one default provider exists in the xml module that automatically
+ loads all hivemodule.xml files. It just loads modules using the XmlModuleReader:
+ {{{
+ public void process(RegistryDefinition registryDefinition, ErrorHandler errorHandler)
+ {
+    XmlModuleReader xmlModuleReader = new XmlModuleReader(registryDefinition);
+    xmlModuleReader.readClassPathModules("META-INF/hivemodules.xml");
+ }
+ }}}
  
  == Extensible Autowiring Service ==
  

Mime
View raw message