org.apache.tapestry5.ioc.annotations

## Annotation Type Scope

-     @Target(value={TYPE,METHOD})
       @Retention(value=RUNTIME)
       @Documented
       @UseWith(value={SERVICE,MODULE})
      public @interface Scope

  An optional annotation that may be placed on a service building method of a module, or on the implementation class (when using service binding). The annotation overrides the default scope for services (the default being a global singleton that is instantiated on demand) for an alternate lifecycle. Alternate lifecycles are typically used to bind a service implementation to a single thread or request. Modules may define new scopes. Each scope should have a corresponding `ServiceLifecycle` implementation. The linkage from scope name to service lifecycle occurs via a contribution to the `ServiceLifecycleSource` service configuration. The annotation may also be placed directly on a service implementation class, when using service binding (via the `ServiceBinder`).
  See Also:
    `ScopeConstants`

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `value` An identifier used to look up a non-default `ServiceLifecycle`.

- - ### Element Detail

    - #### value

          public abstract String value

      An identifier used to look up a non-default `ServiceLifecycle`.

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.