Bug 1086295 - SwitchYard injection does not work in @PostConstruct method of Service bean
Summary: SwitchYard injection does not work in @PostConstruct method of Service bean
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Rob Cernich
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-10 14:53 UTC by Anton Giertli
Modified: 2018-12-06 16:16 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-14 17:59:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer (27.75 KB, application/zip)
2014-04-10 14:53 UTC, Anton Giertli
no flags Details
tests (2.69 KB, text/x-java)
2014-04-10 14:54 UTC, Anton Giertli
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ENTESB-3632 0 Major Closed SwitchYard injection does not work in @PostConstruct method of Service bean 2016-05-02 08:23:14 UTC

Description Anton Giertli 2014-04-10 14:53:47 UTC
Created attachment 884983 [details]
reproducer

Description of problem:

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.

Comment 1 Anton Giertli 2014-04-10 14:54:10 UTC
Created attachment 884984 [details]
tests

Comment 2 Aileen 2015-03-02 16:33:13 UTC
Need to diagnose if feasible to do this.

Comment 3 tcunning 2015-07-14 17:59:46 UTC
We're moving to tracking issues in JIRA for Fuse 6.2.1.   Logged https://issues.jboss.org/browse/ENTESB-3632 to represent this issue.   Closing the BZ, work will continue at the associated JIRA.

Comment 4 JBoss JIRA Server 2015-08-06 19:10:26 UTC
Tom Cunningham <tcunning> updated the status of jira ENTESB-3632 to Closed


Note You need to log in before you can comment on or make changes to this bug.