|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Retention(value=RUNTIME)
@Scope
@Target(value={TYPE,METHOD})
public @interface PerThread
PerThread is a scope that operates like Singleton scope, except on a per-thread basis. The lifecycle of the
service is determined by the thread it is on. On a single thread only one of the service will be created, but a new
service will be created for each thread.
The PerThread scope is not automatically handled by a new ServiceLocator. In order to enable the PerThread scope
the user can either add an implementation of Context which handles it or it can use the
ServiceLocatorUtilities#enablePerThreadScope method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||