[forge-dev] trying to close the gap on a SwitchYard demo

Dan Allen dan.j.allen at gmail.com
Wed Jul 11 03:35:49 EDT 2012


Thanks for the clarifications Keith!

You'll be happy to know that I demoed SwitchYard using Forge at JAXconf not
just once, but twice! Encore! Both times, the demo worked perfectly. The
audience was impressed (you could even say amazed) with the flow between
Forge and the Eclipse tooling. I'm telling you, this is the sweet spot.

The first time I demoed it with JBoss Tools 3.3 + SwitchYard Tooling + BPM2
Modeler. The second time with JBDS 5.0 + SwitchYard Tooling + BPM2 Modeler.

Both times I had to copy a prepared version of the Greeting.bpm2 file to
the src/main/resources/META-INF directory since I can't replicate the
business process using the visual editor alone. I'm noticing w/ the JBDS
5.0 combination there is an exception thrown when I try to edit the UI
inputs tab in the SwitchYard task properties. I'm not sure what's going on
there...but if you install the tools and run through the demo, you should
see the error.

Lincoln and I discussed a few ideas afterwards about how the SwitchYard
plugin could be even further improved, so we'll follow-up with those ideas
soon.

Nice work to you and your team Keith. Keep up the great work changing the
face of ESB!

Cheers!

-Dan

On Mon, Jul 9, 2012 at 4:21 AM, Keith Babo <kbabo at redhat.com> wrote:

>
> 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.xml
>
>
> This 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 Hello
> switchyard add-reference --referenceName Goodbye --interfaceType java
> --interface org.example.greeting.Goodbye --componentName Goodbye
>
>
> I 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 Greeting
> switchyard add-reference --referenceName Goodbye --interfaceType java
> --interface org.example.greeting.Goodbye --componentName Greeting
>
> The 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:
> https://issues.jboss.org/browse/SWITCHYARD-915
>
> cheers,
> keith
>
>
>
> test
>
> switchyard promote-service --serviceName Greeting
> camel-binding bind-service --serviceName Greeting --configURI
> file:///tmp/input
>
> build
>
> # 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/input
> echo "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!
>
> -Dan
>
> On Fri, Jul 6, 2012 at 6:34 PM, Dan Allen <dan.j.allen at gmail.com> wrote:
>
>> On Fri, Jul 6, 2012 at 5:53 PM, Keith Babo <kbabo at 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 Allen
>> Principal Software Engineer, Red Hat | Author of Seam in Action
>> Registered Linux User #231597
>>
>> http://google.com/profiles/dan.j.allen
>> http://mojavelinux.com
>> http://mojavelinux.com/seaminaction
>>
>>
>
>
> --
> Dan Allen
> Principal Software Engineer, Red Hat | Author of Seam in Action
> Registered Linux User #231597
>
> http://google.com/profiles/dan.j.allen
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
>
>
>


-- 
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://google.com/profiles/dan.j.allen
http://mojavelinux.com
http://mojavelinux.com/seaminaction
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120711/30be34d9/attachment.html 


More information about the forge-dev mailing list