Return-Path: Delivered-To: apmail-ws-general-archive@www.apache.org Received: (qmail 72440 invoked from network); 1 Mar 2006 22:59:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Mar 2006 22:59:13 -0000 Received: (qmail 66638 invoked by uid 500); 1 Mar 2006 22:59:35 -0000 Delivered-To: apmail-ws-general-archive@ws.apache.org Received: (qmail 66250 invoked by uid 500); 1 Mar 2006 22:59:32 -0000 Mailing-List: contact general-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: general@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list general@ws.apache.org Received: (qmail 66227 invoked by uid 99); 1 Mar 2006 22:59:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2006 14:59:31 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id B63B3DE for ; Wed, 1 Mar 2006 23:59:05 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: general@ws.apache.org Date: Wed, 01 Mar 2006 22:59:05 -0000 Message-ID: <20060301225905.21476.96088@ajax.apache.org> Subject: [Ws Wiki] Update of "Tuscany/TomcatIntegration" by JeremyBoynes X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification. The following page has been changed by JeremyBoynes: http://wiki.apache.org/ws/Tuscany/TomcatIntegration New page: Tuscany can be integrated into Apache Tomcat to provide transparent configuration of SCA Module Components contributed by web applications. The Tomcat installation can be configured once and from then on web applications will be able to use SCA facilities simply by including a sca.module file on the application classpath (in a JAR in WEB-INF/lib or in WEB-INF/classes). = Initial Configuration = The Tuscany integration has been tested with the Apache Tomcat 5.5.15 release. == Common Libraries == The JAR files containing API classes used by applications must be copied to `${catalina.base}/common/lib` Due to limitations in the current SDO implementation, some Eclipse EMF classes it requires must also be copied to that location. Copy the following files to `${catalina.base}/common/lib` {{{ sca-api-SNAPSHOT.jar sdo-api-SNAPSHOT.jar tuscany-sdo-impl-SNAPSHOT.jar common-2.2.0-I200602160000.jar ecore-2.2.0-I200602160000.jar ecore-change-2.2.0-I200602160000.jar ecore-xmi-2.2.0-I200602160000.jar xsd-2.2.0-I200602160000.jar }}} == Server Libraries == The JAR files containing the Tuscany SCA runtime can be placed in Tomcat's implementation directory `${catalina.base}/server/lib` Copy the following files to `${catalina.base}/server/lib` {{{ tuscany-common-SNAPSHOT.jar tuscany-container-java-SNAPSHOT.jar tuscany-core-SNAPSHOT.jar tuscany-model-SNAPSHOT.jar tuscany-tomcat-SNAPSHOT.jar wsdl-1.0.0.jar wsdl4j-1.5.1.jar }}} == Server Configuration == The Tuscany runtime is integrated by using a special Tomcat Host that has been extended to look for SCA configuration information in its child Contexts. If such information is found, a Module Component is defined based on that configuration and a Valve is inserted into the processing pipeline to set up the SCA Module Context for each request. This is enabled by editing `${catalina.base}/conf/server.xml` to override the default Host implementation. Look for the element for the virtual host on which you want to enable SCA and add a `className="org.apache.tuscany.tomcat.TuscanyHost"` attribute. {{{ ... ... }}} = Application Programming = Application code that wishes to use SCA services can access the module context in the normal way using the !CurrentModuleContext API {{{ ModuleContext ctx = CurrentModuleContext.getContext(); MyService service = (MyService) ctx.locateService("serviceName"); service.doStuff(...); }}}