<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page import="org.apache.tuscany.sca.war.Installer" %> <% Installer installer = (Installer) request.getAttribute("installer"); %>

Apache Tuscany Tomcat Integration

The Tuscany Tomcat integration turns Tomcat into an SCA enabled runtime so it can run SCA contributions and SCA-enabled Web Applications.

Status: Tuscany is <% if (Installer.isTuscanyHookRunning()) { %> installed and active <% } else if (Installer.isRestartRequired()) {%> installed but Tomcat needs to be restarted <% } else {%> not installed <% }%> in Tomcat.

<% if (!Installer.isTuscanyHookRunning() && !Installer.isRestartRequired()) { %> Install Tuscany
To install Tuscany into Tomcat, click:


<% } else {%> Uninstall Tuscany
If remove Tuscany from Tomcat, click:

<% }%>


<% if (installer != null) { %> <%= installer.getStatus() %> <% }%>

What does this do?

This Tuscany install makes two updates to Tomcat: Those changes cause the Tuscany listener to be called at Tomcat startup and that locates all the Host defiinitions and patches them to use the TuscanyStandardContext. This enables support for deploying SCA enabled webapps and plain SCA jar, zip, or folder contributions to the Host in the same way that .war files are deployed.

The SCA domain used for running the contributions defaults to "vm:default". This can be configured by using an initilization parameter, most easiliy by defining that parameter in a context.xml file. The Tomcat file conf/context.xml file defines the global defaults so that can be used for setting the deafult domain for all SCA contributions. Individual contributions can also use their own context.xml files to override that default. See the Tomcat doc for more information on using context.xml files.

An example of setting the domain as a context.xml parameter:
<Context>
. . .
<Parameter name="org.apache.tuscany.sca.defaultDomainURI" value="tribes:myDomain"/>
. . .
</Context>

For more information visit the Tuscany website page on Tomcat Integration.

Note also that this is work in progress so is liable to change as Tuscany 2.0 is developed. Feedback is welcome and appreciated so if you've any comments or requests on this Tomcat integration please email dev@tuscany.apache.org.