GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing javaee.github.io — Using the @PostConstruct and @PreDestroy Annotations with CDI Managed Bean Classes
Using the @PostConstruct and @PreDestroy Annotations with CDI Managed Bean ClassesCDI managed bean classes and their superclasses support the annotations
for initializing and for preparing for the destruction of a bean. These
annotations are defined in JSR 250: Common Annotations for the Java
platform ( The following topics are addressed here: To Initialize a Managed Bean Using the @PostConstruct AnnotationInitializing a managed bean specifies the lifecycle callback method that the CDI framework should call after dependency injection but before the class is put into service.
When the managed bean is injected into a component, CDI calls the method after all injection has occurred and after all initializers have been called.
The
To Prepare for the Destruction of a Managed Bean Using the @PreDestroy AnnotationPreparing for the destruction of a managed bean specifies the lifecycle call back method that signals that an application component is about to be destroyed by the container.
CDI calls this method before starting to destroy the bean.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
| ||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |