diff options
Diffstat (limited to '')
10 files changed, 62 insertions, 86 deletions
diff --git a/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java b/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java index d18acc6df1..0f9d0eca80 100644 --- a/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java +++ b/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/CurrencyConverterCORBALauncher.java @@ -31,22 +31,19 @@ import scatours.currencyconverter.CurrencyConverter; public class CurrencyConverterCORBALauncher {
public static void main(String[] args) throws Exception {
- SCAContribution currencyCORBAContribution =
- locate("currency-corba");
- SCAContribution currencyContribution =
- locate("currency");
-
- SCANode node = SCANodeFactory.newInstance().createSCANode(
- "currency-converter-corba.composite", currencyContribution, currencyCORBAContribution);
+ SCAContribution currencyCORBAContribution = locate("currency-corba");
+ SCAContribution currencyContribution = locate("currency");
+
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("currency-converter-corba.composite",
+ currencyContribution,
+ currencyCORBAContribution);
node.start();
System.out.println("Quick currency converter test");
- CurrencyConverter converter = ((SCAClient)node).getService(
- CurrencyConverter.class, "CurrencyConverter");
- System.out.println("USD -> GBP = "
- + converter.getExchangeRate("USD", "GBP"));
- System.out.println("100 USD = "
- + converter.convert("USD", "GBP", 100) + "GBP");
+ CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter");
+ System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
+ System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP");
System.out.println("Node started - Press enter to shutdown.");
System.in.read();
diff --git a/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java b/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java index 6d0efc8c66..fe5c98bf02 100644 --- a/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java +++ b/sandbox/travelsample/launchers/currency-converter-corba/src/main/java/scatours/currencyconverter/CurrencyConverter.java @@ -26,11 +26,8 @@ import org.osoa.sca.annotations.Remotable; @Remotable
public interface CurrencyConverter {
- double getExchangeRate(String fromCurrencyCode,
- String toCurrencyCode);
-
- double convert(String fromCurrencyCode,
- String toCurrencyCode,
- double amount);
+ double getExchangeRate(String fromCurrencyCode, String toCurrencyCode);
+
+ double convert(String fromCurrencyCode, String toCurrencyCode, double amount);
}
diff --git a/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java b/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java index 08a0d8430a..9de41eb478 100644 --- a/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java +++ b/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/CurrencyConverterJMSLauncher.java @@ -31,8 +31,10 @@ public class CurrencyConverterJMSLauncher { SCAContribution currencyJMSContribution = locate("currency-jms");
SCAContribution currencyContribution = locate("currency");
- SCANode node = SCANodeFactory.newInstance().createSCANode(
- "currency-converter-jms.composite", currencyContribution, currencyJMSContribution);
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("currency-converter-jms.composite",
+ currencyContribution,
+ currencyJMSContribution);
node.start();
System.out.println("Node started - Press enter to shutdown.");
diff --git a/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java b/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java index 7d063ca865..929eb78431 100644 --- a/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java +++ b/sandbox/travelsample/launchers/currency-converter-jms/src/main/java/scatours/JMSBrokerLauncher.java @@ -23,16 +23,16 @@ import org.apache.activemq.broker.BrokerService; public class JMSBrokerLauncher { public static void main(String[] args) throws Exception { - final BrokerService jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); + final BrokerService jmsBroker = new BrokerService(); + jmsBroker.setPersistent(false); + jmsBroker.setUseJmx(false); + jmsBroker.addConnector("tcp://localhost:61619"); + jmsBroker.start(); - System.out.println("JMS Message Broker started"); - System.out.println("Press enter to shutdown."); - System.in.read(); + System.out.println("JMS Message Broker started"); + System.out.println("Press enter to shutdown."); + System.in.read(); - jmsBroker.stop(); + jmsBroker.stop(); } - } +} diff --git a/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java b/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java index 24d945b2f4..b1f783bfba 100644 --- a/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java +++ b/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/com/tuscanyscatours/currencyconverter/CurrencyConverter.java @@ -26,11 +26,8 @@ import org.osoa.sca.annotations.Remotable; @Remotable
public interface CurrencyConverter {
- double getExchangeRate(String fromCurrencyCode,
- String toCurrencyCode);
-
- double convert(String fromCurrencyCode,
- String toCurrencyCode,
- double amount);
+ double getExchangeRate(String fromCurrencyCode, String toCurrencyCode);
+
+ double convert(String fromCurrencyCode, String toCurrencyCode, double amount);
}
diff --git a/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java b/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java index 87660bdfb6..b509cfef5c 100644 --- a/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java +++ b/sandbox/travelsample/launchers/currency-converter-rmi/src/main/java/scatours/CurrencyConverterRMILauncher.java @@ -31,22 +31,19 @@ import com.tuscanyscatours.currencyconverter.CurrencyConverter; public class CurrencyConverterRMILauncher {
public static void main(String[] args) throws Exception {
- SCAContribution currencyRMIContribution =
- locate("currency-rmi");
- SCAContribution currencyContribution =
- locate("currency");
-
- SCANode node = SCANodeFactory.newInstance().createSCANode(
- "currency-converter-rmi.composite", currencyContribution, currencyRMIContribution);
+ SCAContribution currencyRMIContribution = locate("currency-rmi");
+ SCAContribution currencyContribution = locate("currency");
+
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("currency-converter-rmi.composite",
+ currencyContribution,
+ currencyRMIContribution);
node.start();
System.out.println("Quick currency converter test");
- CurrencyConverter converter = ((SCAClient)node).getService(
- CurrencyConverter.class, "CurrencyConverter");
- System.out.println("USD -> GBP = "
- + converter.getExchangeRate("USD", "GBP"));
- System.out.println("100 USD = "
- + converter.convert("USD", "GBP", 100) + "GBP");
+ CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter");
+ System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
+ System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP");
System.out.println("Node started - Press enter to shutdown.");
System.in.read();
diff --git a/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java b/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java index 36b907d454..2425d3f483 100644 --- a/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java +++ b/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/CurrencyConverterWSLauncher.java @@ -31,22 +31,19 @@ import scatours.currencyconverter.CurrencyConverter; public class CurrencyConverterWSLauncher {
public static void main(String[] args) throws Exception {
- SCAContribution currencyWSContribution =
- locate("currency-ws");
- SCAContribution currencyContribution =
- locate("currency");
-
- SCANode node = SCANodeFactory.newInstance().createSCANode(
- "currency-converter-ws.composite", currencyContribution, currencyWSContribution);
+ SCAContribution currencyWSContribution = locate("currency-ws");
+ SCAContribution currencyContribution = locate("currency");
+
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("currency-converter-ws.composite",
+ currencyContribution,
+ currencyWSContribution);
node.start();
System.out.println("Quick currency converter test");
- CurrencyConverter converter = ((SCAClient)node).getService(
- CurrencyConverter.class, "CurrencyConverter");
- System.out.println("USD -> GBP = "
- + converter.getExchangeRate("USD", "GBP"));
- System.out.println("100 USD = "
- + converter.convert("USD", "GBP", 100) + "GBP");
+ CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter");
+ System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
+ System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP");
System.out.println("Node started - Press enter to shutdown.");
System.in.read();
diff --git a/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java b/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java index 6d0efc8c66..fe5c98bf02 100644 --- a/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java +++ b/sandbox/travelsample/launchers/currency-converter-ws/src/main/java/scatours/currencyconverter/CurrencyConverter.java @@ -26,11 +26,8 @@ import org.osoa.sca.annotations.Remotable; @Remotable
public interface CurrencyConverter {
- double getExchangeRate(String fromCurrencyCode,
- String toCurrencyCode);
-
- double convert(String fromCurrencyCode,
- String toCurrencyCode,
- double amount);
+ double getExchangeRate(String fromCurrencyCode, String toCurrencyCode);
+
+ double convert(String fromCurrencyCode, String toCurrencyCode, double amount);
}
diff --git a/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java b/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java index 9e8385e9af..cacd579b3b 100644 --- a/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java +++ b/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/CurrencyConverterLauncher.java @@ -31,20 +31,15 @@ import scatours.currencyconverter.CurrencyConverter; public class CurrencyConverterLauncher {
public static void main(String[] args) throws Exception {
- SCAContribution currencyContribution =
- locate("currency");
-
- SCANode node = SCANodeFactory.newInstance().createSCANode(
- "currency-converter.composite", currencyContribution);
+ SCAContribution currencyContribution = locate("currency");
+
+ SCANode node = SCANodeFactory.newInstance().createSCANode("currency-converter.composite", currencyContribution);
node.start();
System.out.println("Quick currency converter test");
- CurrencyConverter converter = ((SCAClient)node).getService(
- CurrencyConverter.class, "CurrencyConverter");
- System.out.println("USD -> GBP = "
- + converter.getExchangeRate("USD", "GBP"));
- System.out.println("100 USD = "
- + converter.convert("USD", "GBP", 100) + "GBP");
+ CurrencyConverter converter = ((SCAClient)node).getService(CurrencyConverter.class, "CurrencyConverter");
+ System.out.println("USD -> GBP = " + converter.getExchangeRate("USD", "GBP"));
+ System.out.println("100 USD = " + converter.convert("USD", "GBP", 100) + "GBP");
System.out.println("Node started - Press enter to shutdown.");
System.in.read();
diff --git a/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java b/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java index 6d0efc8c66..fe5c98bf02 100644 --- a/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java +++ b/sandbox/travelsample/launchers/currency-converter/src/main/java/scatours/currencyconverter/CurrencyConverter.java @@ -26,11 +26,8 @@ import org.osoa.sca.annotations.Remotable; @Remotable
public interface CurrencyConverter {
- double getExchangeRate(String fromCurrencyCode,
- String toCurrencyCode);
-
- double convert(String fromCurrencyCode,
- String toCurrencyCode,
- double amount);
+ double getExchangeRate(String fromCurrencyCode, String toCurrencyCode);
+
+ double convert(String fromCurrencyCode, String toCurrencyCode, double amount);
}
|