Package jakarta.enterprise.context
Annotation Interface AutoClose
Marks the annotated bean as auto-closeable. May be applied to a bean class,
producer method or field or stereotype.
Auto-closeable beans may implement the AutoCloseable interface. If they do,
the AutoCloseable.close() method is called during bean destruction.
Note that bean destruction (Contextual.destroy(Object, CreationalContext))
may not throw, so exceptions thrown by AutoCloseable.close() are swallowed.
- Since:
- 5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSupports inline instantiation of theAutoCloseannotation.