Skip navigation

SwitchYard

4 Posts authored by: Rob Cernich

The SwitchYard team has been working like busy little elves this holiday season: filing edges, knocking off corners, sanding, painting and polishing SwitchYard into beta form.  They've got all the features in place and have squashed many bugs along the way.  With that, I'm pleased to announce SwitchYard 2.0, Beta1.  We're hoping to get a final release out in January, so please kick the tires, take it for a test drive and let us know what you think.

What is SwitchYard?

SwitchYard is a structured framework for developing integration applications using the design principles and best practices of Service Oriented Architecture.  It integrates really well with Apache Camel and JBoss Application Server, Karaf and Fuse, providing a runtime based on the best open source integration and application server options out there.  A slightly longer description can be found here.

 

What's in Beta1?

We've got the rules and BPM components working on WildFly (woo hoo!) now using Drools/jBPM v6.2 beta3.  We've upgraded to Camel v2.14 and we've moved to Karaf 2.4 (for the OSGi stuff).  The quickstarts have been improved to make them easier to test on the various platforms we support (e.g. -Pwildfly or -Pkaraf).  The debugger has stabilized and now works well on Eclipse Luna (JBDS 8).  And, as mentioned above, we've squashed a lot of bugs: Beta1 JIRA

 

Where Do I Get This Goodness?

The SwitchYard Downloads page has all the SwitchYard bits and pieces.  The Eclipse tooling, along with installation instructions can be found at this update site, http://download.jboss.org/jbosstools/updates/development/kepler/integration-stack/switchyard/2.0.0.Beta1/.  There's also a Docker image which can be found at http://www.jboss.org/docker/.

 

To get up to speed quickly, I highly recommend following the Installation Guide to install the runtime.  The guides are short, moderately useful, and 69.23% free of spelling and grammatical errors.

How Do I Learn More?

 

What's next?

The SwitchYard team is going to take a little break to enjoy the holidays, but is intent on releasing 2.0 sometime in January.  After the holidays, we're looking to spruce up the documentation and address any issues found in beta.

 

Happy Holidays from the SwitchYard team!

The SwitchYard team has been making steady progress on the 2.0 release and I'm pleased to announce the latest preview of SwitchYard 2.0, Alpha3.  We're rapidly approaching beta quality and the only think keeping this release from being called a beta is the lack of support for BPM and rules components on WildFly.  Overall, the team has made great progress improving stability, especially on Fuse/Karaf.  Please take it for a test drive and let us know what you think.

 

What is SwitchYard?

SwitchYard is a structured framework for developing integration applications using the design principles and best practices of Service Oriented Architecture.  It integrates really well with Apache Camel and JBoss Application Server, providing a runtime based on the best open source integration and application server options out there.  A slightly longer description can be found here.

 

What's in 2.0 Alpha3?

The biggest changes coming in 2.0 are support for other runtime containers, specifically WildFly, Karaf and Fuse.  In addition to getting SwitchYard running inside these new containers, we've added support for a few more Camel modules, added some debugger support to the tools, and fixed a number of bugs.  Here are the highlights:

  • SwitchYard is now compatible with WildFly 8, however BPM and Rules components are not yet available.
  • SwitchYard is now compatible with Karaf 2.3, please see SwitchYard on Karaf for details on what's working and what you need to do to get what's working working.
  • Debugger support is now available in the tools.  The debugger allows you to set breakpoints on services and references and allows you to configure when those breakpoints should be enabled (e.g. when the exchange is initiated, before the provider is invoked, outbound transform, etc.).
  • New components:
    • SAP
    • ATOM/RSS
    • Bindy
    • HL7
    • Dozer
    • MQTT
  • Better stability when running on Fuse (use features url: mvn:org.switchyard.karaf/switchyard/2.0.0-SNAPSHOT/xml/core-features)

A list of all the issues that went into 2.0 alpha1 can be found in JIRA.

A list of all the issues that went into 2.0 alpha2 can be found in JIRA.

A list of all the issues that went into 2.0 alpha3 can be found in JIRA.

 

Where Do I Get This Goodness?

The SwitchYard Downloads page has all the SwitchYard bits and pieces.  The tooling, along with installation instructions can be found at this update site, http://download.jboss.org/jbosstools/updates/development/kepler/integration-stack/switchyard/2.0.0.Alpha3/.  I highly recommend following the Installation Guide to install the runtime.  The guides are short, moderately useful, and 69% free of spelling and grammatical errors.

How Do I Learn More?

It's been a while since we've seen anything from SwitchYard Land, but I'm pleased to announce the first preview of SwitchYard 2.0.  The community has been pretty busy this spring, cleaning, pulling weeds, and also adding some major features.  That said, this is an alpha release and there might be a few rough edges, new features that aren't yet complete, documentation that's a little out of date, maybe one or two bugs, but, overall, it's in good enough shape to take for a test drive.  Take it for a ride around the block and let us know what you think.

 

What is SwitchYard?

SwitchYard is a structured framework for developing integration applications using the design principles and best practices of Service Oriented Architecture.  It integrates really well with Apache Camel and JBoss Application Server, providing a runtime based on the best open source integration and application server options out there.  A slightly longer description can be found here.

 

What's in 2.0 Alpha2?

The biggest changes coming in 2.0 are support for other runtime containers, specifically WildFly, Karaf and Fuse.  In addition to getting SwitchYard running inside these new containers, we've added support for a few more Camel modules, added some debugger support to the tools, and fixed a number of bugs.  Here are the highlights:

  • SwitchYard is now compatible with WildFly 8, however BPM and Rules components are not yet available, nor is the console.
  • SwitchYard is now compatible with Karaf 2.3, please see SwitchYard on Karaf for details on what's working and what you need to do to get what's working working.
  • Debugger support is now available in the tools.  The debugger allows you to set breakpoints on services and references and allows you to configure when those breakpoints should be enabled (e.g. when the exchange is initiated, before the provider is invoked, outbound transform, etc.).
  • New components:
    • SAP
    • ATOM/RSS
    • Bindy
    • HL7
    • Dozer
    • MQTT
  • Better stability when running on Fuse (use features url: mvn:org.switchyard.karaf/switchyard/2.0.0-SNAPSHOT/xml/core-features)

A list of all the issues that went into 2.0 alpha1 can be found in JIRA.

A list of all the issues that went into 2.0 alpha2 can be found in JIRA.

 

 

Where Do I Get This Goodness?

The SwitchYard Downloads page has all the SwitchYard bits and pieces.  The tooling can be found at this update site, http://download.jboss.org/jbosstools/updates/development/kepler/integration-stack/switchyard/2.0.0.Alpha2/.  I highly recommend following the Installation Guide to install the runtime and tooling.  The guides are short, moderately useful, and 69% free of spelling and grammatical errors.

How Do I Learn More?

As Keith mentioned in his postSwitchYard Plugin for Eclipse, we have some initial Eclipse based tooling for SwitchYard (prototype may be a better word as the tooling is likely to evolve rapidly in the next few months).

Prerequisites

The tooling may be installed atop any standard Eclipse IDE for JEE distribution version 3.6 or later.  You may use another type of distribution, but you will need to figure out which features need to be installed; at a minumum you will need XML tools and JEE project facets.

 

In addition to the basic Eclipse platform, you will also need to install m2eclipse version 1.0 or later.  (Note, for those of you using an older version of m2eclipse, this version is more tightly integrated and may require you to install additional Eclipse plugins to support specific Maven plugin executions.  If you're not already using m2eclipse 1.0, you may want to use a separate Eclipse install until you are sure the latest version supports all the Maven plugins you are using.)  If an update site for m2eclipse is not already configured in your Eclipse install, here's the URL: http://download.eclipse.org/technology/m2e/releases/

Installation

Keith did a great job describing the installation steps, so I won't rehash them here.

** The SwitchYard tooling is now available from the JBoss SOA Tools update site: http://download.jboss.org/jbosstools/updates/nightly/soa-tooling/trunk/

Features

This initial version of the tooling provides the following features:

  • Creation of SwitchYard projects.
  • Creation of SwitchYard bean service classes.
  • Creation of SwitchYard service unit test classes.
  • XML catalog entries for all SwitchYard project schema.
  • m2eclipse support for the SwitchYard Maven plugin.
  • Support for workspace deployment of SwitchYard projects.

New Wizards

All SwitchYard wizards are accessible from the SwitchYard category in the standard Eclipse new wizard:

new_wizards.gif

New SwitchYard Project Wizard

The new project wizard creates a new maven project in your workspace whose pom contains the basic SwitchYard dependencies and build configuration.  To create a new SwitchYard project, select SwitchYard Project.

 

The first screen is a basic new project screen, allowing you to specify the name and location of the new project:

wizard_project_1.gif

 

The second page allows you to specify some basic project details, including the SwitchYard runtime version:

wizard_project_2.gif

Press Finish and you'll have a new project ready for you to create some services.

 

New Bean Service Wizard

This wizard creates a new Java class with SwitchYard annotations that mark it as a bean service.  In addition to creating the class, the pom may be updated to ensure the necessary dependencies are included in the project definition and to ensure that the SwitchYard Maven plugin is configured to scan for bean services.

 

Before opening the wizard, you should create a Java interface on which your service will be based.  For best results, open the new wizard by right-clicking the interface file. selecting New, Other..., then select Bean Service under the SwitchYard category.  The first page looks similar to the standard new class wizard.  The main differences are the Service Interface field, which allows you to specify the interface on which the implementation will be based, and the Create test class option, which allows you to create a service test class, in addition to the implementation class.  Here's a screenshot:

wizard_bean_1.gif

Press Finish and you should have a new Java class with a @Service annotation ready for coding.  If you selected Create test class, you will also have a unit test ready to be implemented as well.

 

New Service Test Wizard

This wizard creates a new service test class.  The class is created from Java interface used to define a service interface.  The class that is created contains stub methods for each operation in the interface.  The method stubs include code for passing a message to the operation and processing the result.  You only need to initialize the message data and validate the results.  The following illustrates the stubs that are created by the wizard:

 

@RunWith(SwitchYardRunner.class)
@SwitchYardTestCaseConfig(mixins = CDIMixIn.class, config = SwitchYardTestCaseConfig.SWITCHYARD_XML)
public class ExampleServiceTest {

    @ServiceOperation("ExampleService")
    private Invoker service;

    @Test
    public void testSomeInOnlyOperation() throws Exception {
        // TODO Auto-generated method stub
        // initialize your test message
        Object message = null;
        service.operation("someInOnlyOperation").sendInOnly(message);

        // validate the results
        Assert.assertTrue("Implement me", false);
    }

    @Test
    public void testSomeInOutOperation() throws Exception {
        // TODO Auto-generated method stub
        // initialize your test message
        Object message = null;
        String result = service.operation("someInOutOperation")
                .sendInOut(message).getContent(String.class);

        // validate the results
        Assert.assertTrue("Implement me", false);
    }

}

 

As with the new bean service wizard, best results are obtained by opening the wizard via a right-click on the interface file.  The wizard is a slimmed down version of the standard new class wizard, which only allows you to specify the service interface which you are testing.  Here's a screenshot:

wizard_test_1.gif

 

The Browse... button will allow you to browse all Java interfaces used by any SwitchYard services within the project.  Here's a screenshot:

wizard_test_browse.gif

Press Finish on the wizard and you've got a unit test ready to be implemented.  Just initialize the test messages and add some validation and you're off!

XSD Catalog

The tooling provides an XML catalog for resolving all namespaces declared within SwitchYard.  For best results, uncheck Honour all XML schema locations in the XML file validation preferences.  If you're seeing bizarre XML validation errors, you probably haven't unchecked this option.  Here's a screenshot to help:

xml_preferences.gif

m2eclipse Support

The tools provide support for using the SwitchYard Maven plugin within Eclipse.  The SwitchYard plugin will be invoked during an Eclipse build and supports auto/incremental builds.  (Note, incremental builds may produce a switchyard.xml file that contains phantom elements.  If you remove or rename services, i.e. @Service, you should run a clean build for best results.)

Workspace Deployment

The tools provide very crude support for workspace deployments.  SwitchYard projects created through the new wizard are created as faceted projects, configured as Utility Modules.  This will allow you to mark the project for deployment to a JEE server.  That said, it's up to you to ensure the server configured to deploy and run SwitchYard applications.  At some point, we will have proper integration with the Eclipse Servers, allowing deployment only to servers supporting SwitchYard deployments.

Gotchas

Here's a list of issues you should be aware of:

  • If you do not have the JBoss Maven repository configured in your workspace, you may not get a list of SwitchYard runtime versions in the new project wizard.  The tools now configure a custom repository pointing to JBoss public.  This will not alter the behavior of project poms, but will allow the JBoss repository to be scanned by tooling components.
  • The generated switchyard.xml file may contain phantom elements. Perform a clean build, Project, Clean..., to completely regenerate the fiile.  (See m2eclipse Support above.) This has been fixed as part of
  • Make sure you disable Honour all XML schema locations in the XML validation preferences.  (See XSD Catalog above.)
  • There is currently an NPE in the new bean service wizard.  The workaround is to make sure Create test class is checked in the wizard (luckily, that's the default).  Hopefully, this is fixed by the time you read this.  This has been addressed.http://https://issues.jboss.org/browse/SWITCHYARD-471
  • There is a bug in the new Service Test wizard that prevents its use when installed atop Eclipse 3.6.  Make sure you uncheck "Create test class" in the new Bean Service wizard until this is fixed.  (This is not an issue when using Eclipse 3.7.)  https://issues.jboss.org/browse/SWITCHYARD-593

As with anything, if you find a bug or have a feature request, please file a JIRA: https://issues.jboss.org/browse/SWITCHYARD