How do I use the @PostConstruct annotation in EJB 3.0?

Byron Tymvios

You will firstly need to import javax.annotation.PostConstruct before you can use the annotation. Then annotate a method with @PostConstruct

public void postConstruct(){
    //Place your post construction code here
The @PostConstruct annotated method will be called by the container after the bean has been constructed and before any business methods of the bean are executed.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.