[Index]

url-class-loader


A simple wrapper for URLClassloader.

The class loader is created when this type is configured, and the same class loader is then shared with all jobs that reference this type. Because creating numerous class loader can use up the permgen heap space it is best to avoid creating the type in a loop. Instead add it to variables outside the loop and only reference it inside the loop.


Property Summary

files Files to add to the classpath.
noInherit Don't inherit the parent class loader.
parent The parent class loader to inherit.
urls URLs to add to the classpath.

Example Summary

Example 1 A simple example.

Property Detail

files

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

Files to add to the classpath.

noInherit

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

Don't inherit the parent class loader.

parent

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo, defaults to any existing Oddjob class loader.

The parent class loader to inherit.

urls

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

URLs to add to the classpath.


Examples

Example 1

A simple example. A single directory is added to the class path.

<oddjob id="this">
    <job>
        <oddjob id="nested" file="${this.dir}/URLClassLoaderInner.xml">
            <classLoader>
                <url-class-loader>
                    <files>
                        <file file="${this.args[0]}/test/classloader"/>
                    </files>
                </url-class-loader>
            </classLoader>
        </oddjob>
    </job>
</oddjob>


(c) Rob Gordon 2005 - 2014