Details
-
Bug
-
Resolution: Won't Do
-
Major
-
jboss-fuse-6.2
-
None
Description
As described by Keith:
"You can't use SY injection in @PostConstruct, for references, properties, or anything else. The reason why is that the CDI lifecycle is separate from the SY deployment lifecycle and at the time PostConstruct is called, the SY deployment lifecycle has not completed."
This still needs to be addressed though.
Version-Release number of selected component (if applicable):
FSW 6.0.0
How reproducible:
always
Steps to Reproduce: properties example
1. Create SY property
2. Try to obtain its value in the @PostConstruct method
3. Deploy the application - the value is null
Actual results:
The value of injected property is null in the @PostConstruct method
Expected results:
The value is properly injected and retrieved.
Additional info:
I am attaching
- test project which can be used for testing, you can use it like
- mvn clean package jboss-as:deploy — FSW needs to be running
- mvn exec:java
I have also attached tests I have done so far.