Chapter 11. Running and embedding Tuscany

 

This chapter covers

  • Understanding basics of the Tuscany runtime environment
  • Running Tuscany in a standalone, web, or distributed environment
  • Embedding Tuscany within a managed application container

Tuscany can be hosted in many different environments. It can be run standalone or invoked programmatically as a library. Tuscany is integrated with web containers such as Tomcat, Jetty, and WebSphere to enable web applications with SCA. Tuscany can also be embedded within other application containers such as Java EE or OSGi-based containers. When running Tuscany standalone, you use the Tuscany launcher to run an SCA application from the command line or within an IDE. In the other cases, the host environment manages the Tuscany runtime and SCA applications.

All of these options give you the flexibility to run your SCA applications in the environment of your choice. You aren’t restricted to a single way of starting the runtime. If you find that you need to embed the runtime to suit your particular needs, then Tuscany provides a set of APIs to allow you to do this.

In this chapter we’ll walk through the various options that Tuscany provides for running SCA applications. Some of the options have been used in previous chapters. You can find various samples in the following locations:

  • launchers/*
  • contributions/creditcard-payment-webapp

Let’s start by looking at the nodes and the SCA domain within which they run.

11.1. Understanding the Tuscany runtime environment

11.2. Running Tuscany standalone

11.3. Running Tuscany using APIs

11.4. Running Tuscany with web applications

11.5. Configuring distributed nodes

11.6. Embedding Tuscany with a managed container

11.7. Summary