Package org.apache.geronimo.kernel.config

Examples of org.apache.geronimo.kernel.config.ConfigurationResolver


            throw new UnsupportedOperationException();
        }

        public Configuration getConfiguration(Artifact configurationId) {
            try {
                return new Configuration(Collections.EMPTY_SET, loadedConfigurationData, new ConfigurationResolver(configurationId, dir), null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here


    protected void setUp() throws Exception {
        super.setUp();
        Artifact id = new Artifact("test", "test", "", "car");
        configuration = new Configuration(Collections.EMPTY_LIST,
                new ConfigurationData(id, naming),
                new ConfigurationResolver(id, null),
                null);
        module  = new ConnectorModule(false, new AbstractName(id, Collections.singletonMap("name", "test")), null, null, "foo", null, null, null, null);
        EARContext earContext = new EARContext(new File("foo"), null, new Environment(new Artifact("foo", "bar", "1.0", "car")), ConfigurationModuleType.EAR, naming,
                new ConfigurationManager() {
                    public boolean isInstalled(Artifact configurationId) {
View Full Code Here

        Configuration configuration = deploymentContext.getConfiguration();
        getModuleClasspath(configuration, classpath);
    }
   
    public static void getModuleClasspath(Configuration configuration, LinkedHashSet<URL> classpath) throws Exception {
        ConfigurationResolver resolver = configuration.getConfigurationResolver();
        List<String> moduleClassPath = configuration.getClassPath();
        for (String pattern : moduleClassPath) {
            try {
                Set<URL> files = resolver.resolve(pattern);
                classpath.addAll(files);
            } catch (MalformedURLException e) {
                throw new Exception("Could not resolve pattern: " + pattern, e);
            } catch (NoSuchConfigException e) {
                throw new Exception("Could not resolve pattern: " + pattern, e);
View Full Code Here

        environment.addDependency(version1, ImportType.CLASSES);

        ConfigurationData parentConfigurationData = new ConfigurationData(environment, new Jsr77Naming());
        parentConfigurationData.setConfigurationStore(new MockConfigStore());

        ConfigurationResolver configurationResolver = new ConfigurationResolver(parentConfigurationData,
                Collections.singleton(mockRepository),
                artifactResolver);

        Configuration parent = new Configuration(null,
                parentConfigurationData,
View Full Code Here

            return new ConfigurationStore[]{store};
        }

        public Configuration getConfiguration(Artifact configurationId) {
            try {
                return new Configuration(Collections.EMPTY_SET, loadedConfigurationData, new ConfigurationResolver(configurationId, dir), null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

            return new ConfigurationStore[]{store};
        }

        public Configuration getConfiguration(Artifact configurationId) {
            try {
                return new Configuration(Collections.EMPTY_SET, loadedConfigurationData, new ConfigurationResolver(configurationId, dir), null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

        }        
    }

    private static void getModuleClasspath(StringBuilder classpath, DeploymentContext deploymentContext) throws DeploymentException {
        Configuration configuration = deploymentContext.getConfiguration();
        ConfigurationResolver resolver = configuration.getConfigurationResolver();
        List<String> moduleClassPath = configuration.getClassPath();
        for (String pattern : moduleClassPath) {
            try {
                Set<URL> files = resolver.resolve(pattern);
                for (URL url: files) {
                    String path = toFileName(url);
                    classpath.append(path).append(File.pathSeparator);
                }
            } catch (MalformedURLException e) {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.config.ConfigurationResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.