org.apache.openejb.config
Class DeploymentsResolver

java.lang.Object
  extended by org.apache.openejb.config.DeploymentsResolver
All Implemented Interfaces:
DeploymentFilterable

public class DeploymentsResolver
extends Object
implements DeploymentFilterable

Version:
$Rev: 1417504 $ $Date: 2012-12-05 17:18:01 +0100 (Mer, 05 déc 2012) $

Nested Class Summary
static class DeploymentsResolver.DeploymentsConfigurationException
           
 
Field Summary
 
Fields inherited from interface org.apache.openejb.config.DeploymentFilterable
CLASSPATH_EXCLUDE, CLASSPATH_FILTER_DESCRIPTORS, CLASSPATH_FILTER_SYSTEMAPPS, CLASSPATH_INCLUDE, CLASSPATH_REQUIRE_DESCRIPTOR, DEPLOYMENTS_CLASSPATH_PROPERTY, PACKAGE_EXCLUDE, PACKAGE_INCLUDE, SEARCH_CLASSPATH_FOR_DEPLOYMENTS_PROPERTY
 
Constructor Summary
DeploymentsResolver()
           
 
Method Summary
protected static boolean isValidDirectory(File file)
           
static void loadFrom(Deployments dep, FileUtils path, List<File> jarList)
           
static void loadFromClasspath(FileUtils base, List<URL> jarList, ClassLoader classLoader)
          The algorithm of OpenEJB deployments class-path inclusion and exclusion is implemented as follows: 1- If the string value of the resource URL matches the include class-path pattern Then load this resource 2- If the string value of the resource URL matches the exclude class-path pattern Then ignore this resource 3- If the include and exclude class-path patterns are not defined Then load this resource

The previous steps are based on the following points: 1- Include class-path pattern has the highest priority This helps in case both patterns are defined using the same values.

static void processUrls(List<URL> urls, ClassLoader classLoader, Set<RequireDescriptors> requireDescriptors, FileUtils base, List<URL> jarList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentsResolver

public DeploymentsResolver()
Method Detail

isValidDirectory

protected static boolean isValidDirectory(File file)

loadFrom

public static void loadFrom(Deployments dep,
                            FileUtils path,
                            List<File> jarList)

loadFromClasspath

public static void loadFromClasspath(FileUtils base,
                                     List<URL> jarList,
                                     ClassLoader classLoader)
The algorithm of OpenEJB deployments class-path inclusion and exclusion is implemented as follows: 1- If the string value of the resource URL matches the include class-path pattern Then load this resource 2- If the string value of the resource URL matches the exclude class-path pattern Then ignore this resource 3- If the include and exclude class-path patterns are not defined Then load this resource

The previous steps are based on the following points: 1- Include class-path pattern has the highest priority This helps in case both patterns are defined using the same values. This appears in step 1 and 2 of the above algorithm. 2- Loading the resource is the default behaviour in case of not defining a value for any class-path pattern This appears in step 3 of the above algorithm.


processUrls

public static void processUrls(List<URL> urls,
                               ClassLoader classLoader,
                               Set<RequireDescriptors> requireDescriptors,
                               FileUtils base,
                               List<URL> jarList)


Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.