Thanks for the clarifications Keith!
Hey Dan,Thanks for putting these notes together. Very useful and I will definitely slap this into an article in the SwitchYard community. One small change to the steps you've used:# add <component name="Hello"></component> and <component name="Goodbye"></component> nodes as children of the <composite> node in switchyard.xmlThis is not necessary and I'll tell you why in one sec ...switchyard add-reference --referenceName Hello --interfaceType java --interface org.example.greeting.Hello --componentName Helloswitchyard add-reference --referenceName Goodbye --interfaceType java --interface org.example.greeting.Goodbye --componentName GoodbyeI left out an important detail in my prior email, which is that the target component for these references should be the Greeting service component. A service reference is essentially documentation of a dependency on another service (e.g. @Inject in a bean, import … in a Java class, etc.). So in this case, you want to add the references to the component which is calling the service(s). Modifying your instructions, it should look like this:switchyard add-reference --referenceName Hello --interfaceType java --interface org.example.greeting.Hello --componentName Greetingswitchyard add-reference --referenceName Goodbye --interfaceType java --interface org.example.greeting.Goodbye --componentName GreetingThe reason why it works with your original commands is that there's a bug (which you uncovered ;-) ) where service references are shared across all service components in an application. So even though you were defining the service reference on the Hello service component, the Greeting service component was able to resolve the same reference at runtime. This also required you to add the extra component definitions to switchyard.xml in order to add the reference to them.Bottom line is that if you use the modified commands above, it will still work and you won't have to muck with the XML at all. Here's the JIRA for the bug:cheers,keithtestswitchyard promote-service --serviceName Greetingcamel-binding bind-service --serviceName Greeting --configURI file:///tmp/inputbuild# deploy target/greeting.jar to SwitchYard AS 7 Server (http://downloads.jboss.org/switchyard/releases/v0.5.Beta1/switchyard-as7-0.5.0.Beta1.zip)mkdir /tmp/inputecho "SwitchYard" > /tmp/input/message.txt# Observe the following output in the AS 7 console:# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input) Hello, SwitchYard# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input)# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input) Goodbye, SwitchYard# INFO [stdout] (Camel (camel-5) thread #10 - file:///tmp/input)Good luck!-DanOn Fri, Jul 6, 2012 at 6:34 PM, Dan Allen <dan.j.allen@gmail.com> wrote:
On Fri, Jul 6, 2012 at 5:53 PM, Keith Babo <kbabo@redhat.com> wrote:
This is a "feature" of the XML validation in Eclipse. Disable "Honour all scheme locations" under XML - Validation (or something like that).
When I got back a test with lots of red marks, I should have asked my teacher "is it possible to turn off this validation feature?"
hahaha
-Dan
--
Dan AllenPrincipal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
--Dan AllenPrincipal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597