Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ThreadLocalTargetSource Class

ITargetSource implementation that uses a threading model in which every thread has its own copy of the target.

For a list of all members of this type, see ThreadLocalTargetSource Members .


[Visual Basic]
Public NotInheritable Class ThreadLocalTargetSource
    Inherits AbstractPrototypeTargetSource
    Implements IThreadLocalTargetSourceStats, IDisposable, IMethodInterceptor, IInterceptor, IAdvice
public sealed class ThreadLocalTargetSource : AbstractPrototypeTargetSource, IThreadLocalTargetSourceStats, IDisposable, IMethodInterceptor, IInterceptor, IAdvice

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


Alternative to an object pool.

Application code is written as to a normal pool; callers can't assume they will be dealing with the same instance in invocations in different threads. However, state can be relied on during the operations of a single thread: for example, if one caller makes repeated calls on the AOP proxy.

This class act both as an introduction and as an interceptor, so it should be added twice, once as an introduction and once as an interceptor.


Namespace: Spring.Aop.Target

Assembly: Spring.Aop (in Spring.Aop.dll)

See Also

ThreadLocalTargetSource Members | Spring.Aop.Target Namespace