Search in sources :

Example 6 with MainResourceHandler

use of org.apache.ofbiz.base.config.MainResourceHandler in project ofbiz-framework by apache.

the class ServiceGroupReader method readConfig.

public static void readConfig() {
    List<ServiceGroups> serviceGroupsList = null;
    try {
        serviceGroupsList = ServiceConfigUtil.getServiceEngine().getServiceGroups();
    } catch (GenericConfigException e) {
        // FIXME: Refactor API so exceptions can be thrown and caught.
        Debug.logError(e, module);
        throw new RuntimeException(e.getMessage());
    }
    for (ServiceGroups serviceGroup : serviceGroupsList) {
        ResourceHandler handler = new MainResourceHandler(ServiceConfigUtil.getServiceEngineXmlFileName(), serviceGroup.getLoader(), serviceGroup.getLocation());
        addGroupDefinitions(handler);
    }
    // get all of the component resource group stuff, ie specified in each ofbiz-component.xml file
    for (ComponentConfig.ServiceResourceInfo componentResourceInfo : ComponentConfig.getAllServiceResourceInfos("group")) {
        addGroupDefinitions(componentResourceInfo.createResourceHandler());
    }
}
Also used : GenericConfigException(org.apache.ofbiz.base.config.GenericConfigException) MainResourceHandler(org.apache.ofbiz.base.config.MainResourceHandler) ComponentConfig(org.apache.ofbiz.base.component.ComponentConfig) ServiceGroups(org.apache.ofbiz.service.config.model.ServiceGroups) ResourceHandler(org.apache.ofbiz.base.config.ResourceHandler) MainResourceHandler(org.apache.ofbiz.base.config.MainResourceHandler)

Aggregations

MainResourceHandler (org.apache.ofbiz.base.config.MainResourceHandler)6 ResourceHandler (org.apache.ofbiz.base.config.ResourceHandler)6 ComponentConfig (org.apache.ofbiz.base.component.ComponentConfig)5 GenericConfigException (org.apache.ofbiz.base.config.GenericConfigException)5 LinkedList (java.util.LinkedList)4 Future (java.util.concurrent.Future)3 GenericEntityConfException (org.apache.ofbiz.entity.GenericEntityConfException)3 List (java.util.List)2 Resource (org.apache.ofbiz.entity.config.model.Resource)2 File (java.io.File)1 URL (java.net.URL)1 StringTokenizer (java.util.StringTokenizer)1 UtilTimer (org.apache.ofbiz.base.util.UtilTimer)1 Datasource (org.apache.ofbiz.entity.config.model.Datasource)1 EntityDataReader (org.apache.ofbiz.entity.config.model.EntityDataReader)1 EntityEcaReader (org.apache.ofbiz.entity.config.model.EntityEcaReader)1 FieldType (org.apache.ofbiz.entity.config.model.FieldType)1 ReadData (org.apache.ofbiz.entity.config.model.ReadData)1 GlobalServices (org.apache.ofbiz.service.config.model.GlobalServices)1 ServiceEcas (org.apache.ofbiz.service.config.model.ServiceEcas)1