Versions Compared

Key

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

...

Apache Tuscany provides a java implementation of the emerging SCA specifications for SOA. Apache Geronimo is a fully certified Java EE 5 application server runtime. The capability ability to deploy and run SCA composite applications with Geronimo will be bring great addition value to both projects and communities. In this whitepaper, we will describe a simple web application based integration between Tuscany and Geronimo and walk through how to develop a web application using Apache Tuscany and deploy it to Apache Geronimo.

The required tuscany jars and dependencies are packaged under the WEB-INF/lib folder in the WAR. The geronimo-

Package the Tuscany application as a WAR with all the application jars/classes and Tuscany jars (including the dependencies) in the WEB-INF/lib folder. Configure the deployment plan to enable "inverse-classloading" so that the Tuscany jars and dependencies are loaded first by the web app classloader.

Packaging

WAR Packaging Scheme

In this scheme, we simply package the application artifcts together with the required tuscany jars and dependencies into standard web application archive (WAR). The WAR can be deployed to the most popular web containers such as Geronimo, Tomcat, Jetty and WebSphere. Some container-specific deployment descriptor files may be added.

As illustrated in Figure 1, there are a few important files or folders in the WAR:

META-INF/sca-contribution.xml: Defines the deployable composites for a given contribution
WEB-INF/web.xml: Configures the web application with a tuscany servlet filter
WEB-INF/geronimo-web.xml: Configures the web application to provide geronimo-specific deployment options
WEB-INF/lib: Contains all the required tuscany jars and their dependenciessrc/main/webapp
... META-INF/
... WEB-INF/

Image Modified

web.xml

Code Block
2xml
titleSample WEB-INF/web.xml
borderStylesolid
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

  <display-name>Apache Tuscany Calculator Web Service Sample</display-name>
    <filter>
        <filter-name>tuscany</filter-name>
        <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>tuscany</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

</web-app>

...