Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The starter calculator applications contained in the Getting Started samples (download) are the recommended way to get familiar with Fabric3. The starter applications are three different variations on a calculator service: the first is exposed as a Web application, the second as a JAX-RS resource and the third as a WS-* Web Service. The calculator service itself is composed of a main component wired to four services that perform basic arithmetic operations:

...

Info

Note internet access is required the first time the project is built so Maven can download the required project dependencies. Remote access can be turned off for subsequent builds by executing:

mvn -o clean install

2. Build the Fabric3 server distribution

Download the Fabric3 runtime by executing the Maven build script from the servers/vm directory:

mvn -o clean install.




This will  

This will also create a server image for use with the samples in the server/target/image directory. Note the server is configured to run as a single instance. The /servers/cluster directory contains modules which will configure a multi-cluster Fabric3 installation. The starter applications can be deployed to either topology. 

3. Start the server

To launch a Fabric3 server in single-VM mode, execute the following from the servers/vmserver/target/image/bin directory:

...

It may be necessary to configure some JVMs (e.g. OS X) to use IPv4 over IPv6 when starting the clustered runtimes. To do so, use the standard JVM command line parameters, e.g.:

java -Djava.net.preferIPv4Stack=true -jar server.jar
Info

It may be necessary to run Fabric3 with larger heap settings than the JVM defaults. To do so, use the standard JVM command line parameters, e.g.:

java -Xmx1024M -XX:MaxPermSize=1024M -jar server.jar

Info

 

4. Deploy the application

After the server has booted, deploy a calculator application archive by copying it to the Fabric3 runtime server/target/image/runtimes/vm/deploy directory. The runtime will write a message to the console after the archive has been deployed. Depending on the application deployed, one of the following endpoints will be available:

...

The samples also contain a separate client for the web services calculator. The client module is located at /samples/wscalc-client. The WSCalcClient class can be executed using the Java command line or via an IDE. To run the WSCalcClient via the commandline change to the /samples/wscalc-client folder and type:mvn exec:java