Author: kelvingoodson
Date: Wed Mar 31 16:03:35 2010
New Revision: 929603
URL: http://svn.apache.org/viewvc?rev=929603&view=rev
Log:
add tracing capability into distribution and extend calculator sample to
demonstrate tracing
Added:
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-tracing.xml
(with props)
Modified:
tuscany/sca-java-2.x/trunk/distribution/all/pom.xml
tuscany/sca-java-2.x/trunk/distribution/all/src/main/assembly/bin-default.xml
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-modules.xml
tuscany/sca-java-2.x/trunk/features/all/pom.xml
tuscany/sca-java-2.x/trunk/modules/pom.xml
tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/pom.xml
tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml
tuscany/sca-java-2.x/trunk/samples/README
tuscany/sca-java-2.x/trunk/samples/calculator/README
tuscany/sca-java-2.x/trunk/samples/calculator/build.xml
Modified: tuscany/sca-java-2.x/trunk/distribution/all/pom.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/all/pom.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/all/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/distribution/all/pom.xml Wed Mar 31 16:03:35 2010
@@ -62,6 +62,16 @@
<artifactId>tuscany-implementation-web-client</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-tracing-aspectj</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>1.6.2</version>
+ </dependency>
</dependencies>
<profiles>
Modified:
tuscany/sca-java-2.x/trunk/distribution/all/src/main/assembly/bin-default.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/all/src/main/assembly/bin-default.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/distribution/all/src/main/assembly/bin-default.xml
(original)
+++
tuscany/sca-java-2.x/trunk/distribution/all/src/main/assembly/bin-default.xml
Wed Mar 31 16:03:35 2010
@@ -31,5 +31,6 @@
<componentDescriptor>src/main/components/bin-modules.xml</componentDescriptor>
<componentDescriptor>src/main/components/bin-samples.xml</componentDescriptor>
<componentDescriptor>src/main/components/bin-launcher.xml</componentDescriptor>
+
<componentDescriptor>src/main/components/bin-tracing.xml</componentDescriptor>
</componentDescriptors>
</assembly>
Modified:
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-modules.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-modules.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-modules.xml
(original)
+++
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-modules.xml
Wed Mar 31 16:03:35 2010
@@ -26,6 +26,9 @@
<include>modules/**/*</include>
<include>features/**/*</include>
</includes>
+ <excludes>
+ <exclude>org.aspectj:aspectjweaver</exclude>
+ </excludes>
</fileSet>
</fileSets>
Added:
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-tracing.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-tracing.xml?rev=929603&view=auto
==============================================================================
---
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-tracing.xml
(added)
+++
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-tracing.xml
Wed Mar 31 16:03:35 2010
@@ -0,0 +1,41 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<component>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/release/tracing</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>bin</outputDirectory>
+ <unpack>false</unpack>
+ <includes>
+ <include>org.aspectj:aspectjweaver</include>
+ </includes>
+ <outputFileNameMapping>aspectjweaver.jar</outputFileNameMapping>
+ </dependencySet>
+
+ </dependencySets>
+
+</component>
Propchange:
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-tracing.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/sca-java-2.x/trunk/distribution/all/src/main/components/bin-tracing.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: tuscany/sca-java-2.x/trunk/features/all/pom.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/features/all/pom.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/features/all/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/features/all/pom.xml Wed Mar 31 16:03:35 2010
@@ -101,6 +101,12 @@
<version>2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-tracing-aspectj</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
</dependencies>
</project>
Modified: tuscany/sca-java-2.x/trunk/modules/pom.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/pom.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/modules/pom.xml Wed Mar 31 16:03:35 2010
@@ -115,6 +115,7 @@
<module>sca-client-impl</module>
<module>sca-client-javascript</module>
<module>stripes</module>
+ <module>tracing-aspectj</module>
<module>xsd</module>
<module>web-javascript</module>
<module>web-javascript-dojo</module>
Modified: tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/pom.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/pom.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/pom.xml Wed Mar 31
16:03:35 2010
@@ -50,7 +50,7 @@
<build>
<plugins>
<!-- Copy the aspectjweaver jar to avoid surefire problems for
- directorites with space -->
+ directories with space -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Modified:
tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml
(original)
+++
tuscany/sca-java-2.x/trunk/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml
Wed Mar 31 16:03:35 2010
@@ -21,8 +21,8 @@
<aspects>
<!-- Uncomment either of these two aspects to perform standard logging
-->
<!-- or standard tracing on the Tuscany runtime.
-->
- <!-- <aspect name="org.apache.tuscany.sca.aspectj.SimpleTracingAspect"
/> -->
- <!-- <aspect name="org.apache.tuscany.sca.aspectj.LoggingAspect" />
-->
+ <aspect name="org.apache.tuscany.sca.aspectj.SimpleTracingAspect" />
+ <aspect name="org.apache.tuscany.sca.aspectj.LoggingAspect" />
<!-- Following is a concrete-aspect that defines the point cut for
-->
<!-- the TimingAspect. Which ever calls you define in this pointcut
-->
Modified: tuscany/sca-java-2.x/trunk/samples/README
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/README?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/README (original)
+++ tuscany/sca-java-2.x/trunk/samples/README Wed Mar 31 16:03:35 2010
@@ -24,8 +24,9 @@ and the extensions that come packaged wi
binding-ws-calculator - Calculator running inside a web app also
showing webservices binding
-calculator - Calculator built with java components and
- local wires.
+calculator (also traced) - Calculator built with java components and
+ local wires. A second build target shows
how to
+ execute the sample with Tuscany trace
turned on.
calculator-equinox - Calculator running inside a Equinox OSGi
runtime
Modified: tuscany/sca-java-2.x/trunk/samples/calculator/README
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/calculator/README?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/calculator/README (original)
+++ tuscany/sca-java-2.x/trunk/samples/calculator/README Wed Mar 31 16:03:35
2010
@@ -1,6 +1,6 @@
Calculator Sample
=================
-This sample implements a simple calculator using SCA components.
+This sample implements a simple calculator using SCA components. It also
optionally demonstrates tracing Tuscany code.
The README in the samples directory (the directory above this) provides
general instructions about building and running samples. Take a look there
@@ -19,6 +19,18 @@ and on *nix do
java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator.jar
calculator.CalculatorClient
+If you want to see an example of tracing the Tuscany code ... then try the
command
+---------------------------------------------------------
+ant runtraced
+
+or on Windows run the command
+
+java -javaagent:../../bin/aspectjweaver.jar -cp
..\..\features\tuscany-sca-manifest.jar;target\sample-calculator.jar
calculator.CalculatorClient
+
+or on *nix run the command
+
+java -javaagent:../../bin/aspectjweaver.jar -cp
..\..\features\tuscany-sca-manifest.jar:target\sample-calculator.jar
calculator.CalculatorClient
+
Sample Overview
---------------
The sample provides a single calculator service with a default SCA (java)
Modified: tuscany/sca-java-2.x/trunk/samples/calculator/build.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/calculator/build.xml?rev=929603&r1=929602&r2=929603&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/calculator/build.xml (original)
+++ tuscany/sca-java-2.x/trunk/samples/calculator/build.xml Wed Mar 31 16:03:35
2010
@@ -21,6 +21,8 @@
<property name="jar.name" value="sample-calculator.jar" />
<property name="main.class" value="calculator.CalculatorClient" />
+ <property name="aspectjweaver" value="../../bin/aspectjweaver.jar"/>
+ <property name="manifestjar"
value="../../features/tuscany-sca-manifest.jar"/>
<target name="compile" depends="init">
<javac srcdir="src/main/java" destdir="target/classes"
debug="on" source="1.5" target="1.5">
@@ -60,6 +62,19 @@
</java>
</target>
+ <target name="runtraced" depends="compile">
+ <java classname="calculator.CalculatorClient"
+ fork="true"
+ failonerror="true">
+ <classpath>
+ <pathelement location="${manifestjar}"></pathelement>
+ <pathelement location="target/${jar.name}"></pathelement>
+ </classpath>
+ <jvmarg value="-javaagent:${aspectjweaver}"/>
+ <arg value="unmanaged"/>
+ <arg value="target/${jar.name}"/>
+ </java>
+ </target>
</project>