You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by po...@apache.org on 2016/10/14 18:42:34 UTC
[1/3] incubator-tamaya-sandbox git commit: TAMAYA-174: Update docs.
Repository: incubator-tamaya-sandbox
Updated Branches:
refs/heads/master 30633b6e6 -> c2d2c0930
TAMAYA-174: Update docs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/2fdbcc83
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/2fdbcc83
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/2fdbcc83
Branch: refs/heads/master
Commit: 2fdbcc8336b0378b2063fb00cd92c9733a61ef23
Parents: 30633b6
Author: Phil Ottlinger <po...@apache.org>
Authored: Fri Oct 14 20:40:19 2016 +0200
Committer: Phil Ottlinger <po...@apache.org>
Committed: Fri Oct 14 20:40:19 2016 +0200
----------------------------------------------------------------------
readme.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2fdbcc83/readme.md
----------------------------------------------------------------------
diff --git a/readme.md b/readme.md
index f9ab333..86fb00a 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
# Apache Tamaya (incubating) Sandbox
-This is the sandbox of [Apache Tamaya](http://tamaya.incubator.apache.org).
+This is the sandbox of [Apache Tamaya](https://tamaya.incubator.apache.org).
The sandbox contains additional modules (extensions)
of Apache Tamaya (incubating) **which are not mature enough**
to be part of Apache Tamaya itself or the official extensions
@@ -9,10 +9,10 @@ of Apache Tamaya.
## Rules for sandbox modules
* All modules must be independent of each other.
-* A module could be promoted my the PMC of Tamaya
- to be part of the official Tamaya extensions if is
+* A module can be promoted by the PMC of Tamaya
+ to be part of the official Tamaya extensions package if it is
mature enough.
-* A sandbox module could have it's own build chain
+* A sandbox module should have it's own build chain
in [Apache's Jenkins Server](https://builds.apache.org/)
[3/3] incubator-tamaya-sandbox git commit: TAMAYA-174: Move
classloader stuff to its subfolder.
Posted by po...@apache.org.
TAMAYA-174: Move classloader stuff to its subfolder.
* The project does not build yet, but does not belong into the root folder of the repo.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/c2d2c093
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/c2d2c093
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/c2d2c093
Branch: refs/heads/master
Commit: c2d2c09302ec5ac9d37e73cd9f2f37563780123a
Parents: 2fdbcc8
Author: Phil Ottlinger <po...@apache.org>
Authored: Fri Oct 14 20:40:46 2016 +0200
Committer: Phil Ottlinger <po...@apache.org>
Committed: Fri Oct 14 20:41:41 2016 +0200
----------------------------------------------------------------------
pom.xml | 74 -----
.../AbstractClassloaderAwareItemLoader.java | 268 ----------------
.../clsupport/CLAwareConfigurationContext.java | 105 -------
.../tamaya/clsupport/CLAwareServiceContext.java | 248 ---------------
.../tamaya/clsupport/ServiceContainer.java | 306 -------------------
.../apache/tamaya/clsupport/package-info.java | 22 --
.../org.apache.tamaya.spi.ServiceContext | 19 --
...he.tamaya.environment.spi.ContextProviderSpi | 23 --
...org.apache.tamaya.environment.spi.ContextSpi | 19 --
tamaya-classloader-support/pom.xml | 73 +++++
.../AbstractClassloaderAwareItemLoader.java | 268 ++++++++++++++++
.../clsupport/CLAwareConfigurationContext.java | 105 +++++++
.../tamaya/clsupport/CLAwareServiceContext.java | 248 +++++++++++++++
.../tamaya/clsupport/ServiceContainer.java | 306 +++++++++++++++++++
.../apache/tamaya/clsupport/package-info.java | 22 ++
.../org.apache.tamaya.spi.ServiceContext | 19 ++
...he.tamaya.environment.spi.ContextProviderSpi | 23 ++
...org.apache.tamaya.environment.spi.ContextSpi | 19 ++
tamaya-classloader-support/target/.plxarc | 1 +
.../target/checkstyle-result.xml | 0
.../target/classes/META-INF/DEPENDENCIES | 19 ++
.../target/classes/META-INF/LICENSE | 202 ++++++++++++
.../target/classes/META-INF/NOTICE | 8 +
.../org.apache.tamaya.spi.ServiceContext | 19 ++
.../AbstractClassloaderAwareItemLoader.class | Bin 0 -> 5277 bytes
.../CLAwareConfigurationContext$1.class | Bin 0 -> 285 bytes
...areConfigurationContext$ContextManager.class | Bin 0 -> 1741 bytes
.../clsupport/CLAwareConfigurationContext.class | Bin 0 -> 3312 bytes
.../clsupport/CLAwareServiceContext.class | Bin 0 -> 7127 bytes
.../tamaya/clsupport/ServiceContainer.class | Bin 0 -> 12391 bytes
.../target/feature/feature.xml | 11 +
.../target/findbugs-exclude.xml | 136 +++++++++
.../target/findbugsXml.xml | 2 +
.../META-INF/DEPENDENCIES | 19 ++
.../META-INF/LICENSE | 202 ++++++++++++
.../META-INF/NOTICE | 8 +
.../compile/default-compile/createdFiles.lst | 6 +
.../compile/default-compile/inputFiles.lst | 5 +
tamaya-classloader-support/target/rat.txt | 35 +++
39 files changed, 1756 insertions(+), 1084 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index adea1d3..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy current the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.tamaya.ext</groupId>
- <artifactId>tamaya-extensions</artifactId>
- <version>0.3-incubating-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <artifactId>tamaya-classloader-support</artifactId>
- <name>Apache Tamaya Modules - Classloader Support</name>
- <description>Apache Tamaya Classloader Support registers a ConfigurationContext that leverages
- classloader hierarchies. Also visibility of features and components is aligned with the
- corresponding hierarchy of classloaders.</description>
- <packaging>bundle</packaging>
-
- <properties>
- <jdkVersion>1.7</jdkVersion>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tamaya.ext</groupId>
- <artifactId>tamaya-spisupport</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Export-Package>
- org.apache.tamaya.clsupport
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java b/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
deleted file mode 100644
index 0145d1f..0000000
--- a/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.clsupport;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * <p>This class implements an abstract base class, which basically provides a loading mechanism that supports
- * loading and managing resources along the classloader hierarchies individually. It ensures resources are loaded
- * and stored related to the each target classloader within the hierarchy individually. Additionally it enables
- * mechanisms to ensure an item T is not loaded multiple times, when traversing up the classloader hierarchy.</p>
- *
- * <p>Finally classloaders are not stored by reference by this class, to ensure they still can be garbage collected.
- * Instead this class uses the fully qualified class name of the loader and the corresponsing hashCode as returned
- * by {@link Objects#hashCode(Object)}.</p>
- *
- * @param <T> the managed item type.
- */
-public abstract class AbstractClassloaderAwareItemLoader<T> {
- /**
- * The logger used.
- */
- private static final Logger LOG = Logger.getLogger(AbstractClassloaderAwareItemLoader.class.getName());
- /**
- * The items managed, related to their classloader.
- */
- private final Map<String, T> items = new ConcurrentHashMap<>();
-
- /**
- * Creates a new instance, using the current Thread context classloader, or - if null - the classloader that
- * loaded this class for initially initializing the loader instance.
- */
- public AbstractClassloaderAwareItemLoader() {
- this(getDefaultClassLoader());
- }
-
- /**
- * Creates a new instance, using the class loader given for initializing the resources loaded.
- *
- * @param classLoader the target top level classloader, not null.
- */
- public AbstractClassloaderAwareItemLoader(ClassLoader classLoader) {
- loadItems(classLoader);
- }
-
- /**
- * Loads the items for the given classloader and all its parent classloaders. This method will not update
- * the items already found for any class loader involved.
- *
- * @param classLoader the target top level classloader, not null.
- */
- public void loadItems(ClassLoader classLoader) {
- loadItems(classLoader, false);
- }
-
- /**
- * Loads the items for the given classloader and all its parent classloaders.
- *
- * @param classLoader the target top level classloader, not null.
- * @param update if set to true, resources not visible on former runs are added during this load.
- */
- public void loadItems(ClassLoader classLoader, boolean update) {
- this.items.clear();
- List<ClassLoader> cls = new ArrayList<>();
- cls.add(classLoader);
- ClassLoader cl = classLoader.getParent();
- while (cl != null) {
- cls.add(cl);
- cl = cl.getParent();
- }
- // Start with the parent classloader and then go up...
- for (int i = cls.size() - 1; i <= 0; i--) {
- ClassLoader curCL = cls.get(i);
- String clKey = getClassLoaderID(curCL);
- T itemFound = items.get(clKey);
- try {
- if (itemFound != null) {
- updateItem(itemFound, curCL);
- } else {
- items.put(clKey, createItem(curCL));
- }
- } catch (Exception e) {
- LOG.log(Level.SEVERE,
- "Error loading from classloader: " + curCL, e);
- }
- }
- }
-
- /**
- * Creates a new item for being stored linked with the given lassloader.
- *
- * @param classLoader the classloader, not null.
- * @return the new item loaded.
- */
- protected abstract T createItem(ClassLoader classLoader);
-
- /**
- * Creates a new item for being stored linked with the given lassloader.
- *
- * @param currentItemSet the current found ItemContainer instance to be updated.
- * @param classLoader the classloader, not null.
- */
- protected abstract void updateItem(T currentItemSet, ClassLoader classLoader);
-
- /**
- * Evaluates a String key for identfying a classloader instance, based on the loader class and its hashCode.
- * This prevents the storage of classloader references as keys and therefore enables classloaders not used anymore
- * to be garbage collected.
- *
- * @param classLoader {@link ClassLoader} to be identified, must not be {@code null}.
- * @return the unique key for the given classloader
- */
- public static String getClassLoaderID(ClassLoader classLoader) {
- return classLoader.getClass().getName() + Objects.hash(classLoader);
- }
-
- /**
- * Evaluates a String key for identfying a classloader instance, based on the loader class and its hashCode.
- * This prevents the storage of classloader references as keys and therefore enables classloaders not used anymore
- * to be garbage collected.
- *
- * @return the unique key for the current default classloader as returned by #getDefaultClassLoader.
- */
- public static String getClassLoaderID() {
- return getClassLoaderID(getDefaultClassLoader());
- }
-
- /**
- * Get all items valid for the current thread context class loader, or - if null - the classloader that loaded
- * this class.
- *
- * @return the items found, never null.
- */
- public Set<T> getItems() {
- return getItems(getDefaultClassLoader());
- }
-
- /**
- * Get all items found for the given classloader and all its parent classloaders.
- *
- * @param classLoader the target top level classloader, not null.
- * @return the items found, never null.
- */
- public Set<T> getItems(ClassLoader classLoader) {
- Set<T> result = new HashSet<>();
- ClassLoader cl = classLoader;
- while (cl != null) {
- T item = getItemNoParent(cl, true);
- result.add(item);
- cl = cl.getParent();
- }
- return result;
- }
-
- /**
- * Get all items valid for the parent class loader of the current thread context class loader, or - if null - the
- * parent of the classloader that loaded this class. This allows
- * to build a delta list of instances only visible on the target classloader given.
- *
- * @return the items found, never null.
- */
- public Set<T> getParentItems() {
- return getParentItems(getDefaultClassLoader());
- }
-
- /**
- * Get all items found for the parent of the given classloader and all its parent classloaders. This allows
- * to build a delta list of instances only visible on the target classloader given.
- *
- * @param classLoader the target top level classloader, not null.
- * @return the items found, never null.
- */
- public Set<T> getParentItems(ClassLoader classLoader) {
- Set<T> result = new HashSet<>();
- ClassLoader cl = classLoader.getParent();
- while (cl != null) {
- T item = getItemNoParent(cl, true);
- result.add(item);
- cl = cl.getParent();
- }
- return result;
- }
-
- /**
- * Return the item assigned to the current thread context class loader or - if null - the class that loaded
- * this class. If not yet loaded this method will NOT trigger a load.
- *
- * @return the item attached, or null.
- */
- public T getItemNoParent() {
- return getItemNoParent(getDefaultClassLoader(), false);
- }
-
- /**
- * Return the item assigned to the current thread context class loader or - if null - the class that loaded
- * this class.
- *
- * @param loadIfMissing Flag that allows to define if this method will trigger an item load, when no item is loaded
- * for the current class loader.
- * @return the item attached, or null.
- */
- public T getItemNoParent(boolean loadIfMissing) {
- return getItemNoParent(getDefaultClassLoader(), loadIfMissing);
- }
-
- /**
- * Return the item assigned to the current thread context class loader or - if null - the class that loaded
- * this class.
- *
- * @param classLoader the target top level classloader, not null.
- * @param loadIfMissing Flag that allows to define if this method will trigger an item load, when no item is loaded
- * for the current class loader.
- * @return the item attached, or null. If {@code loadIfMissing} is set to true, the result is normally not to be
- * expected to be null.
- */
- public T getItemNoParent(ClassLoader classLoader, boolean loadIfMissing) {
- String clKey = getClassLoaderID(classLoader);
- T item = items.get(clKey);
- if (item == null) {
- if (loadIfMissing) {
- item = createItem(classLoader);
- this.items.put(clKey, item);
- }
- }
- return item;
- }
-
-
- /**
- * Utility method that either returns the current thread context classloader or
- * - if not available - the classloader that loaded this class.
- * @return the default classloader to be used, if no explicit classloader has been passed.
- */
- public static ClassLoader getDefaultClassLoader() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if (cl == null) {
- cl = AbstractClassloaderAwareItemLoader.class.getClassLoader();
- }
- return cl;
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java b/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
deleted file mode 100644
index 94e5fb5..0000000
--- a/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.clsupport;
-
-import org.apache.tamaya.TypeLiteral;
-import org.apache.tamaya.spisupport.DefaultConfigurationContext;
-import org.apache.tamaya.spi.ConfigurationContext;
-import org.apache.tamaya.spi.ConfigurationContextBuilder;
-import org.apache.tamaya.spi.PropertyConverter;
-import org.apache.tamaya.spi.PropertyFilter;
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValueCombinationPolicy;
-
-import javax.annotation.Priority;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Logger;
-
-/**
- * Default Implementation of a simple ConfigurationContext.
- */
-@Priority(100)
-public class CLAwareConfigurationContext implements ConfigurationContext {
-
- /** The logger used. */
- private final static Logger LOG = Logger.getLogger(CLAwareConfigurationContext.class.getName());
-
- private final ContextManager contextManager = new ContextManager();
-
-
- @Override
- public void addPropertySources(PropertySource... propertySourcesToAdd) {
- contextManager.getItemNoParent(true).addPropertySources(propertySourcesToAdd);
- }
-
- @Override
- public List<PropertySource> getPropertySources() {
- return contextManager.getItemNoParent(true).getPropertySources();
- }
-
- @Override
- public <T> void addPropertyConverter(TypeLiteral<T> typeToConvert, PropertyConverter<T> propertyConverter) {
- contextManager.getItemNoParent(true).addPropertyConverter(typeToConvert, propertyConverter);
- }
-
- @Override
- public Map<TypeLiteral<?>, List<PropertyConverter<?>>> getPropertyConverters() {
- return contextManager.getItemNoParent(true).getPropertyConverters();
- }
-
- @Override
- public <T> List<PropertyConverter<T>> getPropertyConverters(TypeLiteral<T> targetType) {
- return contextManager.getItemNoParent(true).getPropertyConverters(targetType);
- }
-
- @Override
- public List<PropertyFilter> getPropertyFilters() {
- return contextManager.getItemNoParent(true).getPropertyFilters();
- }
-
- @Override
- public PropertyValueCombinationPolicy getPropertyValueCombinationPolicy(){
- return contextManager.getItemNoParent(true).getPropertyValueCombinationPolicy();
- }
-
- @Override
- public ConfigurationContextBuilder toBuilder() {
- return contextManager.getItemNoParent(true).toBuilder();
- }
-
-
- /**
- * Subcomponent managing {@link ConfigurationContext} instances, one per classloader.
- */
- private static final class ContextManager extends AbstractClassloaderAwareItemLoader<ConfigurationContext>{
-
- @Override
- protected ConfigurationContext createItem(ClassLoader classLoader) {
- // Simply create a complete configuration manager for every classloader. Maybe we will optimize this at a
- // later stage in the project but as for now it is the most simple working solution.
- return new DefaultConfigurationContext();
- }
-
- @Override
- protected void updateItem(ConfigurationContext currentItemSet, ClassLoader classLoader) {
- // ignore, currently not supported.
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java b/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
deleted file mode 100644
index a5d1700..0000000
--- a/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.clsupport;
-
-import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.spi.ServiceContext;
-
-import javax.annotation.Priority;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * <p>This class implements a {@link ServiceContext}, which basically provides a similar loading mechanism as used
- * by the {@link java.util.ServiceLoader}. Whereas the {@link java.util.ServiceLoader} only loads configurations
- * and instances from one classloader, this loader manages configs found and the related instances for each
- * classloader along the classloader hierarchies individually. It ensures instances are loaded on the classloader
- * level, where they first are visible. Additionally it ensures the same configuration resource (and its
- * declared services) are loaded multiple times, when going up the classloader hierarchy.</p>
- *
- * <p>Finally classloaders are not stored by reference by this class, to ensure they still can be garbage collected.
- * Refer also the inherited parent class for further details.</p>
- *
- * <p>This class uses an ordinal of {@code 10}, so it overrides any default {@link ServiceContext} implementations
- * provided with the Tamaya core modules.</p>
- */
-@Priority(10)
-public class CLAwareServiceContext extends AbstractClassloaderAwareItemLoader<ServiceContainer>
- implements ServiceContext{
-
- private static final Logger LOG = Logger.getLogger(CLAwareServiceContext.class.getName());
-
- /**
- * Default location for service loader files.
- */
- private static final String PREFIX = "META-INF/services/";
-
- /**
- * Constructor, using the current default classloader as defined by
- * {@link AbstractClassloaderAwareItemLoader#getDefaultClassLoader()}.
- */
- public CLAwareServiceContext(){
- super();
- }
-
- /**
- * Constructor, using the given classloader.
- * @param classLoader the target classloader for initializing of services, not null.
- */
- public CLAwareServiceContext(ClassLoader classLoader) {
- super(classLoader);
- }
-
-
- /**
- * Implementation that creates a {@link ServiceContainer}, which manages all configs and instances loaded
- * for a given classloader.
- * @param classLoader the classloader, not null.
- * @return a new empty, {@link ServiceContainer} instance.
- */
- @Override
- protected ServiceContainer createItem(ClassLoader classLoader) {
- if(LOG.isLoggable(Level.INFO)) {
- LOG.info("Loading services for classloader: " + classLoader);
- }
- return new ServiceContainer(classLoader);
- }
-
- @Override
- protected void updateItem(ServiceContainer currentContainer, ClassLoader classLoader) {
- // nothing to be done here, since we dont have a specific target type.
- }
-
- @Override
- public int ordinal() {
- return 10;
- }
-
- /**
- * This method tries to evaluate the current singleton from the {@link ServiceContainer} attached to the
- * current classloader. If not found the singleton instance is evaluated based on the priorities
- * assigned for all known providers. The resulting instance is then cached and always returned as
- * singleton instance fomr this loader, when the same current classloader instance is active.
- * @param serviceType the service type.
- * @param <T> the type
- * @return the item found, or null.
- */
- @Override
- public <T> T getService(Class<T> serviceType) {
- return getService(serviceType, getDefaultClassLoader());
- }
-
- /**
- * Evaluates the current singleton instance using the given classloader context.
- * @param serviceType the service type.
- * @param classLoader the classloader, not null.
- * @param <T> the type
- * @return the item found, or null.
- */
- public <T> T getService(Class<T> serviceType, ClassLoader classLoader) {
- if(LOG.isLoggable(Level.INFO)) {
- LOG.info("Evaluating services for classloader: " + classLoader);
- }
- ServiceContainer container = getItemNoParent(classLoader, true);
- T singleton = container.getSingleton(serviceType);
- if(singleton!=null){
- if(LOG.isLoggable(Level.FINEST)) {
- LOG.finest("Evaluated singleton of type " + serviceType.getName() + " to " + singleton);
- }
- return singleton;
- }
- Collection<? extends T> services = getServices(serviceType, classLoader);
- if (services.isEmpty()) {
- singleton = null;
- } else {
- singleton = getServiceWithHighestPriority(services, serviceType);
- }
- if(singleton!=null) {
- container.setSingleton(serviceType, singleton);
- }
- if(LOG.isLoggable(Level.FINEST)) {
- LOG.finest("Evaluated singleton of type " + serviceType.getName() + " to " + singleton);
- }
- return singleton;
- }
-
- /**
- * Gets the services visible.
- * @param serviceType
- * the service type.
- * @param <T> the type param
- * @return the services visible for the current classloader.
- */
- @Override
- public <T> List<T> getServices(Class<T> serviceType) {
- return getServices(serviceType, AbstractClassloaderAwareItemLoader.getDefaultClassLoader());
- }
-
- /**
- * Gets the services visible.
- * @param serviceType the service type.
- * @param classLoader the classloader
- * @param <T> the type param
- * @return the services visible for the current classloader.
- */
- public <T> List<T> getServices(Class<T> serviceType, ClassLoader classLoader) {
- List<T> services = new ArrayList<>();
- ClassLoader cl = classLoader;
- List<ServiceContainer> containers = new ArrayList<>();
- while(cl!=null) {
- ServiceContainer container = getItemNoParent(cl, true);
- containers.add(container);
- cl = cl.getParent();
- }
- List<ServiceContainer> prevContainers = new ArrayList<>();
- Collections.reverse(containers);
- for(ServiceContainer container: containers) {
- if (!container.isTypeLoaded(serviceType)) {
- container.loadServices(serviceType, prevContainers);
- }
- services.addAll(container.getServices(serviceType));
- prevContainers.add(container);
- }
- if(LOG.isLoggable(Level.FINEST)) {
- LOG.finest("Evaluated services of type " + serviceType.getName() + " to " + services);
- }
- return services;
- }
-
- /**
- * @param services to scan
- * @param <T> type of the service
- *
- * @return the service with the highest {@link javax.annotation.Priority#value()}
- *
- * @throws ConfigException if there are multiple service implementations with the maximum priority
- */
- private <T> T getServiceWithHighestPriority(Collection<? extends T> services, Class<T> serviceType) {
-
- // we do not need the priority stuff if the list contains only one element
- if (services.size() == 1) {
- return services.iterator().next();
- }
-
- Integer highestPriority = null;
- int highestPriorityServiceCount = 0;
- T highestService = null;
-
- for (T service : services) {
- int prio = getPriority(service);
- if (highestPriority == null || highestPriority < prio) {
- highestService = service;
- highestPriorityServiceCount = 1;
- highestPriority = prio;
- } else if (highestPriority == prio) {
- highestPriorityServiceCount++;
- }
- }
- if (highestPriorityServiceCount > 1) {
- throw new ConfigException(MessageFormat.format("Found {0} implementations for Service {1} with Priority {2}: {3}",
- highestPriorityServiceCount,
- serviceType.getName(),
- highestPriority,
- services));
- }
- return highestService;
- }
-
- /**
- * Checks the given instance for a @Priority annotation. If present the annotation's value s evaluated. If no such
- * annotation is present, a default priority is returned (1);
- * @param o the instance, not null.
- * @return a priority, by default 1.
- */
- public static int getPriority(Object o){
- int prio = 0;
- Priority priority = o.getClass().getAnnotation(Priority.class);
- if (priority != null) {
- prio = priority.value();
- }
- if(LOG.isLoggable(Level.FINEST)) {
- LOG.finest("Evaluated priority for " + o.getClass().getName() + " to " + prio);
- }
- return prio;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java b/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
deleted file mode 100644
index 23e73c0..0000000
--- a/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.clsupport;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.ref.WeakReference;
-import java.net.URL;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.ServiceConfigurationError;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Classloader managed ServiceContainer.
- */
-class ServiceContainer {
-
- private static final Logger LOG = Logger.getLogger(ServiceContainer.class.getName());
-
- private static final String PREFIX = "META-INF/services/";
-
- // The access control context taken when the ServiceLoader is created
- private final AccessControlContext acc;
-
- private final WeakReference<ClassLoader> classLoaderRef;
-
- /**
- * List current services loaded using this classloader, per class.
- */
- private final Map<Class<?>, Map<String, Object>> servicesLoaded = new ConcurrentHashMap<>();
- /**
- * The cached singletons for the given classloader.
- */
- private final Map<Class, Object> singletons = new ConcurrentHashMap<>();
-
- /**
- * List current services loaded using this classloader, per class.
- */
- private final Map<Class, List<URL>> configsLoaded = new ConcurrentHashMap<>();
-
- ServiceContainer(ClassLoader classLoader) {
- acc = (System.getSecurityManager() != null) ? AccessController.getContext() : null;
- this.classLoaderRef = new WeakReference<>(classLoader);
- }
-
- public ClassLoader getClassLoader() {
- ClassLoader cl = classLoaderRef.get();
- if (cl == null) {
- throw new IllegalStateException("Classloader reference removed, not active anynire.");
- }
- return cl;
- }
-
-
- public <T> void loadServices(Class<?> type,
- Collection<ServiceContainer> preceedingContainers) {
- Map<String, Object> services = this.servicesLoaded.get(type);
- if (services == null) {
- services = new LinkedHashMap<>();
- this.servicesLoaded.put(type, services);
- }
- loop:
- for (URL config : getConfigs(type)) {
- for (ServiceContainer cont : preceedingContainers) {
- if (cont.getConfigs(type).contains(config)) {
- LOG.finer("Ignoring already loaded config: " + config);
- continue loop;
- }
- }
- Collection<String> serviceNames = parse(type, config);
- for (String s : serviceNames) {
- for (ServiceContainer cont : preceedingContainers) {
- if (cont.containsService(type, s)) {
- LOG.finest("Ignoring duplicate service: " + s);
- }
- }
- LOG.info("Loading component: " + s);
- services.put(s, create(type, s));
- }
- }
- }
-
- private Collection<URL> getConfigs(Class<?> type) {
- List<URL> result = this.configsLoaded.get(type);
- if (result == null) {
- ClassLoader cl = this.classLoaderRef.get();
- if (cl == null) {
- throw new IllegalStateException("CLassLoader dereferenced already.");
- }
- result = new ArrayList<>();
- try {
- Enumeration<URL> resources = cl.getResources(PREFIX + type.getName());
- while (resources.hasMoreElements()) {
- result.add(resources.nextElement());
- }
- } catch (Exception e) {
- LOG.log(Level.WARNING, "Failed to read service config for " + type.getName() + " from " + cl, e);
- }
- this.configsLoaded.put(type, result);
- LOG.log(Level.FINE, "Found service config for " + type.getName() + ": " + result);
- }
- return result;
- }
-
- private boolean containsService(Class<?> type, String serviceClassName) {
- Map<String, Object> services = servicesLoaded.get(type);
- return services != null && services.containsKey(serviceClassName);
- }
-
-
- private <S> S create(Class<S> serviceType, String className) {
- Class<?> c = null;
- ClassLoader classLoader = getClassLoader();
- try {
- c = Class.forName(className, false, classLoader);
- } catch (ClassNotFoundException x) {
- fail(serviceType,
- "Provider " + className + " not found");
- }
- if (!serviceType.isAssignableFrom(c)) {
- fail(serviceType,
- "Provider " + className + " not a subtype");
- }
- try {
- return serviceType.cast(c.newInstance());
- } catch (Throwable x) {
- fail(serviceType,
- "Provider " + className + " could not be instantiated",
- x);
- }
- throw new Error(); // This cannot happen
- }
-
- public <T> Collection<T> getServices(Class<T> serviceType) {
- Map<String, Object> services = this.servicesLoaded.get(serviceType);
- if (services != null) {
- return (Collection<T>) services.values();
- }
- return Collections.emptySet();
- }
-
- public boolean isTypeLoaded(Class<?> serviceType) {
- return this.servicesLoaded.containsKey(serviceType);
- }
-
- public Collection<URL> load(Class<?> serviceType) {
- return load(serviceType, Collection.class.cast(Collections.emptySet()));
- }
-
- public Collection<URL> load(Class<?> serviceType, Collection<URL> configsLoaded) {
- List<URL> result = new ArrayList<>();
- try {
- Enumeration<URL> resources = getClassLoader().getResources(PREFIX + serviceType.getName());
- while (resources.hasMoreElements()) {
- URL res = resources.nextElement();
- if (!configsLoaded.contains(res)) {
- result.add(res);
- }
- }
- return result;
- } catch (Exception e) {
- fail(serviceType, "Failed to load service config: " + PREFIX + serviceType.getName(), e);
- }
- return result;
- }
-
-
- // Parse a single line from the given configuration file, adding the name
- // on the line to the names list.
- //
- private int parseLine(Class<?> serviceType, URL u, BufferedReader r, int lc,
- List<String> names)
- throws IOException, ServiceConfigurationError {
- String ln = r.readLine();
- if (ln == null) {
- return -1;
- }
- int ci = ln.indexOf('#');
- if (ci >= 0) {
- ln = ln.substring(0, ci);
- }
- ln = ln.trim();
- int n = ln.length();
- if (n != 0) {
- if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0)) {
- fail(serviceType, u, lc, "Illegal configuration-file syntax");
- }
- int cp = ln.codePointAt(0);
- if (!Character.isJavaIdentifierStart(cp)) {
- fail(serviceType, u, lc, "Illegal provider-class name: " + ln);
- }
- for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
- cp = ln.codePointAt(i);
- if (!Character.isJavaIdentifierPart(cp) && (cp != '.')) {
- fail(serviceType, u, lc, "Illegal provider-class name: " + ln);
- }
- }
- Map<String, Object> services = this.servicesLoaded.get(serviceType);
- if (services == null || !services.containsKey(ln) && !names.contains(ln)) {
- names.add(ln);
- }
- }
- return lc + 1;
- }
-
-
- // Parse the content of the given URL as a provider-configuration file.
- //
- // @param service
- // The service type for which providers are being sought;
- // used to construct error detail strings
- //
- // @param u
- // The URL naming the configuration file to be parsed
- //
- // @return A (possibly empty) iterator that will yield the provider-class
- // names in the given configuration file that are not yet members
- // of the returned set
- //
- // @throws ServiceConfigurationError
- // If an I/O error occurs while reading from the given URL, or
- // if a configuration-file format error is detected
- //
- private Collection<String> parse(Class<?> service, URL u)
- throws ServiceConfigurationError {
- InputStream in = null;
- BufferedReader r = null;
- ArrayList<String> names = new ArrayList<>();
- try {
- in = u.openStream();
- r = new BufferedReader(new InputStreamReader(in, "utf-8"));
- int lc = 1;
- while ((lc = parseLine(service, u, r, lc, names)) >= 0) {
- // go ahead
- }
- } catch (IOException x) {
- fail(service, "Error reading configuration file", x);
- } finally {
- try {
- if (r != null) {
- r.close();
- }
- if (in != null) {
- in.close();
- }
- } catch (IOException y) {
- fail(service, "Error closing configuration file", y);
- }
- }
- return names;
- }
-
-
- private static void fail(Class<?> service, String msg, Throwable cause)
- throws ServiceConfigurationError {
- LOG.log(Level.SEVERE, "Failed to load: " + service.getName() + ": " + msg, cause);
- }
-
- private static void fail(Class<?> service, String msg)
- throws ServiceConfigurationError {
- LOG.log(Level.SEVERE, "Failed to load: " + service.getName() + ": " + msg);
- }
-
- private static void fail(Class<?> service, URL u, int line, String msg)
- throws ServiceConfigurationError {
- fail(service, u + ":" + line + ": " + msg);
- }
-
- public <T> T getSingleton(Class<T> serviceType) {
- return (T) this.singletons.get(serviceType);
- }
-
- <T> void setSingleton(Class<T> type, T instance) {
- LOG.info("Caching singleton for " + type.getName() + " and classloader: " +
- getClassLoader().toString() + ": " + instance);
- this.singletons.put(type, instance);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/main/java/org/apache/tamaya/clsupport/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/clsupport/package-info.java b/src/main/java/org/apache/tamaya/clsupport/package-info.java
deleted file mode 100644
index d8e3953..0000000
--- a/src/main/java/org/apache/tamaya/clsupport/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * Programmatic API of the classloader support.
- */
-package org.apache.tamaya.clsupport;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
----------------------------------------------------------------------
diff --git a/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext b/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
deleted file mode 100644
index 7016afb..0000000
--- a/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy current the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.clsupport.CLAwareServiceContext
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi
----------------------------------------------------------------------
diff --git a/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi b/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi
deleted file mode 100644
index 7f71c15..0000000
--- a/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy current the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.environment.internal.ClassLoaderDependentAppEnvironmentProvider
-org.apache.tamaya.environment.internal.ClassLoaderDependentEarEnvironmentProvider
-org.apache.tamaya.environment.internal.InitialEnvironmentProviderSpi
-org.apache.tamaya.environment.internal.SystemClassLoaderEnvironmentProviderSpi
-org.apache.tamaya.metamodel.environment.TestEnvironmentProvider
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi
----------------------------------------------------------------------
diff --git a/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi b/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi
deleted file mode 100644
index 166dd67..0000000
--- a/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy current the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.environment.internal.SingleEnvironmentManager
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/pom.xml
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/pom.xml b/tamaya-classloader-support/pom.xml
new file mode 100644
index 0000000..2add22a
--- /dev/null
+++ b/tamaya-classloader-support/pom.xml
@@ -0,0 +1,73 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy current the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.tamaya.ext</groupId>
+ <artifactId>tamaya-extensions</artifactId>
+ <version>0.3-incubating-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>tamaya-classloader-support</artifactId>
+ <name>Apache Tamaya Modules - Classloader Support</name>
+ <description>Apache Tamaya Classloader Support registers a ConfigurationContext that leverages
+ classloader hierarchies. Also visibility of features and components is aligned with the
+ corresponding hierarchy of classloaders.</description>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <jdkVersion>1.7</jdkVersion>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tamaya</groupId>
+ <artifactId>tamaya-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tamaya.ext</groupId>
+ <artifactId>tamaya-spisupport</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>
+ org.apache.tamaya.clsupport
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
new file mode 100644
index 0000000..0145d1f
--- /dev/null
+++ b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
@@ -0,0 +1,268 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.clsupport;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+
+/**
+ * <p>This class implements an abstract base class, which basically provides a loading mechanism that supports
+ * loading and managing resources along the classloader hierarchies individually. It ensures resources are loaded
+ * and stored related to the each target classloader within the hierarchy individually. Additionally it enables
+ * mechanisms to ensure an item T is not loaded multiple times, when traversing up the classloader hierarchy.</p>
+ *
+ * <p>Finally classloaders are not stored by reference by this class, to ensure they still can be garbage collected.
+ * Instead this class uses the fully qualified class name of the loader and the corresponsing hashCode as returned
+ * by {@link Objects#hashCode(Object)}.</p>
+ *
+ * @param <T> the managed item type.
+ */
+public abstract class AbstractClassloaderAwareItemLoader<T> {
+ /**
+ * The logger used.
+ */
+ private static final Logger LOG = Logger.getLogger(AbstractClassloaderAwareItemLoader.class.getName());
+ /**
+ * The items managed, related to their classloader.
+ */
+ private final Map<String, T> items = new ConcurrentHashMap<>();
+
+ /**
+ * Creates a new instance, using the current Thread context classloader, or - if null - the classloader that
+ * loaded this class for initially initializing the loader instance.
+ */
+ public AbstractClassloaderAwareItemLoader() {
+ this(getDefaultClassLoader());
+ }
+
+ /**
+ * Creates a new instance, using the class loader given for initializing the resources loaded.
+ *
+ * @param classLoader the target top level classloader, not null.
+ */
+ public AbstractClassloaderAwareItemLoader(ClassLoader classLoader) {
+ loadItems(classLoader);
+ }
+
+ /**
+ * Loads the items for the given classloader and all its parent classloaders. This method will not update
+ * the items already found for any class loader involved.
+ *
+ * @param classLoader the target top level classloader, not null.
+ */
+ public void loadItems(ClassLoader classLoader) {
+ loadItems(classLoader, false);
+ }
+
+ /**
+ * Loads the items for the given classloader and all its parent classloaders.
+ *
+ * @param classLoader the target top level classloader, not null.
+ * @param update if set to true, resources not visible on former runs are added during this load.
+ */
+ public void loadItems(ClassLoader classLoader, boolean update) {
+ this.items.clear();
+ List<ClassLoader> cls = new ArrayList<>();
+ cls.add(classLoader);
+ ClassLoader cl = classLoader.getParent();
+ while (cl != null) {
+ cls.add(cl);
+ cl = cl.getParent();
+ }
+ // Start with the parent classloader and then go up...
+ for (int i = cls.size() - 1; i <= 0; i--) {
+ ClassLoader curCL = cls.get(i);
+ String clKey = getClassLoaderID(curCL);
+ T itemFound = items.get(clKey);
+ try {
+ if (itemFound != null) {
+ updateItem(itemFound, curCL);
+ } else {
+ items.put(clKey, createItem(curCL));
+ }
+ } catch (Exception e) {
+ LOG.log(Level.SEVERE,
+ "Error loading from classloader: " + curCL, e);
+ }
+ }
+ }
+
+ /**
+ * Creates a new item for being stored linked with the given lassloader.
+ *
+ * @param classLoader the classloader, not null.
+ * @return the new item loaded.
+ */
+ protected abstract T createItem(ClassLoader classLoader);
+
+ /**
+ * Creates a new item for being stored linked with the given lassloader.
+ *
+ * @param currentItemSet the current found ItemContainer instance to be updated.
+ * @param classLoader the classloader, not null.
+ */
+ protected abstract void updateItem(T currentItemSet, ClassLoader classLoader);
+
+ /**
+ * Evaluates a String key for identfying a classloader instance, based on the loader class and its hashCode.
+ * This prevents the storage of classloader references as keys and therefore enables classloaders not used anymore
+ * to be garbage collected.
+ *
+ * @param classLoader {@link ClassLoader} to be identified, must not be {@code null}.
+ * @return the unique key for the given classloader
+ */
+ public static String getClassLoaderID(ClassLoader classLoader) {
+ return classLoader.getClass().getName() + Objects.hash(classLoader);
+ }
+
+ /**
+ * Evaluates a String key for identfying a classloader instance, based on the loader class and its hashCode.
+ * This prevents the storage of classloader references as keys and therefore enables classloaders not used anymore
+ * to be garbage collected.
+ *
+ * @return the unique key for the current default classloader as returned by #getDefaultClassLoader.
+ */
+ public static String getClassLoaderID() {
+ return getClassLoaderID(getDefaultClassLoader());
+ }
+
+ /**
+ * Get all items valid for the current thread context class loader, or - if null - the classloader that loaded
+ * this class.
+ *
+ * @return the items found, never null.
+ */
+ public Set<T> getItems() {
+ return getItems(getDefaultClassLoader());
+ }
+
+ /**
+ * Get all items found for the given classloader and all its parent classloaders.
+ *
+ * @param classLoader the target top level classloader, not null.
+ * @return the items found, never null.
+ */
+ public Set<T> getItems(ClassLoader classLoader) {
+ Set<T> result = new HashSet<>();
+ ClassLoader cl = classLoader;
+ while (cl != null) {
+ T item = getItemNoParent(cl, true);
+ result.add(item);
+ cl = cl.getParent();
+ }
+ return result;
+ }
+
+ /**
+ * Get all items valid for the parent class loader of the current thread context class loader, or - if null - the
+ * parent of the classloader that loaded this class. This allows
+ * to build a delta list of instances only visible on the target classloader given.
+ *
+ * @return the items found, never null.
+ */
+ public Set<T> getParentItems() {
+ return getParentItems(getDefaultClassLoader());
+ }
+
+ /**
+ * Get all items found for the parent of the given classloader and all its parent classloaders. This allows
+ * to build a delta list of instances only visible on the target classloader given.
+ *
+ * @param classLoader the target top level classloader, not null.
+ * @return the items found, never null.
+ */
+ public Set<T> getParentItems(ClassLoader classLoader) {
+ Set<T> result = new HashSet<>();
+ ClassLoader cl = classLoader.getParent();
+ while (cl != null) {
+ T item = getItemNoParent(cl, true);
+ result.add(item);
+ cl = cl.getParent();
+ }
+ return result;
+ }
+
+ /**
+ * Return the item assigned to the current thread context class loader or - if null - the class that loaded
+ * this class. If not yet loaded this method will NOT trigger a load.
+ *
+ * @return the item attached, or null.
+ */
+ public T getItemNoParent() {
+ return getItemNoParent(getDefaultClassLoader(), false);
+ }
+
+ /**
+ * Return the item assigned to the current thread context class loader or - if null - the class that loaded
+ * this class.
+ *
+ * @param loadIfMissing Flag that allows to define if this method will trigger an item load, when no item is loaded
+ * for the current class loader.
+ * @return the item attached, or null.
+ */
+ public T getItemNoParent(boolean loadIfMissing) {
+ return getItemNoParent(getDefaultClassLoader(), loadIfMissing);
+ }
+
+ /**
+ * Return the item assigned to the current thread context class loader or - if null - the class that loaded
+ * this class.
+ *
+ * @param classLoader the target top level classloader, not null.
+ * @param loadIfMissing Flag that allows to define if this method will trigger an item load, when no item is loaded
+ * for the current class loader.
+ * @return the item attached, or null. If {@code loadIfMissing} is set to true, the result is normally not to be
+ * expected to be null.
+ */
+ public T getItemNoParent(ClassLoader classLoader, boolean loadIfMissing) {
+ String clKey = getClassLoaderID(classLoader);
+ T item = items.get(clKey);
+ if (item == null) {
+ if (loadIfMissing) {
+ item = createItem(classLoader);
+ this.items.put(clKey, item);
+ }
+ }
+ return item;
+ }
+
+
+ /**
+ * Utility method that either returns the current thread context classloader or
+ * - if not available - the classloader that loaded this class.
+ * @return the default classloader to be used, if no explicit classloader has been passed.
+ */
+ public static ClassLoader getDefaultClassLoader() {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ if (cl == null) {
+ cl = AbstractClassloaderAwareItemLoader.class.getClassLoader();
+ }
+ return cl;
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
new file mode 100644
index 0000000..94e5fb5
--- /dev/null
+++ b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.clsupport;
+
+import org.apache.tamaya.TypeLiteral;
+import org.apache.tamaya.spisupport.DefaultConfigurationContext;
+import org.apache.tamaya.spi.ConfigurationContext;
+import org.apache.tamaya.spi.ConfigurationContextBuilder;
+import org.apache.tamaya.spi.PropertyConverter;
+import org.apache.tamaya.spi.PropertyFilter;
+import org.apache.tamaya.spi.PropertySource;
+import org.apache.tamaya.spi.PropertyValueCombinationPolicy;
+
+import javax.annotation.Priority;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Logger;
+
+/**
+ * Default Implementation of a simple ConfigurationContext.
+ */
+@Priority(100)
+public class CLAwareConfigurationContext implements ConfigurationContext {
+
+ /** The logger used. */
+ private final static Logger LOG = Logger.getLogger(CLAwareConfigurationContext.class.getName());
+
+ private final ContextManager contextManager = new ContextManager();
+
+
+ @Override
+ public void addPropertySources(PropertySource... propertySourcesToAdd) {
+ contextManager.getItemNoParent(true).addPropertySources(propertySourcesToAdd);
+ }
+
+ @Override
+ public List<PropertySource> getPropertySources() {
+ return contextManager.getItemNoParent(true).getPropertySources();
+ }
+
+ @Override
+ public <T> void addPropertyConverter(TypeLiteral<T> typeToConvert, PropertyConverter<T> propertyConverter) {
+ contextManager.getItemNoParent(true).addPropertyConverter(typeToConvert, propertyConverter);
+ }
+
+ @Override
+ public Map<TypeLiteral<?>, List<PropertyConverter<?>>> getPropertyConverters() {
+ return contextManager.getItemNoParent(true).getPropertyConverters();
+ }
+
+ @Override
+ public <T> List<PropertyConverter<T>> getPropertyConverters(TypeLiteral<T> targetType) {
+ return contextManager.getItemNoParent(true).getPropertyConverters(targetType);
+ }
+
+ @Override
+ public List<PropertyFilter> getPropertyFilters() {
+ return contextManager.getItemNoParent(true).getPropertyFilters();
+ }
+
+ @Override
+ public PropertyValueCombinationPolicy getPropertyValueCombinationPolicy(){
+ return contextManager.getItemNoParent(true).getPropertyValueCombinationPolicy();
+ }
+
+ @Override
+ public ConfigurationContextBuilder toBuilder() {
+ return contextManager.getItemNoParent(true).toBuilder();
+ }
+
+
+ /**
+ * Subcomponent managing {@link ConfigurationContext} instances, one per classloader.
+ */
+ private static final class ContextManager extends AbstractClassloaderAwareItemLoader<ConfigurationContext>{
+
+ @Override
+ protected ConfigurationContext createItem(ClassLoader classLoader) {
+ // Simply create a complete configuration manager for every classloader. Maybe we will optimize this at a
+ // later stage in the project but as for now it is the most simple working solution.
+ return new DefaultConfigurationContext();
+ }
+
+ @Override
+ protected void updateItem(ConfigurationContext currentItemSet, ClassLoader classLoader) {
+ // ignore, currently not supported.
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
new file mode 100644
index 0000000..a5d1700
--- /dev/null
+++ b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.clsupport;
+
+import org.apache.tamaya.ConfigException;
+import org.apache.tamaya.spi.ServiceContext;
+
+import javax.annotation.Priority;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+
+/**
+ * <p>This class implements a {@link ServiceContext}, which basically provides a similar loading mechanism as used
+ * by the {@link java.util.ServiceLoader}. Whereas the {@link java.util.ServiceLoader} only loads configurations
+ * and instances from one classloader, this loader manages configs found and the related instances for each
+ * classloader along the classloader hierarchies individually. It ensures instances are loaded on the classloader
+ * level, where they first are visible. Additionally it ensures the same configuration resource (and its
+ * declared services) are loaded multiple times, when going up the classloader hierarchy.</p>
+ *
+ * <p>Finally classloaders are not stored by reference by this class, to ensure they still can be garbage collected.
+ * Refer also the inherited parent class for further details.</p>
+ *
+ * <p>This class uses an ordinal of {@code 10}, so it overrides any default {@link ServiceContext} implementations
+ * provided with the Tamaya core modules.</p>
+ */
+@Priority(10)
+public class CLAwareServiceContext extends AbstractClassloaderAwareItemLoader<ServiceContainer>
+ implements ServiceContext{
+
+ private static final Logger LOG = Logger.getLogger(CLAwareServiceContext.class.getName());
+
+ /**
+ * Default location for service loader files.
+ */
+ private static final String PREFIX = "META-INF/services/";
+
+ /**
+ * Constructor, using the current default classloader as defined by
+ * {@link AbstractClassloaderAwareItemLoader#getDefaultClassLoader()}.
+ */
+ public CLAwareServiceContext(){
+ super();
+ }
+
+ /**
+ * Constructor, using the given classloader.
+ * @param classLoader the target classloader for initializing of services, not null.
+ */
+ public CLAwareServiceContext(ClassLoader classLoader) {
+ super(classLoader);
+ }
+
+
+ /**
+ * Implementation that creates a {@link ServiceContainer}, which manages all configs and instances loaded
+ * for a given classloader.
+ * @param classLoader the classloader, not null.
+ * @return a new empty, {@link ServiceContainer} instance.
+ */
+ @Override
+ protected ServiceContainer createItem(ClassLoader classLoader) {
+ if(LOG.isLoggable(Level.INFO)) {
+ LOG.info("Loading services for classloader: " + classLoader);
+ }
+ return new ServiceContainer(classLoader);
+ }
+
+ @Override
+ protected void updateItem(ServiceContainer currentContainer, ClassLoader classLoader) {
+ // nothing to be done here, since we dont have a specific target type.
+ }
+
+ @Override
+ public int ordinal() {
+ return 10;
+ }
+
+ /**
+ * This method tries to evaluate the current singleton from the {@link ServiceContainer} attached to the
+ * current classloader. If not found the singleton instance is evaluated based on the priorities
+ * assigned for all known providers. The resulting instance is then cached and always returned as
+ * singleton instance fomr this loader, when the same current classloader instance is active.
+ * @param serviceType the service type.
+ * @param <T> the type
+ * @return the item found, or null.
+ */
+ @Override
+ public <T> T getService(Class<T> serviceType) {
+ return getService(serviceType, getDefaultClassLoader());
+ }
+
+ /**
+ * Evaluates the current singleton instance using the given classloader context.
+ * @param serviceType the service type.
+ * @param classLoader the classloader, not null.
+ * @param <T> the type
+ * @return the item found, or null.
+ */
+ public <T> T getService(Class<T> serviceType, ClassLoader classLoader) {
+ if(LOG.isLoggable(Level.INFO)) {
+ LOG.info("Evaluating services for classloader: " + classLoader);
+ }
+ ServiceContainer container = getItemNoParent(classLoader, true);
+ T singleton = container.getSingleton(serviceType);
+ if(singleton!=null){
+ if(LOG.isLoggable(Level.FINEST)) {
+ LOG.finest("Evaluated singleton of type " + serviceType.getName() + " to " + singleton);
+ }
+ return singleton;
+ }
+ Collection<? extends T> services = getServices(serviceType, classLoader);
+ if (services.isEmpty()) {
+ singleton = null;
+ } else {
+ singleton = getServiceWithHighestPriority(services, serviceType);
+ }
+ if(singleton!=null) {
+ container.setSingleton(serviceType, singleton);
+ }
+ if(LOG.isLoggable(Level.FINEST)) {
+ LOG.finest("Evaluated singleton of type " + serviceType.getName() + " to " + singleton);
+ }
+ return singleton;
+ }
+
+ /**
+ * Gets the services visible.
+ * @param serviceType
+ * the service type.
+ * @param <T> the type param
+ * @return the services visible for the current classloader.
+ */
+ @Override
+ public <T> List<T> getServices(Class<T> serviceType) {
+ return getServices(serviceType, AbstractClassloaderAwareItemLoader.getDefaultClassLoader());
+ }
+
+ /**
+ * Gets the services visible.
+ * @param serviceType the service type.
+ * @param classLoader the classloader
+ * @param <T> the type param
+ * @return the services visible for the current classloader.
+ */
+ public <T> List<T> getServices(Class<T> serviceType, ClassLoader classLoader) {
+ List<T> services = new ArrayList<>();
+ ClassLoader cl = classLoader;
+ List<ServiceContainer> containers = new ArrayList<>();
+ while(cl!=null) {
+ ServiceContainer container = getItemNoParent(cl, true);
+ containers.add(container);
+ cl = cl.getParent();
+ }
+ List<ServiceContainer> prevContainers = new ArrayList<>();
+ Collections.reverse(containers);
+ for(ServiceContainer container: containers) {
+ if (!container.isTypeLoaded(serviceType)) {
+ container.loadServices(serviceType, prevContainers);
+ }
+ services.addAll(container.getServices(serviceType));
+ prevContainers.add(container);
+ }
+ if(LOG.isLoggable(Level.FINEST)) {
+ LOG.finest("Evaluated services of type " + serviceType.getName() + " to " + services);
+ }
+ return services;
+ }
+
+ /**
+ * @param services to scan
+ * @param <T> type of the service
+ *
+ * @return the service with the highest {@link javax.annotation.Priority#value()}
+ *
+ * @throws ConfigException if there are multiple service implementations with the maximum priority
+ */
+ private <T> T getServiceWithHighestPriority(Collection<? extends T> services, Class<T> serviceType) {
+
+ // we do not need the priority stuff if the list contains only one element
+ if (services.size() == 1) {
+ return services.iterator().next();
+ }
+
+ Integer highestPriority = null;
+ int highestPriorityServiceCount = 0;
+ T highestService = null;
+
+ for (T service : services) {
+ int prio = getPriority(service);
+ if (highestPriority == null || highestPriority < prio) {
+ highestService = service;
+ highestPriorityServiceCount = 1;
+ highestPriority = prio;
+ } else if (highestPriority == prio) {
+ highestPriorityServiceCount++;
+ }
+ }
+ if (highestPriorityServiceCount > 1) {
+ throw new ConfigException(MessageFormat.format("Found {0} implementations for Service {1} with Priority {2}: {3}",
+ highestPriorityServiceCount,
+ serviceType.getName(),
+ highestPriority,
+ services));
+ }
+ return highestService;
+ }
+
+ /**
+ * Checks the given instance for a @Priority annotation. If present the annotation's value s evaluated. If no such
+ * annotation is present, a default priority is returned (1);
+ * @param o the instance, not null.
+ * @return a priority, by default 1.
+ */
+ public static int getPriority(Object o){
+ int prio = 0;
+ Priority priority = o.getClass().getAnnotation(Priority.class);
+ if (priority != null) {
+ prio = priority.value();
+ }
+ if(LOG.isLoggable(Level.FINEST)) {
+ LOG.finest("Evaluated priority for " + o.getClass().getName() + " to " + prio);
+ }
+ return prio;
+ }
+
+}
[2/3] incubator-tamaya-sandbox git commit: TAMAYA-174: Move
classloader stuff to its subfolder.
Posted by po...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
new file mode 100644
index 0000000..23e73c0
--- /dev/null
+++ b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
@@ -0,0 +1,306 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.clsupport;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.ref.WeakReference;
+import java.net.URL;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.ServiceConfigurationError;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Classloader managed ServiceContainer.
+ */
+class ServiceContainer {
+
+ private static final Logger LOG = Logger.getLogger(ServiceContainer.class.getName());
+
+ private static final String PREFIX = "META-INF/services/";
+
+ // The access control context taken when the ServiceLoader is created
+ private final AccessControlContext acc;
+
+ private final WeakReference<ClassLoader> classLoaderRef;
+
+ /**
+ * List current services loaded using this classloader, per class.
+ */
+ private final Map<Class<?>, Map<String, Object>> servicesLoaded = new ConcurrentHashMap<>();
+ /**
+ * The cached singletons for the given classloader.
+ */
+ private final Map<Class, Object> singletons = new ConcurrentHashMap<>();
+
+ /**
+ * List current services loaded using this classloader, per class.
+ */
+ private final Map<Class, List<URL>> configsLoaded = new ConcurrentHashMap<>();
+
+ ServiceContainer(ClassLoader classLoader) {
+ acc = (System.getSecurityManager() != null) ? AccessController.getContext() : null;
+ this.classLoaderRef = new WeakReference<>(classLoader);
+ }
+
+ public ClassLoader getClassLoader() {
+ ClassLoader cl = classLoaderRef.get();
+ if (cl == null) {
+ throw new IllegalStateException("Classloader reference removed, not active anynire.");
+ }
+ return cl;
+ }
+
+
+ public <T> void loadServices(Class<?> type,
+ Collection<ServiceContainer> preceedingContainers) {
+ Map<String, Object> services = this.servicesLoaded.get(type);
+ if (services == null) {
+ services = new LinkedHashMap<>();
+ this.servicesLoaded.put(type, services);
+ }
+ loop:
+ for (URL config : getConfigs(type)) {
+ for (ServiceContainer cont : preceedingContainers) {
+ if (cont.getConfigs(type).contains(config)) {
+ LOG.finer("Ignoring already loaded config: " + config);
+ continue loop;
+ }
+ }
+ Collection<String> serviceNames = parse(type, config);
+ for (String s : serviceNames) {
+ for (ServiceContainer cont : preceedingContainers) {
+ if (cont.containsService(type, s)) {
+ LOG.finest("Ignoring duplicate service: " + s);
+ }
+ }
+ LOG.info("Loading component: " + s);
+ services.put(s, create(type, s));
+ }
+ }
+ }
+
+ private Collection<URL> getConfigs(Class<?> type) {
+ List<URL> result = this.configsLoaded.get(type);
+ if (result == null) {
+ ClassLoader cl = this.classLoaderRef.get();
+ if (cl == null) {
+ throw new IllegalStateException("CLassLoader dereferenced already.");
+ }
+ result = new ArrayList<>();
+ try {
+ Enumeration<URL> resources = cl.getResources(PREFIX + type.getName());
+ while (resources.hasMoreElements()) {
+ result.add(resources.nextElement());
+ }
+ } catch (Exception e) {
+ LOG.log(Level.WARNING, "Failed to read service config for " + type.getName() + " from " + cl, e);
+ }
+ this.configsLoaded.put(type, result);
+ LOG.log(Level.FINE, "Found service config for " + type.getName() + ": " + result);
+ }
+ return result;
+ }
+
+ private boolean containsService(Class<?> type, String serviceClassName) {
+ Map<String, Object> services = servicesLoaded.get(type);
+ return services != null && services.containsKey(serviceClassName);
+ }
+
+
+ private <S> S create(Class<S> serviceType, String className) {
+ Class<?> c = null;
+ ClassLoader classLoader = getClassLoader();
+ try {
+ c = Class.forName(className, false, classLoader);
+ } catch (ClassNotFoundException x) {
+ fail(serviceType,
+ "Provider " + className + " not found");
+ }
+ if (!serviceType.isAssignableFrom(c)) {
+ fail(serviceType,
+ "Provider " + className + " not a subtype");
+ }
+ try {
+ return serviceType.cast(c.newInstance());
+ } catch (Throwable x) {
+ fail(serviceType,
+ "Provider " + className + " could not be instantiated",
+ x);
+ }
+ throw new Error(); // This cannot happen
+ }
+
+ public <T> Collection<T> getServices(Class<T> serviceType) {
+ Map<String, Object> services = this.servicesLoaded.get(serviceType);
+ if (services != null) {
+ return (Collection<T>) services.values();
+ }
+ return Collections.emptySet();
+ }
+
+ public boolean isTypeLoaded(Class<?> serviceType) {
+ return this.servicesLoaded.containsKey(serviceType);
+ }
+
+ public Collection<URL> load(Class<?> serviceType) {
+ return load(serviceType, Collection.class.cast(Collections.emptySet()));
+ }
+
+ public Collection<URL> load(Class<?> serviceType, Collection<URL> configsLoaded) {
+ List<URL> result = new ArrayList<>();
+ try {
+ Enumeration<URL> resources = getClassLoader().getResources(PREFIX + serviceType.getName());
+ while (resources.hasMoreElements()) {
+ URL res = resources.nextElement();
+ if (!configsLoaded.contains(res)) {
+ result.add(res);
+ }
+ }
+ return result;
+ } catch (Exception e) {
+ fail(serviceType, "Failed to load service config: " + PREFIX + serviceType.getName(), e);
+ }
+ return result;
+ }
+
+
+ // Parse a single line from the given configuration file, adding the name
+ // on the line to the names list.
+ //
+ private int parseLine(Class<?> serviceType, URL u, BufferedReader r, int lc,
+ List<String> names)
+ throws IOException, ServiceConfigurationError {
+ String ln = r.readLine();
+ if (ln == null) {
+ return -1;
+ }
+ int ci = ln.indexOf('#');
+ if (ci >= 0) {
+ ln = ln.substring(0, ci);
+ }
+ ln = ln.trim();
+ int n = ln.length();
+ if (n != 0) {
+ if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0)) {
+ fail(serviceType, u, lc, "Illegal configuration-file syntax");
+ }
+ int cp = ln.codePointAt(0);
+ if (!Character.isJavaIdentifierStart(cp)) {
+ fail(serviceType, u, lc, "Illegal provider-class name: " + ln);
+ }
+ for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
+ cp = ln.codePointAt(i);
+ if (!Character.isJavaIdentifierPart(cp) && (cp != '.')) {
+ fail(serviceType, u, lc, "Illegal provider-class name: " + ln);
+ }
+ }
+ Map<String, Object> services = this.servicesLoaded.get(serviceType);
+ if (services == null || !services.containsKey(ln) && !names.contains(ln)) {
+ names.add(ln);
+ }
+ }
+ return lc + 1;
+ }
+
+
+ // Parse the content of the given URL as a provider-configuration file.
+ //
+ // @param service
+ // The service type for which providers are being sought;
+ // used to construct error detail strings
+ //
+ // @param u
+ // The URL naming the configuration file to be parsed
+ //
+ // @return A (possibly empty) iterator that will yield the provider-class
+ // names in the given configuration file that are not yet members
+ // of the returned set
+ //
+ // @throws ServiceConfigurationError
+ // If an I/O error occurs while reading from the given URL, or
+ // if a configuration-file format error is detected
+ //
+ private Collection<String> parse(Class<?> service, URL u)
+ throws ServiceConfigurationError {
+ InputStream in = null;
+ BufferedReader r = null;
+ ArrayList<String> names = new ArrayList<>();
+ try {
+ in = u.openStream();
+ r = new BufferedReader(new InputStreamReader(in, "utf-8"));
+ int lc = 1;
+ while ((lc = parseLine(service, u, r, lc, names)) >= 0) {
+ // go ahead
+ }
+ } catch (IOException x) {
+ fail(service, "Error reading configuration file", x);
+ } finally {
+ try {
+ if (r != null) {
+ r.close();
+ }
+ if (in != null) {
+ in.close();
+ }
+ } catch (IOException y) {
+ fail(service, "Error closing configuration file", y);
+ }
+ }
+ return names;
+ }
+
+
+ private static void fail(Class<?> service, String msg, Throwable cause)
+ throws ServiceConfigurationError {
+ LOG.log(Level.SEVERE, "Failed to load: " + service.getName() + ": " + msg, cause);
+ }
+
+ private static void fail(Class<?> service, String msg)
+ throws ServiceConfigurationError {
+ LOG.log(Level.SEVERE, "Failed to load: " + service.getName() + ": " + msg);
+ }
+
+ private static void fail(Class<?> service, URL u, int line, String msg)
+ throws ServiceConfigurationError {
+ fail(service, u + ":" + line + ": " + msg);
+ }
+
+ public <T> T getSingleton(Class<T> serviceType) {
+ return (T) this.singletons.get(serviceType);
+ }
+
+ <T> void setSingleton(Class<T> type, T instance) {
+ LOG.info("Caching singleton for " + type.getName() + " and classloader: " +
+ getClassLoader().toString() + ": " + instance);
+ this.singletons.put(type, instance);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/package-info.java
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/package-info.java b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/package-info.java
new file mode 100644
index 0000000..d8e3953
--- /dev/null
+++ b/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Programmatic API of the classloader support.
+ */
+package org.apache.tamaya.clsupport;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext b/tamaya-classloader-support/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
new file mode 100644
index 0000000..7016afb
--- /dev/null
+++ b/tamaya-classloader-support/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy current the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.tamaya.clsupport.CLAwareServiceContext
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi b/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi
new file mode 100644
index 0000000..7f71c15
--- /dev/null
+++ b/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy current the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.tamaya.environment.internal.ClassLoaderDependentAppEnvironmentProvider
+org.apache.tamaya.environment.internal.ClassLoaderDependentEarEnvironmentProvider
+org.apache.tamaya.environment.internal.InitialEnvironmentProviderSpi
+org.apache.tamaya.environment.internal.SystemClassLoaderEnvironmentProviderSpi
+org.apache.tamaya.metamodel.environment.TestEnvironmentProvider
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi b/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi
new file mode 100644
index 0000000..166dd67
--- /dev/null
+++ b/tamaya-classloader-support/src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy current the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.tamaya.environment.internal.SingleEnvironmentManager
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/.plxarc
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/.plxarc b/tamaya-classloader-support/target/.plxarc
new file mode 100644
index 0000000..67ea6ee
--- /dev/null
+++ b/tamaya-classloader-support/target/.plxarc
@@ -0,0 +1 @@
+maven-shared-archive-resources
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/checkstyle-result.xml
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/checkstyle-result.xml b/tamaya-classloader-support/target/checkstyle-result.xml
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/META-INF/DEPENDENCIES
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/META-INF/DEPENDENCIES b/tamaya-classloader-support/target/classes/META-INF/DEPENDENCIES
new file mode 100644
index 0000000..824855f
--- /dev/null
+++ b/tamaya-classloader-support/target/classes/META-INF/DEPENDENCIES
@@ -0,0 +1,19 @@
+// ------------------------------------------------------------------
+// Transitive dependencies of this project determined from the
+// maven pom organized by organization.
+// ------------------------------------------------------------------
+
+Apache Tamaya Modules - Classloader Support
+
+
+From: 'Apache Software Foundation' (https://apache.org)
+ - Apache Tamaya API (https://tamaya.incubator.apache.org/tamaya-code/tamaya-api) org.apache.tamaya:tamaya-api:bundle:0.3-incubating-SNAPSHOT
+ License: Apache License (http://www.apache.org/licenses/LICENSE-2.0.html)
+
+From: 'The Apache Software Foundation' (http://www.apache.org)
+ - Apache Geronimo Annotation Spec 1.2 (http://geronimo.apache.org/maven/specs/geronimo-annotation_1.2_spec/1.0-alpha-1) org.apache.geronimo.specs:geronimo-annotation_1.2_spec:bundle:1.0-alpha-1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+
+
+
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/META-INF/LICENSE b/tamaya-classloader-support/target/classes/META-INF/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/tamaya-classloader-support/target/classes/META-INF/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/META-INF/NOTICE b/tamaya-classloader-support/target/classes/META-INF/NOTICE
new file mode 100644
index 0000000..0a82254
--- /dev/null
+++ b/tamaya-classloader-support/target/classes/META-INF/NOTICE
@@ -0,0 +1,8 @@
+
+Apache Tamaya Modules - Classloader Support
+Copyright 2014-2016 Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/META-INF/services/org.apache.tamaya.spi.ServiceContext
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/META-INF/services/org.apache.tamaya.spi.ServiceContext b/tamaya-classloader-support/target/classes/META-INF/services/org.apache.tamaya.spi.ServiceContext
new file mode 100644
index 0000000..7016afb
--- /dev/null
+++ b/tamaya-classloader-support/target/classes/META-INF/services/org.apache.tamaya.spi.ServiceContext
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy current the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.tamaya.clsupport.CLAwareServiceContext
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.class
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.class b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.class
new file mode 100644
index 0000000..86578a9
Binary files /dev/null and b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.class differ
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$1.class
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$1.class b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$1.class
new file mode 100644
index 0000000..f32a047
Binary files /dev/null and b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$1.class differ
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$ContextManager.class
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$ContextManager.class b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$ContextManager.class
new file mode 100644
index 0000000..06be736
Binary files /dev/null and b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext$ContextManager.class differ
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext.class
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext.class b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext.class
new file mode 100644
index 0000000..178c5d4
Binary files /dev/null and b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareConfigurationContext.class differ
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareServiceContext.class
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareServiceContext.class b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareServiceContext.class
new file mode 100644
index 0000000..68f501d
Binary files /dev/null and b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/CLAwareServiceContext.class differ
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/ServiceContainer.class
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/ServiceContainer.class b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/ServiceContainer.class
new file mode 100644
index 0000000..8cca6bf
Binary files /dev/null and b/tamaya-classloader-support/target/classes/org/apache/tamaya/clsupport/ServiceContainer.class differ
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/feature/feature.xml
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/feature/feature.xml b/tamaya-classloader-support/target/feature/feature.xml
new file mode 100644
index 0000000..3f22bdd
--- /dev/null
+++ b/tamaya-classloader-support/target/feature/feature.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="tamaya-classloader-support">
+ <feature name="tamaya-classloader-support" description="Apache Tamaya Modules - Classloader Support" version="0.3.0.incubating-SNAPSHOT">
+ <details>Apache Tamaya Classloader Support registers a ConfigurationContext that leverages
+ classloader hierarchies. Also visibility of features and components is aligned with the
+ corresponding hierarchy of classloaders.</details>
+ <bundle start-level="80">mvn:org.apache.tamaya/tamaya-api/0.3-incubating-SNAPSHOT</bundle>
+ <bundle start-level="80">mvn:org.apache.tamaya.ext/tamaya-spisupport/0.3-incubating-SNAPSHOT</bundle>
+ <bundle start-level="80">mvn:org.apache.geronimo.specs/geronimo-annotation_1.2_spec/1.0-alpha-1</bundle>
+ </feature>
+</features>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/findbugs-exclude.xml
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/findbugs-exclude.xml b/tamaya-classloader-support/target/findbugs-exclude.xml
new file mode 100644
index 0000000..50255d9
--- /dev/null
+++ b/tamaya-classloader-support/target/findbugs-exclude.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<FindBugsFilter>
+ <Match>
+ <!-- Also catches simple anonamous classes... -->
+ <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
+ </Match>
+
+ <Match>
+ <!-- Note: @todo Write a bug report
+ The current version of FindBugs (version 3.0.0) is not able to detect
+ the usage of this method via a method reference.
+ Oliver B. Fischer, 17.01.2015
+ -->
+ <Bug pattern="UPM_UNCALLED_PRIVATE_METHOD" />
+ </Match>
+
+ <Match>
+ <!-- Note: @todo Write a bug report
+ The current version of FindBugs (version 3.0.0) is not able to detect
+ correctly caught exceptions.
+ Oliver B. Fischer, 09.02.2015
+ -->
+ <Bug pattern="REC_CATCH_EXCEPTION"/>
+ </Match>
+
+ <Match>
+ <!-- Note: We will not fail because of an unread field. -->
+ <Bug pattern="URF_UNREAD_FIELD" />
+ </Match>
+
+ <Match>
+ <!-- Note: We will not fail because of an unused field -->
+ <Bug pattern="UUF_UNUSED_FIELD" />
+ </Match>
+
+ <Match>
+ <Class name='org.apache.tamaya.integration.cdi.TamayaCDIIntegration'/>
+ <Method name="initBeanManager"/>
+ </Match>
+
+ <Match>
+ <!-- Note:
+ Intended. See the inline comment on this issue in the source file
+ in revision ae66299e25b41167008021ffe95cad236f6e2bd3
+ Oliver B. Fischer, 17.01.2015
+ -->
+ <Class name='org.apache.tamaya.resource.internal.ClasspathCollector'/>
+ <Method name="doFindPathMatchingJarResources"
+ returns="java.util.Collection"/>
+ <Bug pattern="OS_OPEN_STREAM"/>
+
+ </Match>
+
+ <!-- False positive returnin null for Boolean is required by the implemented interface. -->
+ <Match>
+ <Class name="org.apache.tamaya.core.internal.converters.BooleanConverter"/>
+ </Match>
+
+ <!-- False positive: example class used for config demo. -->
+ <Match>
+ <Class name="org.apache.tamaya.examples.injection.Example"/>
+ </Match>
+
+ <!--
+ * findBugs does not detect usage via method references
+ * should be removed after see TODO ProgrammaticConfigurationContext:131
+ -->
+
+ <!-- Issues to review -->
+
+ <Match>
+ <Package name="org.apache.tamaya.core.internal"/>
+ </Match>
+
+ <!--<Match>-->
+ <!--<Class name="org.apache.tamaya.resolver.internal.ResourceResolver" />-->
+ <!--</Match>-->
+ <!--<Match>-->
+ <!--<Class name="org.apache.tamaya.resolver.internal.FileResolver" />-->
+ <!--</Match>-->
+ <!--<Match>-->
+ <!--<Class name="org.apache.tamaya.resolver.internal.DefaultExpressionEvaluator" />-->
+ <!--</Match>-->
+ <!--<Match>-->
+ <!--<Class name="org.apache.tamaya.inject.internal.ConfiguredSetterMethod" />-->
+ <!--</Match>-->
+ <Match>
+ <Class name="org.apache.tamaya.inject.internal.ConfigChangeCallbackMethod" />
+ </Match>
+
+ <Match>
+ <Class name="org.apache.tamaya.events.internal.DefaultConfigChangeObserver" />
+ <Method name="checkConfigurationUpdate" />
+ </Match>
+
+ <Match>
+ <Class name="org.apache.tamaya.inject.internal.DefaultDynamicValue"/>
+ </Match>
+ <Match>
+ <Class name="org.apache.tamaya.integration.cdi.DefaultDynamicValue"/>
+ </Match>
+ <Match>
+ <!-- Imported from APache Felix. -->
+ <Class name="org.apache.tamaya.integration.osgi.felix.FilePersistenceManager"/>
+ </Match>
+ <Match>
+ <!-- Imported from APache Felix. -->
+ <Class name="org.apache.tamaya.integration.osgi.felix.ConfigurationHandler"/>
+ </Match>
+ <Match>
+ <Class name="org.apache.tamaya.integration.osgi.injection.Activator"/>
+ </Match>
+ <Match>
+ <Class name="org.apache.tamaya.resource.internal.FileCollector"/>
+ <Method name="traverseAndSelectFromChildren"/>
+ </Match>
+
+</FindBugsFilter>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/findbugsXml.xml
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/findbugsXml.xml b/tamaya-classloader-support/target/findbugsXml.xml
new file mode 100644
index 0000000..f809c1f
--- /dev/null
+++ b/tamaya-classloader-support/target/findbugsXml.xml
@@ -0,0 +1,2 @@
+
+<BugCollection sequence='0' release='' analysisTimestamp='1476470380121' version='3.0.1' timestamp='1476470375000'><Project projectName='Apache Tamaya Modules - Classloader Support'><Jar>/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/target/classes</Jar><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/mojo/findbugs-maven-plugin/3.0.4/findbugs-maven-plugin-3.0.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/tamaya/buildconfigurations/0.3-incubating-SNAPSHOT/buildconfigurations-0.3-incubating-SNAPSHOT.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/geronimo/specs/geronimo-annotation_1.2_spec/1.0-alpha-1/geronimo-annotation_1.2_spec-1.0-alpha-1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/com/google/code/findbugs/findbugs/3.0.1/findbugs-3.0.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/net/jcip/jcip-annotations/1.0/jcip-annota
tions-1.0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/com/google/code/findbugs/bcel-findbugs/6.0/bcel-findbugs-6.0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/com/google/code/findbugs/jFormatString/2.0.1/jFormatString-2.0.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/ow2/asm/asm-debug-all/5.0.2/asm-debug-all-5.0.2.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/ow2/asm/asm-commons/5.0.2/asm-commons-5.0.2.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/ow2/asm/asm-tree/5.0.2/asm-tree-5.0.2.jar</AuxClasspathEntry><AuxClasspathE
ntry>/home/hirsch/.m2/repository/org/ow2/asm/asm/5.0.2/asm-5.0.2.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/com/apple/AppleJavaExtensions/1.4/AppleJavaExtensions-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/jaxen/jaxen/1.1.6/jaxen-1.1.6.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/ant/ant/1.9.4/ant-1.9.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/groovy/groovy/2.4.7/groovy-2.4.7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/groovy/groovy-ant/2.4.7/groovy-ant-2.4.7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/ant/ant-antlr/1.9.4/ant-antlr-1.9.4.ja
r</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/groovy/groovy-groovydoc/2.4.7/groovy-groovydoc-2.4.7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/groovy/groovy-templates/2.4.7/groovy-templates-2.4.7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/ant/ant-junit/1.9.4/ant-junit-1.9.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/groovy/groovy-xml/2.4.7/groovy-xml-2.4.7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/2.1/maven-reporting-impl-2.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-project/2.0.10/maven-project-2.0.10.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-settings/2.0.10/maven-settings-2.0.10.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apach
e/maven/maven-profile/2.0.10/maven-profile-2.0.10.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-plugin-registry/2.0.10/maven-plugin-registry-2.0.10.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-digester/commons-digester/1.6/commons-digester-1.6.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar</AuxClasspathEntry><AuxClasspathE
ntry>/home/hirsch/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-plugin-descriptor/2.2.1/maven-plugin-descriptor-2.2.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-artifact/2.2.1/maven-artifact-2.2.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/doxia/doxia-core/1.4/doxia-core-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.4/doxia-logging-api-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repos
itory/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.4/doxia-sink-api-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.4/doxia-decoration-model-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.4/doxia-site-renderer-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.4/doxia-module-xhtml-1.4.jar</AuxClasspat
hEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.4/doxia-module-fml-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-chain/commons-chain/1.1/commons-chain-1.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/sslext/sslext/1.2-0/sslext-1.2-0.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/struts/struts-core/1.3.8/struts-core-1.3.8.jar</AuxClasspath
Entry><AuxClasspathEntry>/home/hirsch/.m2/repository/antlr/antlr/2.7.2/antlr-2.7.2.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/struts/struts-taglib/1.3.8/struts-taglib-1.3.8.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/struts/struts-tiles/1.3.8/struts-tiles-1.3.8.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/shared/maven-doxia-tools/1.2.1/maven-doxia-tools-1.2.1.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-repository-metadata/2.0.6/m
aven-repository-metadata-2.0.6.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/plexus/plexus-container-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/plexus/plexus-resources/1.0-alpha-7/plexus-resources-1.0-alpha-7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/tamaya/tamaya-api/0.3-incubating-SNAPSHOT/tamaya-api-0.3
-incubating-SNAPSHOT.jar</AuxClasspathEntry><AuxClasspathEntry>/home/hirsch/.m2/repository/org/apache/tamaya/ext/tamaya-spisupport/0.3-incubating-SNAPSHOT/tamaya-spisupport-0.3-incubating-SNAPSHOT.jar</AuxClasspathEntry><SrcDir>/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/src/main/java</SrcDir><SrcDir>/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/target/generated-sources/annotations</SrcDir><WrkDir>/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/target</WrkDir></Project><Errors missingClasses='0' errors='0'></Errors><FindBugsSummary num_packages='1' total_classes='6' total_size='366' clock_seconds='2.42' referenced_classes='60' vm_version='25.102-b14' total_bugs='0' java_version='1.8.0_102' gc_seconds='0.06' alloc_mbytes='455.50' cpu_seconds='8.42' peak_mbytes='178.99' timestamp='Fri, 14 Oct 2016 20:39:35 +0200'><FileStats path='org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLo
ader.java' size='80' bugCount='0'></FileStats><FileStats path='org/apache/tamaya/clsupport/CLAwareConfigurationContext.java' size='37' bugCount='0'></FileStats><FileStats path='org/apache/tamaya/clsupport/CLAwareServiceContext.java' size='92' bugCount='0'></FileStats><FileStats path='org/apache/tamaya/clsupport/ServiceContainer.java' size='157' bugCount='0'></FileStats><PackageStats package='org.apache.tamaya.clsupport' total_bugs='0' total_size='366' total_types='6'><ClassStats bugs='0' size='80' interface='false' sourceFile='AbstractClassloaderAwareItemLoader.java' class='org.apache.tamaya.clsupport.AbstractClassloaderAwareItemLoader'></ClassStats><ClassStats bugs='0' size='26' interface='false' sourceFile='CLAwareConfigurationContext.java' class='org.apache.tamaya.clsupport.CLAwareConfigurationContext'></ClassStats><ClassStats bugs='0' size='1' interface='false' sourceFile='CLAwareConfigurationContext.java' class='org.apache.tamaya.clsupport.CLAwareConfigurationContext$1'></Class
Stats><ClassStats bugs='0' size='10' interface='false' sourceFile='CLAwareConfigurationContext.java' class='org.apache.tamaya.clsupport.CLAwareConfigurationContext$ContextManager'></ClassStats><ClassStats bugs='0' size='92' interface='false' sourceFile='CLAwareServiceContext.java' class='org.apache.tamaya.clsupport.CLAwareServiceContext'></ClassStats><ClassStats bugs='0' size='157' interface='false' sourceFile='ServiceContainer.java' class='org.apache.tamaya.clsupport.ServiceContainer'></ClassStats></PackageStats><FindBugsProfile><ClassProfile avgMicrosecondsPerInvocation='431' totalMilliseconds='266' name='edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine' standardDeviationMircosecondsPerInvocation='1225' maxMicrosecondsPerInvocation='20282' invocations='618'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='251' totalMilliseconds='156' name='edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine' standardDeviationMircosecondsPerInvocation='1713' maxMicros
econdsPerInvocation='34256' invocations='623'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='1594' totalMilliseconds='95' name='edu.umd.cs.findbugs.detect.FieldItemSummary' standardDeviationMircosecondsPerInvocation='3031' maxMicrosecondsPerInvocation='18288' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='353' totalMilliseconds='93' name='edu.umd.cs.findbugs.OpcodeStack$JumpInfoFactory' standardDeviationMircosecondsPerInvocation='532' maxMicrosecondsPerInvocation='5113' invocations='264'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='1426' totalMilliseconds='91' name='edu.umd.cs.findbugs.classfile.engine.bcel.ValueNumberDataflowFactory' standardDeviationMircosecondsPerInvocation='4376' maxMicrosecondsPerInvocation='33821' invocations='64'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='1366' totalMilliseconds='86' name='edu.umd.cs.findbugs.classfile.engine.bcel.IsNullValueDataflowFactory' standardDeviationMircosecondsPe
rInvocation='2064' maxMicrosecondsPerInvocation='8982' invocations='63'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='1199' totalMilliseconds='76' name='edu.umd.cs.findbugs.classfile.engine.bcel.TypeDataflowFactory' standardDeviationMircosecondsPerInvocation='1877' maxMicrosecondsPerInvocation='10233' invocations='64'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='1110' totalMilliseconds='66' name='edu.umd.cs.findbugs.detect.FindNoSideEffectMethods' standardDeviationMircosecondsPerInvocation='1447' maxMicrosecondsPerInvocation='5682' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='113' totalMilliseconds='66' name='edu.umd.cs.findbugs.util.TopologicalSort' standardDeviationMircosecondsPerInvocation='636' maxMicrosecondsPerInvocation='13574' invocations='583'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='1017' totalMilliseconds='64' name='edu.umd.cs.findbugs.classfile.engine.bcel.UnconditionalValueDerefDataflowFactory'
standardDeviationMircosecondsPerInvocation='1788' maxMicrosecondsPerInvocation='9552' invocations='63'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='899' totalMilliseconds='53' name='edu.umd.cs.findbugs.ba.npe.NullDerefAndRedundantComparisonFinder' standardDeviationMircosecondsPerInvocation='1125' maxMicrosecondsPerInvocation='5207' invocations='59'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='763' totalMilliseconds='49' name='edu.umd.cs.findbugs.classfile.engine.bcel.MethodGenFactory' standardDeviationMircosecondsPerInvocation='4783' maxMicrosecondsPerInvocation='38975' invocations='65'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='709' totalMilliseconds='44' name='edu.umd.cs.findbugs.classfile.engine.bcel.CFGFactory' standardDeviationMircosecondsPerInvocation='1446' maxMicrosecondsPerInvocation='11312' invocations='63'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='441' totalMilliseconds='42' name='edu.umd.cs.findbugs.classfile.e
ngine.bcel.JavaClassAnalysisEngine' standardDeviationMircosecondsPerInvocation='1676' maxMicrosecondsPerInvocation='15868' invocations='97'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='637' totalMilliseconds='38' name='edu.umd.cs.findbugs.detect.FindRefComparison$SpecialTypeAnalysis' standardDeviationMircosecondsPerInvocation='990' maxMicrosecondsPerInvocation='4366' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='569' totalMilliseconds='34' name='edu.umd.cs.findbugs.detect.NoteDirectlyRelevantTypeQualifiers' standardDeviationMircosecondsPerInvocation='1292' maxMicrosecondsPerInvocation='9186' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='450' totalMilliseconds='27' name='edu.umd.cs.findbugs.detect.OverridingEqualsNotSymmetrical' standardDeviationMircosecondsPerInvocation='1556' maxMicrosecondsPerInvocation='11921' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='393' totalMilliseconds
='23' name='edu.umd.cs.findbugs.detect.FunctionsThatMightBeMistakenForProcedures' standardDeviationMircosecondsPerInvocation='821' maxMicrosecondsPerInvocation='4047' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='383' totalMilliseconds='22' name='edu.umd.cs.findbugs.detect.BuildObligationPolicyDatabase' standardDeviationMircosecondsPerInvocation='783' maxMicrosecondsPerInvocation='5312' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='354' totalMilliseconds='21' name='edu.umd.cs.findbugs.detect.CalledMethods' standardDeviationMircosecondsPerInvocation='626' maxMicrosecondsPerInvocation='3100' invocations='60'></ClassProfile><ClassProfile avgMicrosecondsPerInvocation='342' totalMilliseconds='20' name='edu.umd.cs.findbugs.detect.ExplicitSerialization' standardDeviationMircosecondsPerInvocation='1422' maxMicrosecondsPerInvocation='10002' invocations='60'></ClassProfile></FindBugsProfile></FindBugsSummary><ClassFeatures></ClassFea
tures><History></History></BugCollection>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/DEPENDENCIES b/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
new file mode 100644
index 0000000..824855f
--- /dev/null
+++ b/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
@@ -0,0 +1,19 @@
+// ------------------------------------------------------------------
+// Transitive dependencies of this project determined from the
+// maven pom organized by organization.
+// ------------------------------------------------------------------
+
+Apache Tamaya Modules - Classloader Support
+
+
+From: 'Apache Software Foundation' (https://apache.org)
+ - Apache Tamaya API (https://tamaya.incubator.apache.org/tamaya-code/tamaya-api) org.apache.tamaya:tamaya-api:bundle:0.3-incubating-SNAPSHOT
+ License: Apache License (http://www.apache.org/licenses/LICENSE-2.0.html)
+
+From: 'The Apache Software Foundation' (http://www.apache.org)
+ - Apache Geronimo Annotation Spec 1.2 (http://geronimo.apache.org/maven/specs/geronimo-annotation_1.2_spec/1.0-alpha-1) org.apache.geronimo.specs:geronimo-annotation_1.2_spec:bundle:1.0-alpha-1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+
+
+
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/LICENSE b/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/NOTICE b/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/NOTICE
new file mode 100644
index 0000000..0a82254
--- /dev/null
+++ b/tamaya-classloader-support/target/maven-shared-archive-resources/META-INF/NOTICE
@@ -0,0 +1,8 @@
+
+Apache Tamaya Modules - Classloader Support
+Copyright 2014-2016 Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
new file mode 100644
index 0000000..fd8b916
--- /dev/null
+++ b/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -0,0 +1,6 @@
+org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.class
+org/apache/tamaya/clsupport/ServiceContainer.class
+org/apache/tamaya/clsupport/CLAwareServiceContext.class
+org/apache/tamaya/clsupport/CLAwareConfigurationContext.class
+org/apache/tamaya/clsupport/CLAwareConfigurationContext$1.class
+org/apache/tamaya/clsupport/CLAwareConfigurationContext$ContextManager.class
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
new file mode 100644
index 0000000..108b85d
--- /dev/null
+++ b/tamaya-classloader-support/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -0,0 +1,5 @@
+/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
+/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/package-info.java
+/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
+/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
+/home/hirsch/workspace2016/incubator-tamaya-sandbox/tamaya-classloader-support/src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/c2d2c093/tamaya-classloader-support/target/rat.txt
----------------------------------------------------------------------
diff --git a/tamaya-classloader-support/target/rat.txt b/tamaya-classloader-support/target/rat.txt
new file mode 100644
index 0000000..cad34fc
--- /dev/null
+++ b/tamaya-classloader-support/target/rat.txt
@@ -0,0 +1,35 @@
+
+*****************************************************
+Summary
+-------
+Generated at: 2016-10-14T20:39:31+02:00
+
+Notes: 0
+Binaries: 0
+Archives: 0
+Standards: 9
+
+Apache Licensed: 9
+Generated Documents: 0
+
+JavaDocs are generated, thus a license header is optional.
+Generated files do not require license headers.
+
+0 Unknown Licenses
+
+*****************************************************
+ Files with Apache License headers will be marked AL
+ Binary files (which do not require any license headers) will be marked B
+ Compressed archives will be marked A
+ Notices, licenses etc. will be marked N
+ AL src/main/java/org/apache/tamaya/clsupport/CLAwareConfigurationContext.java
+ AL src/main/java/org/apache/tamaya/clsupport/ServiceContainer.java
+ AL src/main/java/org/apache/tamaya/clsupport/AbstractClassloaderAwareItemLoader.java
+ AL src/main/java/org/apache/tamaya/clsupport/CLAwareServiceContext.java
+ AL src/main/java/org/apache/tamaya/clsupport/package-info.java
+ AL src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
+ AL src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextProviderSpi
+ AL src/test/resources/META-INF/services/org.apache.tamaya.environment.spi.ContextSpi
+ AL pom.xml
+
+*****************************************************
Re: [1/3] incubator-tamaya-sandbox git commit: TAMAYA-174: Update
docs.
Posted by "P. Ottlinger" <po...@apache.org>.
Am 14.10.2016 um 22:05 schrieb Oliver B. Fischer:
> Hi Phil, you commited also files below target ;-)
Fixed.
Thanks
Phil
Re: [1/3] incubator-tamaya-sandbox git commit: TAMAYA-174: Update
docs.
Posted by "Oliver B. Fischer" <o....@swe-blog.net>.
Hi Phil, you commited also files below target ;-)
Am 14.10.16 um 20:42 schrieb pottlinger@apache.org:
> Repository: incubator-tamaya-sandbox
> Updated Branches:
> refs/heads/master 30633b6e6 -> c2d2c0930
>
>
> TAMAYA-174: Update docs.
>
>
> Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo
> Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/2fdbcc83
> Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/2fdbcc83
> Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/2fdbcc83
>
> Branch: refs/heads/master
> Commit: 2fdbcc8336b0378b2063fb00cd92c9733a61ef23
> Parents: 30633b6
> Author: Phil Ottlinger <po...@apache.org>
> Authored: Fri Oct 14 20:40:19 2016 +0200
> Committer: Phil Ottlinger <po...@apache.org>
> Committed: Fri Oct 14 20:40:19 2016 +0200
>
> ----------------------------------------------------------------------
> readme.md | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/2fdbcc83/readme.md
> ----------------------------------------------------------------------
> diff --git a/readme.md b/readme.md
> index f9ab333..86fb00a 100644
> --- a/readme.md
> +++ b/readme.md
> @@ -1,6 +1,6 @@
> # Apache Tamaya (incubating) Sandbox
>
> -This is the sandbox of [Apache Tamaya](http://tamaya.incubator.apache.org).
> +This is the sandbox of [Apache Tamaya](https://tamaya.incubator.apache.org).
> The sandbox contains additional modules (extensions)
> of Apache Tamaya (incubating) **which are not mature enough**
> to be part of Apache Tamaya itself or the official extensions
> @@ -9,10 +9,10 @@ of Apache Tamaya.
> ## Rules for sandbox modules
>
> * All modules must be independent of each other.
> -* A module could be promoted my the PMC of Tamaya
> - to be part of the official Tamaya extensions if is
> +* A module can be promoted by the PMC of Tamaya
> + to be part of the official Tamaya extensions package if it is
> mature enough.
> -* A sandbox module could have it's own build chain
> +* A sandbox module should have it's own build chain
> in [Apache's Jenkins Server](https://builds.apache.org/)
>
>
>
--
N Oliver B. Fischer
A Schnhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fischer@swe-blog.net
S oliver.b.fischer
J oliver.b.fischer@jabber.org
X http://xing.to/obf