Top "Postconstruct" questions

@PostConstruct is a Java EE annotation used to select a method that needs to be executed after dependency injection is done to perform any initialization.

Invalid PostConstruct annotation

I have a xhtml page and in it i use informations that stored in a backing bean. but i need …

jsf postconstruct
@SessionScoped bean looses scope and gets recreated all the time, fields become null

I have a very strange problem with a SessionScoped bean in a JSF 2.0 project. Using Netbeans 6.9.1, Glassfish 3 server and PrimeFaces 3 …

jsf primefaces postconstruct
Multiple PostConstruct methods?

It says in Java's documentation page for PostConstruct that Only one method can be annotated with this annotation But I …

java postconstruct
JSF bean: call @PostConstruct function after ViewParam is set

I have a product.xhtml and a ProductBean. I use /product/{id} to access the products so I have a …

jsf-2 managed-bean postconstruct viewparams
JSF - Bean injection trouble

As suggested by a user time ago in another question, I need to inject a bean in another bean. So, …

java jsf jsf-2 facelets postconstruct
Why @PostConstruct method is not called when autowiring prototype bean with constructor argument

I have a prototype-scope bean, which I want to be injected by @Autowired annotation. In this bean, there is also @…

java spring postconstruct prototype-scope
Mockito and CDI bean injection, does @InjectMocks call @PostConstruct?

I have this code: class Patient { @Inject Syringe syringe; @PostConstruct void sayThankyouDoc() { System.out.println("That hurt like crazy!"); } } @RunWith(…

java junit mockito cdi postconstruct
@Singleton bean failed to initialize because of not expected transaction status 4 when it's marked TransactionAttribute=NOT_SUPPORTED

I'm having difficulty with my EJB3.1 bean initialisation and more specifically to do with it failing due to perceived transaction …

jakarta-ee transactions ejb-3.1 weblogic12c postconstruct
Init method gets called twice in @Viewscoped bean

I am using schedule component of Primefaces. I am filling it with values from database and when the user selects …

jsf jsf-2 primefaces annotations postconstruct