Listing 6. EnvironmentLoader's load() Method /** * This method loads the environment based on the configuration * data located in the resource at the provided URLs. * * @param argResourceURL - delimited list of URLs of the * configuration resources(: or ; delimted) * @param argReader parent XMLReader in pipeline * @param argEnv Environment impl to append properties * @return com.teti.telematics.core.resource.Environment */ public static Environment load(String argResourceURL, XMLReader argReader, EnvironmentImpl argEnv) throws Exception { SAXTagHandler valHandler = new ValuesTagHandler(); EnvPropertyTagHandler envHandler = new EnvPropertyTagHandler(argEnv); adapter.registerHandler(PROPERTY_TAG, envHandler); adapter.registerHandler(NAME_TAG, valHandler); adapter.registerHandler(PROPERTY_VALUE_TAG, valHandler); adapter.registerHandler(PROPERTY_JAVATYPE_TAG, valHandler); while(tok.hasMoreTokens()) { String url = tok.nextToken(); System.out.println("Loading environment from: " + url); InputStream input = EnvironmentLoader.class.getResourceAsStream(url); adapter.parse(new InputSource(input)); } return argEnv; }