See my comments inline.
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Tuesday, May 26, 2009 6:56 AM
To: <[email protected]>
Subject: Re: Tuscany Tomcat integration
[[snip]]
The tuscany.war includes the Tuscany runtime inside the webapp but in
separate folders (tomcat-lib and tuscan-lib) and clicking the install
button updates the tomcat conf/server.xml file to add those folders to
the tomcat system classpath and adds a tuscany lifecycle listener to
the tomcat runtime. Then when webapps are being started Tuscany
intercepts the start and looks for the presence of a web.composite or
sca-contribution.xml in the webapp and if so dynamically adds the
tuscany runtime jars to the webapp classpath and adds the Tuscany
listener and filter to the webapp.
Using a webapp to install/uninstall sounds interesting.
If the jars are added to the system classpath, why do we have to update the
webapp classpath? Are the Tuscany classes shared by all of the webapps or
each webapp has their own copy (separate classloader)?
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
The result of that is just the same as if the webapp had included the
tuscany jars within its web-inf/lib and had the Tuscany listener and
filter defined in its web.xml. So right now that means a sinlge
standalone Node is started for each webapp just the same as with the
existing Tuscany webapp support.
With the recent enhancement that multiple nodes can be started in the same
JVM, we can install the Tuscany jars into the Tomcat common lib so that the
runtime can be shared by the webapps.
With that in place we could now start to change the way this works and
how the Nodes are used. For example, the tuscany webapp could include
both 1.x and 2.x runtimes and configure webapps to use either
depending on the namespace of the sca-contributions.xml file. We could
add some sca domain configuration to Tomcat so webapps get associated
with a domain and have the Node configured to be part of that domain,
and use the endpoint facilities to do cross webapp wiring of sca
services and references.
...ant