JBoss Community Archive (Read Only)


Getting Started

First Steps with SwitchYard

The purpose of this guide is to help new users get up and running with SwitchYard as quickly as possible.  We will pursue this objective with ruthless efficiency.  If you have questions that begin with "why" or "how", check out the other docs in the set.  If you have no time for any of that nonsense, then read on.


If you want to get down with SwitchYard, you'll need some Maven and Java to get the job done.

  • Java 8

  • Maven 3

  • Ant 1.8 (for installation)

Install EAP

SwitchYard is installed on top of an existing EAP installation, so the first step is to install EAP 6.4.  Visit the EAP Downloads page to download and install EAP 6.4 GA.

Install SwitchYard

Go to the SwitchYard Downloads page and download "switchyard-installer.zip" under Current Release.  Once downloaded, extract the zip and execute the ant script.  Assuming you installed EAP in /tmp, it would look something like this:

cd switchyard-installer-2.1

You will be asked for the location of your EAP server.   Enter the location at the prompts and let the installer complete.

[input] Enter the path to the root of your JBoss EAP installation: 

Start the Server

In the bin/ directory of your EAP installation, you'll find a script called standalone.sh (*nix) and another called standalone.bat (Windows).  Execute the appropriate script for your platform.


The server will start in anywhere from 1 - 3 seconds depending on the age and price of your computing device.   You know SwitchYard is ready to rock once you see this:

18:50:36,727 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.9.GA (AS 7.5.9.Final-redhat-2) started in 1310ms - Started 182 of 220 services (53 services are passive or on-demand)

Deploy an Application

There are many applications to chose from in the quickstarts/ directory of your distribution.  A nice one to start with is the remote-invoker application.  There are a number of ways to deploy an application to the SwitchYard runtime, but we'll go with Maven as it's righteous.  You will need a separate terminal or command window from the one where you started the server.

cd quickstarts/camel-service
mvn install -Pdeploy

You will see output similar to the following after a successful deployment.

[INFO] --- maven-bundle-plugin:2.4.0:install (default-install) @ switchyard-camel-service ---
[INFO] Installing org/switchyard/quickstarts/switchyard-camel-service/2.1.0.Final/switchyard-camel-service-2.1.0.Final.jar
[INFO] Writing OBR metadata
[INFO] --- wildfly-maven-plugin:1.0.2.Final:deploy-only (deploy) @ switchyard-camel-service ---
Aug 19, 2016 2:58:17 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.2.2.Final
Aug 19, 2016 2:58:17 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.2.2.Final
Aug 19, 2016 2:58:18 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.3.Final
[INFO] --------------------------------------------------------------------------
[INFO] --------------------------------------------------------------------------

Invoke the Application

You can send a message to the deployed remote-invoker application using Maven as well.

mvn exec:java

After running the command, you'll see this in the command output:

14:59:05,353 INFO  [route2] (http- Inside XML Camel Route
14:59:05,408 INFO  [route2] (http- [ognl message] 'sally: I like cheese'
14:59:05,522 INFO  [route2] (http- Inside XML Camel Route
14:59:05,567 INFO  [route2] (http- [mvel message] 'sally: And milk too'
14:59:05,650 INFO  [route2] (http- Inside XML Camel Route
14:59:05,651 INFO  [route2] (http- [message] 'sally: Actually, any kind of dairy is OK in my book'

You will see some output in the server console as well:

19:41:08,114 INFO [stdout] (http-- Approving credit for John Smith


If you've made it this far, you're OK in my book.  Each quickstart has a Readme.md file which provides step-by-step instructions for deploying and testing.  Give some of the other apps a try and see what this crazy project can do.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 09:43:02 UTC, last content change 2016-08-19 18:59:32 UTC.