fabric3
Content
Documentation
Getting Started
Starter Applications
Starter Applications
search
attachments
weblink
advanced
image-effects
image-attributes
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
Colour picker
More colours
Formatting
Strikethrough
Subscript
Superscript
Monospace
Clear formatting
Bullet list
Numbered list
Task list
Outdent
Indent
Align left
Align center
Align right
Page layout
Link
Table
Insert
Insert content
Files and images
Link
Symbol
Emoticon
Markup
Horizontal rule
Insert macro
User mention
Jira Issue/Filter
Info
Status
Gallery
Table of Contents
Jira timeline
Lucidchart Diagrams
Trello Board
Other macros
Page layout
No layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Find/Replace
Keyboard shortcuts help
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account.
<p>The starter calculator applications contained in the Getting Started samples (<a href="http://fabric3.org/downloads.html">download</a>) 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:</p><p> </p><p><img class="confluence-embedded-image" loading="lazy" src="https://fabric3.atlassian.net/wiki/download/attachments/524322/Slide1.jpg?version=1&modificationDate=1374511424426&cacheVersion=1&api=v2" data-image-src="https://fabric3.atlassian.net/wiki/download/attachments/524322/Slide1.jpg?version=1&modificationDate=1374511424426&cacheVersion=1&api=v2" data-unresolved-comment-count="0" data-linked-resource-id="1474564" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="Slide1.jpg" data-base-url="https://fabric3.atlassian.net/wiki" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="524322" data-linked-resource-container-version="22" data-media-id="a2e4dda5-3901-47de-bb48-94bd84a4dd91" data-media-type="file" title="fabric3 > Starter Applications > Slide1.jpg" data-location="fabric3 > Starter Applications > Slide1.jpg" data-image-height="405" data-image-width="720"></p><p> </p><p>To build and deploy the calculator applications, do the following:</p><h3><strong>1. Build the sample modules</strong></h3><p>In the directory where you extracted the samples distribution, execute:</p><p><code>mvn clean install</code>.</p><p>Under the <code>/starter</code> project folder, JARs containing the application artifacts will be created in the <code>/target</code> output directories for each sample application module.</p><table class="wysiwyg-macro" data-macro-name="info" data-macro-schema-version="1" style="background-image: url(https://fabric3.atlassian.net/wiki/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm99&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>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:</p><p><code>mvn -o clean install</code></p></td></tr></table><p> </p><p>This will also create a server image for use with the samples in the <code style="line-height: 1.4285715;">server/target/image directory</code>. </p><h3><strong>3. Start the server</strong></h3><p>To launch a Fabric3 server in single-VM mode, execute the following from the <code>server/target/image/bin</code> directory:</p><p><code>java -jar server.jar</code> </p><p>Alternatively, the Fabric3 server can be started from another working directory by executing:</p><p><code>java -jar <path to bin directory>/server.jar </code></p><table class="wysiwyg-macro" data-macro-name="info" data-macro-schema-version="1" style="background-image: url(https://fabric3.atlassian.net/wiki/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm99&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>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.:</p><p><code>java -Xmx1024M -jar server.jar</code></p></td></tr></table><p> </p><h3><strong>4. Deploy the application</strong></h3><p>After the server has booted, deploy a calculator application archive by copying it to the Fabric3 runtime <code>server/target/image/runtimes/vm/deploy</code> 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:</p><ul><li>The web calculator UI can be accessed at <a href="http://localhost:8181/calculator/entry.html">http://localhost:8181/calculator/entry.html</a>.</li><li>The REST calculator resource can be accessed using a GET with the formula to calculate included in the URI as in: <a href="http://localhost:8181/calculator/1+1">http://localhost:8181/calculator/1+1</a>.</li><li>The web services calculator can be accessed at <a href="http://localhost:8181/calculator">http://localhost:8181/calculator</a> and its WSDL from <a href="http://localhost:8181/calculator?wsdl">http://localhost:8181/calculator?wsdl</a>.</li></ul><p>The samples also contain a separate client for the web services calculator. The client module is located at <code>/samples/wscalc-client</code>. The WSCalcClient class can be executed using the Java command line or via an IDE. </p>
Save
Close
Edit
Preview
View changes
Revert to last published version
{"serverDuration": 495, "requestCorrelationId": "7a751cd86e684f499882c61d815462e3"}