org.glassfish.jersey.spi
Annotation Type PerLookup


@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
public @interface PerLookup

Used to annotate resources require new instance for each usage. Resources are managed in the per lookup scope by default except when they are also providers (for example container request filters). In this case class which is both, provider and resource class, will be bound as singletons. Annotating such resource provider class with the @PerLookup annotation with override this behaviour and a new instance will be created whenever the resource class is looked up in HK2. However, the class might still be managed as a separate singleton provider.



Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.