On Jul 24, 2006, at 7:31 PM, Ken Tam wrote:
r425257 creates a "web distribution" which can be extracted directly
into Tomcat's "shared" dir or any webapp's WEB-INF. From the commit
mail:
---
Example usage of the web distribution w/ Tomcat:
Extract web-1.0-SNAPSHOT-bin.zip into Tomcat's "shared" directory.
Create a web-app with the following entries in web.xml:
<context-param>
<param-name>applicationScdlPath</param-name>
<param-value>META-INF/sca/default.scdl</param-value>
</context-param>
<listener>
<listener-
class>org.apache.tuscany.core.launcher.ServletLauncherListener</
listener-class>
</listener>
Copy one of the current SCA app sample jars (e.g
sample-calculator-1.0-SNAPSHOT.jar) into WEB-INF/lib
Other webapp code (e.g. a JSP) can now access the SCA app via
CurrentCompositeContext.getContext() etc.
---
The "applicationScdlPath" param is actually only necessary because the
sample jars come with the application SCDL inside. The listener
defaults to reading WEB-INF/default.scdl in the absence of that param,
and I expect that pattern to be more common.
This is probably a good time to bring up the discussion about
integration testing.. for example, something akin to the tomcat
integration testing we had in M1 would be goodness, but that's pretty
expensive to do on each build (plus, IIRC in M1 it was all ant driven
and didn't use maven much).. I haven't done anything here because I
haven't really thought about the problem enough to have any really
interesting ideas..
I'd like to approach this by doing the following:
1. The checkin build should only verify Tuscany "host integration"
APIs, and should do so at a very granular level. In other words, I
would test ServletLauncherListener and mock out the servlet container
(I'm really starting to like EasyMock). We should not need to use a
servlet container (Tomcat, etc.) since we assume at this point the
host environment honors its integration contracts. From a practical
perspective, like Ken mentioned, I also feel it is important to
maintain the speed and ease-of-use of the test-dev cycle. We should
be able to run the entire battery of unit tests efficiently at any
point as we develop (right now on my machine it's around 7 secs for
400+ tests within IntelliJ). What we had in M1 was really
inefficient and problematic in terms of setup.
2. We will need to verify operation on host environments. This can
be done using an integration build that runs periodically somewhere,
but is not done by the developer at checkin. This could test
specifics of the host environment such as classloading, deployment of
SCDL, etc. Smoke tests could also be done at this point running
different JDKs and help catch some of the problems we have been
seeing running on different Java platforms.
On 7/24/06, Scott Kurz <[EMAIL PROTECTED]> wrote:
Is there a current Ant script to copy the right binaries into a
Tomcat
server's common/lib and server/lib? (Or if not could someone paste
an 'ls'
of each of these directories).
I noticed the 'testing' directory which used to have some of this
info is
gone.
It looks like there is no sample currently which uses this
ServletLauncherListener to bootstrap Tuscany, so I'll have to
create one.
Thanks, it will be a big help to save me the trouble of figuring
out each
prereq jar.
Scott Kurz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]