Bug 1015927
Summary: | Unable to access context properties for references in Bean services | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Fuse Service Works 6 | Reporter: | Keith Babo <kbabo> | ||||
Component: | SwitchYard | Assignee: | Keith Babo <kbabo> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Tomas Rohovsky <trohovsk> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.0.0 GA | CC: | ldimaggi, oskutka, soa-p-jira | ||||
Target Milestone: | ER7 | ||||||
Target Release: | 6.0.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1024882 (view as bug list) | Environment: | |||||
Last Closed: | Type: | Bug | |||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1024882 | ||||||
Attachments: |
|
Description
Keith Babo
2013-10-06 21:54:30 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1465 to Resolved Keith Babo <kbabo> made a comment on jira SWITCHYARD-1465 pushed Keith Babo <kbabo> updated the status of jira SWITCHYARD-1465 to Reopened Created attachment 837731 [details]
reporducer
Properties set to a reply in one bean component are null in the receiving bean component. I have attached a reproducer. Everything else seems to work as it should. Steps to reproduce: 1. run AS 2. unpack reproducer 3. execute: mvn clean package jboss-as:deploy exec:java jboss-as:undeploy Actual result: Greetings to John Doe from ServiceA Greetings to John Doe from ServiceB [propertyB=null] Expected result: Greetings to John Doe from ServiceA Greetings to John Doe from ServiceB [propertyB=valueB] This is actually an issue with the app. The context you injected in ServiceBBean is for the request context. This is the one corner case that was really hard to fit into the existing API. The procedure to set a context property on the response is a bit convoluted unfortunately: @Inject Exchange exchange; @Override public String call(String name) { Message message = exchange.createMessage(); message.setContent("Greetings to " + name + " from ServiceB"); message.getContext().setProperty("propertyB", "valueB"); exchange.send(message); // return ignored in favor of object used with send() above return null; } Just for completeness. The property can be obtained in ServiceABean this way: String propertyB = invocation.getContext().getPropertyValue("propertyB"); Keith Babo <kbabo> updated the status of jira SWITCHYARD-1465 to Closed |