A Method Annotated @PostConstruct Is Ignored In A POJO JAX-WS When The "WEB-INF/bean.xml" Exists
Last updated on JUNE 09, 2016
Applies to:Oracle WebLogic Server - Version 18.104.22.168.0 and later
Information in this document applies to any platform.
When the "WEB-INF/bean.xml" file exists in WAR, the method annotated with @PostConstruct is not invoked:
INFO 04:07:24,584 MockService02 - MockService02()--->C O N S T R U C T O R
INFO 04:07:24,696 MockService01 - MockService01()--->C O N S T R U C T O R
when the file does not exist (ex: WEB-INF/bean.xmlxx), the method works:
INFO 04:11:04,220 MockService02 - MockService02()--->C O N S T R U C T O R
INFO 04:11:04,220 MockService02 - init()--->P O S T C O N S T R U C T O R
Attaching the testcase.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms