re-org the modules

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@742040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
slaws 2009-02-08 10:34:50 +00:00
parent a1000cfafe
commit eb06796859
95 changed files with 202 additions and 160 deletions

View file

@ -26,7 +26,7 @@
<!--relativePath>../../pom.xml</relativePath-->
</parent>
<artifactId>scatours-chapter-01</artifactId>
<name>Apache Tuscany SCA Tours Chapter 01</name>
<name>Apache Tuscany SCA Tours Chapter 01 Examples</name>
<dependencies>
<dependency>

View file

@ -17,7 +17,7 @@
* under the License.
-->
<project name="scatours-node" default="compile">
<project name="scatours-chapter-05-node" default="compile">
<target name="compile">
<mkdir dir="target/classes"/>
@ -31,7 +31,7 @@
<copy todir="target/classes">
<fileset dir="." excludes="**/*.java, pom.xml, build.xml, target"/>
</copy>
<jar destfile="target/scatours-node.jar" basedir="target/classes">
<jar destfile="target/scatours-chapter-05-node.jar" basedir="target/classes">
<manifest>
<attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/>
</manifest>
@ -43,7 +43,7 @@
<target name="run">
<java classname="launch.LaunchTutorialAdmin" fork="true">
<classpath>
<pathelement location="target/scatours-node.jar"/>
<pathelement location="target/scatours-chapter-05-node.jar"/>
<fileset refid="tuscany.jars"/>
<fileset refid="3rdparty.jars"/>
</classpath>

View file

@ -25,8 +25,8 @@
<version>1.5-SNAPSHOT</version>
<!--relativePath>../../pom.xml</relativePath-->
</parent>
<artifactId>scatours-node</artifactId>
<name>Apache Tuscany SCA Tours Node</name>
<artifactId>scatours-chapter-05-node</artifactId>
<name>Apache Tuscany SCA Tours Chapter 05 Node</name>
<dependencies>
<dependency>

View file

@ -0,0 +1,66 @@
/*
* 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 scatours;
import java.io.IOException;
import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
import org.apache.tuscany.sca.node.launcher.NodeLauncher;
public class LaunchNode {
public static void main(String[] args) throws Exception {
LaunchNode.launchFromFileSystemDir();
}
// OK for development but you must launch the node from this module
public static void launchFromFileSystemDir(){
SCANode node = null;
try {
node = SCANodeFactory.newInstance().createSCANode("scatours.composite",
new SCAContribution("common", "../../shared-contributions/common-contribution/target/classes"),
new SCAContribution("currency", "../../shared-contributions/currency-contribution/target/classes"),
new SCAContribution("hotel", "../../shared-contributions/hotel-contribution/target/classes"),
new SCAContribution("flight", "../../shared-contributions/flight-contribution/target/classes"),
new SCAContribution("car", "../../shared-contributions/car-contribution/target/classes"),
new SCAContribution("trip", "../../shared-contributions/trip-contribution/target/classes"),
new SCAContribution("tripbooking", "../../shared-contributions/tripbooking-contribution/target/classes"),
new SCAContribution("travelcatalog", "../../shared-contributions/travelcatalog-contribution/target/classes"),
new SCAContribution("payment", "../../shared-contributions/payment-contribution/target/classes"),
new SCAContribution("emailgateway", "../../shared-contributions/emailgateway-contribution/target/classes"),
new SCAContribution("shoppingcart", "../../shared-contributions/shoppingcart-contribution/target/classes"),
new SCAContribution("scatours", "../../shared-contributions/scatours-contribution/target/classes"),
new SCAContribution("ui", "../ui-contribution/target/classes"));
node.start();
System.out.println("Node started - Press enter to shutdown.");
try {
System.in.read();
} catch (IOException e) {}
node.stop();
} catch (Exception ex) {
System.out.println(ex.toString());
}
}
}

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-sca</artifactId>
<version>1.4-SNAPSHOT</version>
<!--relativePath>../pom.xml</relativePath-->
</parent>
<artifactId>tuscany-scatours-chapter-05</artifactId>
<packaging>pom</packaging>
<name>Apache Tuscany SCA Tours Chapter 05 Examples</name>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>node</module>
<module>ui-contribution</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -17,7 +17,7 @@
* under the License.
-->
<project name="scatours-ui-contribution" default="compile">
<project name="scatours-chapter-05-ui-contribution" default="compile">
<target name="compile">
<mkdir dir="target/classes"/>
@ -31,7 +31,7 @@
<copy todir="target/classes">
<fileset dir="." excludes="**/*.java, pom.xml, build.xml, target"/>
</copy>
<jar destfile="target/scatours-ui-contribution.jar" basedir="target/classes">
<jar destfile="target/scatours-chapter-05-ui-contribution.jar" basedir="target/classes">
<manifest>
<attribute name="Main-Class" value="launch.LaunchTutorialAdmin"/>
</manifest>
@ -43,7 +43,7 @@
<target name="run">
<java classname="launch.LaunchTutorialAdmin" fork="true">
<classpath>
<pathelement location="target/scatours-ui-contribution.jar"/>
<pathelement location="target/scatours-chapter-05-ui-contribution.jar"/>
<fileset refid="tuscany.jars"/>
<fileset refid="3rdparty.jars"/>
</classpath>

View file

@ -25,8 +25,8 @@
<version>1.5-SNAPSHOT</version>
<!--relativePath>../../pom.xml</relativePath-->
</parent>
<artifactId>scatours-ui-contribution</artifactId>
<name>Apache Tuscany SCA Tours User Interface Contribution</name>
<artifactId>scatours-chapter-05-ui-contribution</artifactId>
<name>Apache Tuscany SCA Tours Chapter 05 User Interface Contribution</name>
<dependencies>
<dependency>

View file

@ -142,9 +142,9 @@
<implementation.java class="scatours.shoppingcart.ShoppingCartImpl"/>
<service name="ShoppingCart">
</service>
<reference name="paymentProcess">
<!--reference name="paymentProcess">
<binding.ws uri="http://localhost:8083/PaymentProcess" />
</reference>
</reference-->
</component>
<!--component name="PaymentProcessComponent">

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -1,122 +0,0 @@
/*
* 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 scatours;
import java.io.IOException;
import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
import org.apache.tuscany.sca.node.launcher.NodeLauncher;
public class LaunchNode {
public static void main(String[] args) throws Exception {
LaunchNode.launchFromFileSystemDir();
}
// OK for development but you must launch the node from this module
public static void launchFromFileSystemJar(){
SCANode node = null;
try {
node = SCANodeFactory.newInstance().createSCANode("scatours.composite",
new SCAContribution("common", "../common-contribution/target/scatours-common-contribution.jar"),
new SCAContribution("currency", "../currency-contribution/target/scatours-currency-contribution.jar"),
new SCAContribution("hotel", "../hotel-contribution/target/scatours-hotel-contribution.jar"),
new SCAContribution("flight", "../flight-contribution/target/scatours-flight-contribution.jar"),
new SCAContribution("car", "../car-contribution/target/scatours-car-contribution.jar"),
new SCAContribution("tripbooking", "../tripbooking-contribution/target/scatours-tripbooking-contribution.jar"),
new SCAContribution("travelcatalog", "../travelcatalog-contribution/target/scatours-travelcatalog-contribution.jar"),
new SCAContribution("scatours", "../scatours-contribution/target/scatours-scatours-contribution.jar"),
new SCAContribution("ui", "../ui-contribution/target/scatours-ui-contribution.jar"));
node.start();
System.out.println("Node started - Press enter to shutdown.");
try {
System.in.read();
} catch (IOException e) {}
node.stop();
} catch (Exception ex) {
System.out.println(ex.toString());
}
}
// OK for development but you must launch the node from this module
public static void launchFromFileSystemDir(){
SCANode node = null;
try {
node = SCANodeFactory.newInstance().createSCANode("scatours.composite",
new SCAContribution("common", "../common-contribution/target/classes"),
new SCAContribution("currency", "../currency-contribution/target/classes"),
new SCAContribution("hotel", "../hotel-contribution/target/classes"),
new SCAContribution("flight", "../flight-contribution/target/classes"),
new SCAContribution("car", "../car-contribution/target/classes"),
new SCAContribution("trip", "../trip-contribution/target/classes"),
new SCAContribution("tripbooking", "../tripbooking-contribution/target/classes"),
new SCAContribution("travelcatalog", "../travelcatalog-contribution/target/classes"),
new SCAContribution("payment", "../payment-contribution/target/classes"),
new SCAContribution("emailgateway", "../emailgateway-contribution/target/classes"),
new SCAContribution("paymentprocess", "../paymentprocess-contribution/target/classes"),
new SCAContribution("shoppingcart", "../shoppingcart-contribution/target/classes"),
new SCAContribution("scatours", "../scatours-contribution/target/classes"),
new SCAContribution("ui", "../ui-contribution/target/classes"));
node.start();
System.out.println("Node started - Press enter to shutdown.");
try {
System.in.read();
} catch (IOException e) {}
node.stop();
} catch (Exception ex) {
System.out.println(ex.toString());
}
}
// OK for samples but you can only load one contribution
public static void launchFromClasspath(){
SCANode node = null;
try {
node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("scatours.composite", null);
node.start();
System.out.println("Node started - Press enter to shutdown.");
try {
System.in.read();
} catch (IOException e) {}
node.stop();
} catch (Exception ex) {
System.out.println(ex.toString());
}
}
// have to be running the domain in this case
public static void launchFromDomain()throws Exception {
NodeLauncher.main(new String[] {"http://localhost:9990/node-config/SCAToursNode"});
}
}

View file

@ -27,7 +27,7 @@
</parent>
<artifactId>tuscany-scatours</artifactId>
<packaging>pom</packaging>
<name>Apache Tuscany SCA Tours Sample</name>
<name>Apache Tuscany SCA Tours Assembly Examples</name>
<profiles>
<profile>
@ -36,26 +36,18 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>calendar-contribution</module>
<module>common-contribution</module>
<module>currency-contribution</module>
<module>hotel-contribution</module>
<module>flight-contribution</module>
<module>car-contribution</module>
<module>trip-contribution</module>
<module>payment-contribution</module>
<module>paymentprocess-contribution</module>
<module>emailgateway-contribution</module>
<module>travelcatalog-contribution</module>
<module>tripbooking-contribution</module>
<module>shoppingcart-contribution</module>
<module>scatours-contribution</module>
<module>ui-contribution</module>
<module>domain</module>
<module>node</module>
<module>gettingstarted</module>
<module>shared-contributions</module>
<module>chapter-01</module>
<!--module>chapter-02</module-->
<!--module>chapter-03</module-->
<!--module>chapter-04</module-->
<module>chapter-05</module>
<!--module>chapter-06</module-->
<!--module>chapter-07</module-->
<!--module>chapter-08</module-->
<!--module>chapter-09</module-->
<!--module>chapter-10</module-->
<!--module>chapter-11</module-->
</modules>
</profile>

View file

@ -59,11 +59,12 @@ public class EmailGatewayTestCase {
//@Ignore
public void testWaitForInput() {
System.out.println("Press a key to end");
try {
/* try {
System.in.read();
} catch (Exception ex) {
}
System.out.println("Shutting down");
*/
}
/**

View file

@ -61,12 +61,14 @@ public class CreditCardPaymentTestCase {
@Test
//@Ignore
public void testWaitForInput() {
/*
System.out.println("Press a key to end");
try {
System.in.read();
} catch (Exception ex) {
}
System.out.println("Shutting down");
*/
}
/**

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-sca</artifactId>
<version>1.4-SNAPSHOT</version>
<!--relativePath>../pom.xml</relativePath-->
</parent>
<artifactId>tuscany-scatours-common-contributions</artifactId>
<packaging>pom</packaging>
<name>Apache Tuscany SCA Tours Common Contributions</name>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>calendar-contribution</module>
<module>car-contribution</module>
<module>common-contribution</module>
<module>currency-contribution</module>
<module>emailgateway-contribution</module>
<module>flight-contribution</module>
<module>hotel-contribution</module>
<module>payment-contribution</module>
<module>shoppingcart-contribution</module>
<module>travelcatalog-contribution</module>
<module>tripbooking-contribution</module>
<module>trip-contribution</module>
<module>scatours-contribution</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -43,8 +43,8 @@ import scatours.paymentprocess.PaymentProcess;
@Service(interfaces={ShoppingCart.class})
public class ShoppingCartImpl implements ShoppingCart{
@Reference
protected PaymentProcess paymentProcess;
// @Reference
// protected PaymentProcess paymentProcess;
@ConversationID
protected String cartId;
@ -83,7 +83,7 @@ public class ShoppingCartImpl implements ShoppingCart{
// get the total for all the trips
float amount = (float)0.0;
paymentProcess.makePayment(customerId, amount);
//paymentProcess.makePayment(customerId, amount);
}
}