Class TtlAgent


  • public final class TtlAgent
    extends Object
    TTL Java Agent.

    The configuration/arguments for agent see the javadoc of premain(String, Instrumentation)

    NOTE:
    Since v2.6.0, TTL agent jar will auto add self to boot classpath. But you should NOT modify the downloaded TTL jar file name in the maven repo(eg: transmittable-thread-local-2.x.x.jar).
    if you modified the downloaded TTL agent jar file name(eg: ttl-foo-name-changed.jar), you must add TTL agent jar to boot classpath manually by java option -Xbootclasspath/a:path/to/ttl-foo-name-changed.jar.

    The implementation of auto adding self agent jar to boot classpath use the Boot-Class-Path property of manifest file(META-INF/MANIFEST.MF) in the TTL Java Agent Jar:

    Boot-Class-Path
    A list of paths to be searched by the bootstrap class loader. Paths represent directories or libraries (commonly referred to as JAR or zip libraries on many platforms). These paths are searched by the bootstrap class loader after the platform specific mechanisms of locating a class have failed. Paths are searched in the order listed.

    More info about Boot-Class-Path see The mechanism for instrumentation.

    Since:
    0.9.0
    Author:
    Jerry Lee (oldratlee at gmail dot com)
    See Also:
    TransmittableThreadLocal, Instrumentation, The mechanism for instrumentation, JAR File Specification - JAR Manifest, Working with Manifest Files - The Java™ TutorialsHide