From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- sandbox/ant/performance/README | 10 ++ .../ant/performance/helloworld-ws-java-run/pom.xml | 79 ++++++++++++++++ .../test/java/helloworld/HelloWorldTestCase.java | 46 ++++++++++ sandbox/ant/performance/helloworld-ws-java/pom.xml | 43 +++++++++ .../src/main/java/helloworld/HelloWorldImpl.java | 33 +++++++ .../main/java/helloworld/HelloWorldService.java | 30 ++++++ .../META-INF/sca-deployables/application.composite | 35 +++++++ .../ant/performance/helloworld-ws-js-run/pom.xml | 94 +++++++++++++++++++ .../test/java/helloworld/HelloWorldTestCase.java | 46 ++++++++++ sandbox/ant/performance/helloworld-ws-js/pom.xml | 101 +++++++++++++++++++++ .../META-INF/sca-deployables/application.composite | 44 +++++++++ .../src/main/resources/helloworld.wsdl | 79 ++++++++++++++++ sandbox/ant/performance/helloworld.jmx | 86 ++++++++++++++++++ 13 files changed, 726 insertions(+) create mode 100644 sandbox/ant/performance/README create mode 100644 sandbox/ant/performance/helloworld-ws-java-run/pom.xml create mode 100644 sandbox/ant/performance/helloworld-ws-java-run/src/test/java/helloworld/HelloWorldTestCase.java create mode 100644 sandbox/ant/performance/helloworld-ws-java/pom.xml create mode 100644 sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldService.java create mode 100644 sandbox/ant/performance/helloworld-ws-java/src/main/resources/META-INF/sca-deployables/application.composite create mode 100644 sandbox/ant/performance/helloworld-ws-js-run/pom.xml create mode 100644 sandbox/ant/performance/helloworld-ws-js-run/src/test/java/helloworld/HelloWorldTestCase.java create mode 100644 sandbox/ant/performance/helloworld-ws-js/pom.xml create mode 100644 sandbox/ant/performance/helloworld-ws-js/src/main/resources/META-INF/sca-deployables/application.composite create mode 100644 sandbox/ant/performance/helloworld-ws-js/src/main/resources/helloworld.wsdl create mode 100644 sandbox/ant/performance/helloworld.jmx (limited to 'sandbox/ant/performance') diff --git a/sandbox/ant/performance/README b/sandbox/ant/performance/README new file mode 100644 index 0000000000..1a9b32fa02 --- /dev/null +++ b/sandbox/ant/performance/README @@ -0,0 +1,10 @@ +Initial stab at doing some performance testing of Tuscany WS, Java and script components + +Download Apache JMeter from: http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi + +Unzip JMeter, startup with startup script in jakarta-jmeter-2.3\bin folder. + +Load testplan, from JMeter: File -> Open, navigate to helloworld1.jmx (in the same folder as this README + + + \ No newline at end of file diff --git a/sandbox/ant/performance/helloworld-ws-java-run/pom.xml b/sandbox/ant/performance/helloworld-ws-java-run/pom.xml new file mode 100644 index 0000000000..4dd43cc9a1 --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-java-run/pom.xml @@ -0,0 +1,79 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.1-incubating-SNAPSHOT + + + helloworld-ws-java-run + + + + org.apache.tuscany.sca + helloworld-ws-java + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.1-incubating-SNAPSHOT + test + + + + junit + junit + 4.2 + test + + + + + + ${artifactId} + + + diff --git a/sandbox/ant/performance/helloworld-ws-java-run/src/test/java/helloworld/HelloWorldTestCase.java b/sandbox/ant/performance/helloworld-ws-java-run/src/test/java/helloworld/HelloWorldTestCase.java new file mode 100644 index 0000000000..6fd5b2bc65 --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-java-run/src/test/java/helloworld/HelloWorldTestCase.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +package helloworld; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * This shows how to test the Calculator service component. + */ +public class HelloWorldTestCase extends TestCase { + + private SCADomain scaDomain; + + @Override + protected void setUp() throws Exception { + scaDomain = SCADomain.newInstance("http://foo", "file:///C:/Tuscany/SVN/sandbox-ant/performance/helloworld-ws-java/target/helloworld-ws-java.jar", null); + } + + @Override + protected void tearDown() throws Exception { + scaDomain.close(); + } + + public void testCalculator() throws Exception { + System.out.println("Hit enter to end..."); + System.in.read(); + } +} diff --git a/sandbox/ant/performance/helloworld-ws-java/pom.xml b/sandbox/ant/performance/helloworld-ws-java/pom.xml new file mode 100644 index 0000000000..a1f11ed07e --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-java/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.1-incubating-SNAPSHOT + + + helloworld-ws-java + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.1-incubating-SNAPSHOT + compile + + + + + ${artifactId} + + + diff --git a/sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldImpl.java b/sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..0de3c70303 --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldImpl.java @@ -0,0 +1,33 @@ +/* + * 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. + */ +package helloworld; + +import org.osoa.sca.annotations.Service; + +/** + * This class implements the HelloWorld service. + */ +@Service(HelloWorldService.class) +public class HelloWorldImpl implements HelloWorldService { + + public String getGreetings(String name) { + return "Hello " + name; + } + +} diff --git a/sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldService.java b/sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..268d90e910 --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-java/src/main/java/helloworld/HelloWorldService.java @@ -0,0 +1,30 @@ +/* + * 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. + */ +package helloworld; + +import org.osoa.sca.annotations.Remotable; + +/** + * This is the business interface of the HelloWorld greetings service. + */ +@Remotable +public interface HelloWorldService { + + public String getGreetings(String name); +} diff --git a/sandbox/ant/performance/helloworld-ws-java/src/main/resources/META-INF/sca-deployables/application.composite b/sandbox/ant/performance/helloworld-ws-java/src/main/resources/META-INF/sca-deployables/application.composite new file mode 100644 index 0000000000..00f8135b3d --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-java/src/main/resources/META-INF/sca-deployables/application.composite @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/sandbox/ant/performance/helloworld-ws-js-run/pom.xml b/sandbox/ant/performance/helloworld-ws-js-run/pom.xml new file mode 100644 index 0000000000..235adc5ab3 --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-js-run/pom.xml @@ -0,0 +1,94 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.1-incubating-SNAPSHOT + + + helloworld-ws-js-run + + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-implementation-script + 1.1-incubating-SNAPSHOT + test + + + + org.wso2.wsf.javascript + axiom-e4x + 0.29 + runtime + + + org.apache.ws.commons.axiom + axiom-api + + + org.apache.ws.commons.axiom + axiom-impl + + + rhino + js-core + + + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.1-incubating-SNAPSHOT + test + + + + junit + junit + 4.2 + test + + + + + + ${artifactId} + + + diff --git a/sandbox/ant/performance/helloworld-ws-js-run/src/test/java/helloworld/HelloWorldTestCase.java b/sandbox/ant/performance/helloworld-ws-js-run/src/test/java/helloworld/HelloWorldTestCase.java new file mode 100644 index 0000000000..7eb205e5b8 --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-js-run/src/test/java/helloworld/HelloWorldTestCase.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +package helloworld; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * This shows how to test the Calculator service component. + */ +public class HelloWorldTestCase extends TestCase { + + private SCADomain scaDomain; + + @Override + protected void setUp() throws Exception { + scaDomain = SCADomain.newInstance("http://foo", "file:///C:/Tuscany/SVN/sandbox-ant/performance/helloworld-ws-js/target/helloworld-ws-js.jar", null); + } + + @Override + protected void tearDown() throws Exception { + scaDomain.close(); + } + + public void testCalculator() throws Exception { + System.out.println("Hit enter to end..."); + System.in.read(); + } +} diff --git a/sandbox/ant/performance/helloworld-ws-js/pom.xml b/sandbox/ant/performance/helloworld-ws-js/pom.xml new file mode 100644 index 0000000000..d28dabf17f --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-js/pom.xml @@ -0,0 +1,101 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.1-incubating-SNAPSHOT + + + helloworld-ws-js + + + + apache.incubator + http://people.apache.org/repo/m2-incubating-repository + + + + wso2 + http://dist.wso2.org/maven2/ + + true + + + + + + + org.apache.tuscany.sca + tuscany-host-webapp + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.1-incubating-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-implementation-script + 1.1-incubating-SNAPSHOT + test + + + + rhino + js + 1.6R7 + test + + + + org.wso2.wsf.javascript + axiom-e4x + 0.29 + runtime + + + org.apache.ws.commons.axiom + axiom-api + + + org.apache.ws.commons.axiom + axiom-impl + + + rhino + js-core + + + + + + + + ${artifactId} + + + diff --git a/sandbox/ant/performance/helloworld-ws-js/src/main/resources/META-INF/sca-deployables/application.composite b/sandbox/ant/performance/helloworld-ws-js/src/main/resources/META-INF/sca-deployables/application.composite new file mode 100644 index 0000000000..38e14845f7 --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-js/src/main/resources/META-INF/sca-deployables/application.composite @@ -0,0 +1,44 @@ + + + + + + + + jsHello { xmlIn..*::name.toString() } + + } + + ]]> + + + + + + + + + diff --git a/sandbox/ant/performance/helloworld-ws-js/src/main/resources/helloworld.wsdl b/sandbox/ant/performance/helloworld-ws-js/src/main/resources/helloworld.wsdl new file mode 100644 index 0000000000..0b95fbd14f --- /dev/null +++ b/sandbox/ant/performance/helloworld-ws-js/src/main/resources/helloworld.wsdl @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/ant/performance/helloworld.jmx b/sandbox/ant/performance/helloworld.jmx new file mode 100644 index 0000000000..f5f028caa9 --- /dev/null +++ b/sandbox/ant/performance/helloworld.jmx @@ -0,0 +1,86 @@ + + + + + + false + false + + + + + + + + + false + -1 + + 1 + 1 + 1193655867000 + 1193655867000 + false + continue + + + + + + + + + http://localhost:8080/HelloWorldComponentJS + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> + <soapenv:Header> + <To xmlns="http://www.w3.org/2005/08/addressing"> + <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8089/HelloWorldService</wsa:Address> + </To> + </soapenv:Header> + <soapenv:Body> + <_ns_:getGreetings xmlns:_ns_="http://helloworld"> + <_ns_:name>World</_ns_:name> + </_ns_:getGreetings> + </soapenv:Body> + </soapenv:Envelope> + + + true + + + + false + + + + true + true + true + + true + true + true + true + false + true + true + false + false + true + false + false + false + false + false + 0 + true + + saveConfig + + + + + + + + -- cgit v1.2.3