1 15 package org.apache.hivemind.servlet; 16 17 import javax.servlet.ServletContext ; 18 19 import org.apache.hivemind.ClassResolver; 20 import org.apache.hivemind.impl.RegistryBuilder; 21 import org.apache.hivemind.impl.XmlModuleReader; 22 import org.apache.hivemind.util.ContextResource; 23 24 32 public class HiveMindFilter extends AutoloadingHiveMindFilter 33 { 34 static final String HIVE_MODULE_XML = "/WEB-INF/hivemodule.xml"; 35 36 protected void addWebInfDescriptor(ServletContext context, ClassResolver resolver, 37 RegistryBuilder builder) 38 { 39 ContextResource r = new ContextResource(context, HIVE_MODULE_XML); 40 41 if (r.getResourceURL() != null) 42 { 43 XmlModuleReader reader = new XmlModuleReader(builder.getRegistryDefinition(), 44 resolver, builder.getErrorHandler()); 45 reader.readModule(r); 46 } 47 } 48 49 } | Popular Tags |