Fuse ESB comes with a range of examples that demonstrates product's the key functionality.
These examples are stored in the
folder.
Instructions for running and building each example are contained in the
InstallDir
/examplesreadme
file at the root of each example folder.
To run the examples you will need to do the following:
Make sure that you have Apache Maven 2.2.1 or later installed.
You can download Maven from http://maven.apache.org/.
Ensure that the
M2_HOME
environment variable is set to your Maven installation directory.Increase the amount of memory available to Maven by setting the
MAVEN_OPTIONS
environment variable as follows:UNIX
export MAVEN_OPTS=-Xmx768m
Windows
set MAVEN_OPTS=-Xmx768m
Start an instance of the Fuse ESB.
To build all the examples in the examples
folder:
In a command prompt or terminal, change to the
directory.InstallDir
/examplesType
mvn install
Once you have built an example, you can deploy it by copying the JAR file generated in
the example's target
directory to the
folder.InsallDir
/deploy
Several of the examples make use of the Fuse ESB features facility. A feature is a named, versioned collection of OSGi bundles that work together to provide some functionality.
Fuse ESB includes a number of features that make the running of the examples quick and easy. Each feature enables you to use a single command to install the example bundle and any bundles that the example depends on.
To view a list of the features that are used by the examples, enter the following command in the Fuse ESB console:
features:list | grep examples
A list of examples features is returned:
[uninstalled] [4.1.0-psc-01-00 ] examples-cxf-osgi repo-0
[uninstalled] [4.1.0-psc-01-00 ] examples-cxf-jaxrs repo-0
[uninstalled] [4.1.0-psc-01-00 ] examples-cxf-nmr repo-0
[uninstalled] [4.1.0-psc-01-00 ] examples-camel-osgi repo-0
[uninstalled] [4.1.0-psc-01-00 ] examples-camel-nmr repo-0
[uninstalled] [4.1.0-psc-01-00 ] examples-cxf-camel-nmr repo-0
[uninstalled] [4.1.0-psc-01-00 ] examples-cxf-ws-addressing repo-0
[uninstalled] [4.1.0-psc-01-00 ] examples-cxf-wsdl-first-osgi-package repo-0
[uninstalled] [1.1.0-psc-01-00 ] examples-nmr repo-0
To install an examples feature, use the features:install command, as shown:
features:install examples-cxf-osgi