summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/build.xml36
-rw-r--r--sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/pom.xml111
-rw-r--r--sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/src/main/java/scatours/PolicyLauncher.java51
3 files changed, 198 insertions, 0 deletions
diff --git a/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/build.xml b/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/build.xml
new file mode 100644
index 0000000000..847e0ac3a8
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/build.xml
@@ -0,0 +1,36 @@
+<!--
+ * 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-policy" default="compile">
+ <import file="../../antdefs.xml"/>
+ <path id="compile-path">
+ <pathelement path="../../util/launcher-common/target/scatours-util-launcher-common.jar"/>
+ </path>
+ <property name="package-path" value="../util/scatours-util-launcher-common.jar"/>
+
+ <target name="run">
+ <java classname="scatours.PolicyLauncher" fork="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-1.x/tags/travelsample-1.0-RC2/launchers/policy/pom.xml b/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/pom.xml
new file mode 100644
index 0000000000..d6246f6b37
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/pom.xml
@@ -0,0 +1,111 @@
+<?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>1.0</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>scatours-launcher-policy</artifactId>
+ <name>Apache Tuscany SCA Tours Policy 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-implementation-java-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</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.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-policy-security</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-logging</artifactId>
+ <version>${tuscany.version}</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.PolicyLauncher</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/src/main/java/scatours/PolicyLauncher.java b/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/src/main/java/scatours/PolicyLauncher.java
new file mode 100644
index 0000000000..115d747ede
--- /dev/null
+++ b/sca-java-1.x/tags/travelsample-1.0-RC2/launchers/policy/src/main/java/scatours/PolicyLauncher.java
@@ -0,0 +1,51 @@
+/*
+ * 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.SCAClient;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+
+public class PolicyLauncher {
+
+ public static void main(String[] args) throws Exception {
+ SCANode node1 =
+ SCANodeFactory.newInstance().createSCANode(null,
+ locate("common"),
+ locate("policy-client"),
+ locate("payment-java-policy"),
+ locate("trip-policy"));
+
+ node1.start();
+
+ SCANode node2 = SCANodeFactory.newInstance().createSCANode(null,
+ locate("creditcard-payment-jaxb-policy"));
+
+ node2.start();
+
+ Runnable client = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable");
+ client.run();
+
+ node1.stop();
+ node2.stop();
+ }
+}