Fork me on GitHub

Examples

The Soabase examples show some of the features of the various bundles and utilities.

Building the examples

The Soabase examples are built using Apache Maven. Download the example POM into a new directory and then build it. When building, you must pass the version of Soabase as a command line argument.

mkdir soabase
cd soabase
wget https://raw.githubusercontent.com/soabase/soabase/master/soabase-example/src/main/resources/pom.xml
mvn -Dsoabase-version=VERSION clean package

(replace VERSION with the current Soabase version)

The Code

The code for the examples is in the soabase-example module:

  • ExampleAppBase.java

    Used by both the Hello and Goodbye apps to initialize Soabase.

  • ExampleConfiguration.java

    Contains the Soabase configuration fields.

  • io.soabase.example.hello

    The code for the Hello app.

  • io.soabase.example.goodbye

    The code for the Goodbye app.

  • io.soabase.example.admin

    Example Administration Console customizations.

  • MockDatabase.java

    Implements a simple in-memory database. Used to store dynamic attributes for the examples.

  • MockZooKeeper.java

    A temporary ZooKeeper server. Used for Service Discovery for the examples.

    NOTE: To avoid confusing output all the example apps suppress console logging. However, if you want to see the output add -Ddebug=true to the command line.