diff options
Diffstat (limited to 'sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding')
3 files changed, 249 insertions, 0 deletions
diff --git a/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/build.xml b/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/build.xml new file mode 100644 index 0000000000..dc099ea479 --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/build.xml @@ -0,0 +1,35 @@ +<!-- + * 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 name="scatours-launcher-databinding" default="compile"> + <import file="../../antdefs.xml"/> + <path id="compile-path"> + <pathelement path="../../util/launcher-common/target/scatours-util-launcher-common.jar"/> + </path> + + <target name="run"> + <java classname="scatours.DatabindingLauncher" fork="true" failonerror="true"> + <classpath> + <pathelement location="target/${ant.project.name}.jar"/> + <path refid="compile-path"/> + <pathelement location="${env.TUSCANY_HOME}/lib/tuscany-sca-manifest.jar"/> + </classpath> + </java> + </target> +</project> diff --git a/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/pom.xml b/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/pom.xml new file mode 100644 index 0000000000..176570ffdd --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/pom.xml @@ -0,0 +1,169 @@ +<?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>scatours</artifactId> + <version>2.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + <version>2.0-SNAPSHOT</version> + <artifactId>scatours-launcher-databinding</artifactId> + <name>Apache Tuscany SCA Tours Databinding Launcher</name> + + <dependencies> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>scatours-util-launcher-common</artifactId> + <version>${pom.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-node-api</artifactId> + <version>${tuscany.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-node-impl</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-widget-runtime-dojo</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-resource-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-atom-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-http-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-ws-runtime-axis2</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-sca-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-ejb-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-ejb</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-bpel-runtime</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-jetty</artifactId> + <version>${tuscany.version}</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <version>10.3.1.4</version> + <scope>runtime</scope> + </dependency> + + </dependencies> + + <build> + <finalName>${artifactId}</finalName> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.2</version> + <configuration> + <archive> + <manifestEntries> + <Class-Path>../util/scatours-util-launcher-common.jar</Class-Path> + </manifestEntries> + <manifest> + <addClasspath>${scatours.selfContained}</addClasspath> + <classpathPrefix>../lib/</classpathPrefix> + <mainClass>scatours.DatabindingLauncher</mainClass> + </manifest> + </archive> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/src/main/java/scatours/DatabindingLauncher.java b/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/src/main/java/scatours/DatabindingLauncher.java new file mode 100644 index 0000000000..d7cae1e280 --- /dev/null +++ b/sca-java-2.x/contrib/tutorials/travelsample/launchers/databinding/src/main/java/scatours/DatabindingLauncher.java @@ -0,0 +1,45 @@ +/* + * 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 static scatours.launcher.LauncherUtil.locate; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +public class DatabindingLauncher { + public static void main(String[] args) throws Exception { + Node node1 = NodeFactory.getInstance().createNode( + locate("payment-java"), + locate("databinding-client")); + + Node node2 = NodeFactory.getInstance().createNode(locate("creditcard-payment-sdo")); + + node1.start(); + node2.start(); + + Runnable runner = ((Node)node1).getService(Runnable.class, "TestClient/Runnable"); + runner.run(); + + node1.stop(); + node2.stop(); + } +} |