@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface TransientReference
If a parameter annotated with @TransientReference resolves to a dependent scoped bean, then the bean will be destroyed after the invocation completes.
public class OrderManager {
@Inject
public OrderManager(@TransientReference Order order) {
...
}
}
Copyright © 2008–2017 JBoss by Red Hat, Inc.. All rights reserved.