You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/03/09 10:43:15 UTC
svn commit: r516344 [1/2] - in
/incubator/tuscany/branches/sca-java-integration:
samples/sca/calculator/src/main/java/calculator/
samples/sca/calculator/src/test/java/calculator/
samples/sca/composite-impl/src/main/java/composite/ samples/sca/composite...
Author: jsdelfino
Date: Fri Mar 9 01:43:12 2007
New Revision: 516344
URL: http://svn.apache.org/viewvc?view=rev&rev=516344
Log:
Renamed SCAContainer to SCARuntime as it's now based on a mini-implementation of TuscanyRuntime
Added:
incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCARuntime.java (with props)
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCARuntime.java (with props)
Removed:
incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCAContainer.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCAContainer.java
Modified:
incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/main/java/calculator/CalculatorClient.java
incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/test/java/calculator/CalculatorTestCase.java
incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java
incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/test/java/composite/CompositeTestCase.java
incubator/tuscany/branches/sca-java-integration/samples/sca/echo-binding/src/test/java/echo/EchoBindingTestCase.java
incubator/tuscany/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java
incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java
incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java
incubator/tuscany/branches/sca-java-integration/samples/sca/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java
incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java
incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java
incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/main/java/supplychain/SupplyChainClient.java
incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/main/java/helloworld/om/HelloWorldServer.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/main/java/helloworld/om/HelloWorldClient.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTest.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml
incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/test/java/org/apache/tuscany/binding/jms/JMSBindingTestCaseX.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/DataBindingBootStrapTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/property/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTest.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java
incubator/tuscany/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/main/java/calculator/CalculatorClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/main/java/calculator/CalculatorClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/main/java/calculator/CalculatorClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/main/java/calculator/CalculatorClient.java Fri Mar 9 01:43:12 2007
@@ -18,7 +18,7 @@
*/
package calculator;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -29,7 +29,7 @@
public class CalculatorClient {
public static void main(String[] args) throws Exception {
- SCAContainer.start("Calculator.composite");
+ SCARuntime.start("Calculator.composite");
CompositeContext context = CurrentCompositeContext.getContext();
CalculatorService calculatorService =
@@ -41,6 +41,6 @@
System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
System.out.println("3 / 2=" + calculatorService.divide(3, 2));
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/test/java/calculator/CalculatorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/test/java/calculator/CalculatorTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/test/java/calculator/CalculatorTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/calculator/src/test/java/calculator/CalculatorTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -32,14 +32,14 @@
private CalculatorService calculatorService;
protected void setUp() throws Exception {
- SCAContainer.start("Calculator.composite");
+ SCARuntime.start("Calculator.composite");
CompositeContext context = CurrentCompositeContext.getContext();
calculatorService = context.locateService(CalculatorService.class, "CalculatorServiceComponent");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void testCalculator() throws Exception {
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java Fri Mar 9 01:43:12 2007
@@ -1,6 +1,6 @@
package composite;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -12,7 +12,7 @@
public class CompositeClient {
public static void main(String[] args) throws Exception {
- SCAContainer.start("OuterComposite.composite");
+ SCARuntime.start("OuterComposite.composite");
CompositeContext context = CurrentCompositeContext.getContext();
@@ -21,6 +21,6 @@
source.clientMethod("Client.main");
Thread.sleep(500);
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/test/java/composite/CompositeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/test/java/composite/CompositeTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/test/java/composite/CompositeTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/composite-impl/src/test/java/composite/CompositeTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -29,14 +29,14 @@
private Source source;
protected void setUp() throws Exception {
- SCAContainer.start("OuterComposite.composite");
+ SCARuntime.start("OuterComposite.composite");
CompositeContext context = CurrentCompositeContext.getContext();
source = context.locateService(Source.class, "SourceComponent/InnerSourceService");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void test() throws Exception {
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/echo-binding/src/test/java/echo/EchoBindingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/echo-binding/src/test/java/echo/EchoBindingTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/echo-binding/src/test/java/echo/EchoBindingTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/echo-binding/src/test/java/echo/EchoBindingTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -36,12 +36,12 @@
}
protected void setUp() throws Exception {
- SCAContainer.start("EchoBinding.composite");
+ SCARuntime.start("EchoBinding.composite");
CompositeContext context = CurrentCompositeContext.getContext();
client = context.locateService(Client.class, "Client");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/echo-databinding/src/test/java/echo/EchoDataBindingTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -37,13 +37,13 @@
}
protected void setUp() throws Exception {
- SCAContainer.start("EchoDataBinding.composite");
+ SCARuntime.start("EchoDataBinding.composite");
CompositeContext context = CurrentCompositeContext.getContext();
componentA = context.locateService(Interface1.class, "ComponentA");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/main/java/loanapplication/LoanApplicationClient.java Fri Mar 9 01:43:12 2007
@@ -19,14 +19,14 @@
package loanapplication;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
public class LoanApplicationClient {
public static void main(String[] args) throws Exception {
- SCAContainer.start("loanapplication.composite");
+ SCARuntime.start("loanapplication.composite");
// Locate the MyClient component and invoke it
CompositeContext context = CurrentCompositeContext.getContext();
@@ -36,6 +36,6 @@
System.out.println(loanClient.displayLoan());
System.out.println("Loan approved: " + loanClient.isApproved());
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/loanapplication/src/test/java/loanapplication/LoanApplicationTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -29,14 +29,14 @@
private LoanClient loanClient;
protected void setUp() throws Exception {
- SCAContainer.start("loanapplication.composite");
+ SCARuntime.start("loanapplication.composite");
CompositeContext context = CurrentCompositeContext.getContext();
loanClient = context.locateService(LoanClient.class, "LoanClientComponent");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void test() throws Exception {
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/simple-bigbank/src/test/java/bigbank/BigBankTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -31,14 +31,14 @@
AccountService accountService;
protected void setUp() throws Exception {
- SCAContainer.start("BigBank.composite");
+ SCARuntime.start("BigBank.composite");
CompositeContext context = CurrentCompositeContext.getContext();
accountService = context.locateService(AccountService.class, "AccountServiceComponent");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void test() throws Exception {
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/main/java/simplecallback/SimpleCallbackClient.java Fri Mar 9 01:43:12 2007
@@ -18,7 +18,7 @@
*/
package simplecallback;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -28,7 +28,7 @@
public class SimpleCallbackClient {
public static void main(String[] args) throws Exception {
- SCAContainer.start("simplecallback.composite");
+ SCARuntime.start("simplecallback.composite");
// Locate the MyClient component and invoke it
CompositeContext context = CurrentCompositeContext.getContext();
@@ -37,6 +37,6 @@
myClient.aClientMethod();
Thread.sleep(500);
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/simple-callback/src/test/java/simplecallback/SimpleCallbackTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -32,14 +32,14 @@
private MyClient myClient;
protected void setUp() throws Exception {
- SCAContainer.start("simplecallback.composite");
+ SCARuntime.start("simplecallback.composite");
CompositeContext context = CurrentCompositeContext.getContext();
myClient = context.locateService(MyClient.class, "MyClientComponent");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void test() throws Exception {
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/main/java/supplychain/SupplyChainClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/main/java/supplychain/SupplyChainClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/main/java/supplychain/SupplyChainClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/main/java/supplychain/SupplyChainClient.java Fri Mar 9 01:43:12 2007
@@ -18,7 +18,7 @@
*/
package supplychain;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -29,7 +29,7 @@
public class SupplyChainClient {
public static final void main(String[] args) throws Exception {
- SCAContainer.start("supplychain.composite");
+ SCARuntime.start("supplychain.composite");
// Locate the Customer component and invoke it
CompositeContext context = CurrentCompositeContext.getContext();
@@ -41,6 +41,6 @@
System.out.println("Main thread sleeping ...");
Thread.sleep(1000);
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/samples/sca/supplychain/src/test/java/supplychain/SupplyChainClientTestCase.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -33,14 +33,14 @@
private Customer customer;
protected void setUp() throws Exception {
- SCAContainer.start("supplychain.composite");
+ SCARuntime.start("supplychain.composite");
CompositeContext context = CurrentCompositeContext.getContext();
customer = context.locateService(Customer.class, "CustomerComponent");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void test() throws Exception {
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/main/java/helloworld/om/HelloWorldServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/main/java/helloworld/om/HelloWorldServer.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/main/java/helloworld/om/HelloWorldServer.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/main/java/helloworld/om/HelloWorldServer.java Fri Mar 9 01:43:12 2007
@@ -3,7 +3,7 @@
import java.io.IOException;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
public class HelloWorldServer {
@@ -12,7 +12,7 @@
*/
public static void main(String[] args) {
- SCAContainer.start("helloworldws-om.composite");
+ SCARuntime.start("helloworldws-om.composite");
try {
System.out.println("HelloWorld server started");
@@ -21,7 +21,7 @@
e.printStackTrace();
}
- SCAContainer.stop();
+ SCARuntime.stop();
System.out.println("HelloWorld server stopped");
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java Fri Mar 9 01:43:12 2007
@@ -21,7 +21,7 @@
import java.io.IOException;
import java.net.Socket;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import junit.framework.TestCase;
@@ -29,7 +29,7 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("helloworldws-om.composite");
+ SCARuntime.start("helloworldws-om.composite");
}
public void testPing() throws IOException {
@@ -38,7 +38,7 @@
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/main/java/helloworld/om/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/main/java/helloworld/om/HelloWorldClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/main/java/helloworld/om/HelloWorldClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/main/java/helloworld/om/HelloWorldClient.java Fri Mar 9 01:43:12 2007
@@ -24,7 +24,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNode;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
import static java.lang.System.out;
@@ -43,7 +43,7 @@
public final static void main(String[] args) throws Exception {
- SCAContainer.start("helloworldwsclient-om.composite");
+ SCARuntime.start("helloworldwsclient-om.composite");
// Invoke the HelloWorld service
CompositeContext compositeContext = CurrentCompositeContext.getContext();
@@ -68,7 +68,7 @@
out.println(value);
out.flush();
- SCAContainer.stop();
+ SCARuntime.stop();
}
private static void printTRee(OMElement value) {
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java Fri Mar 9 01:43:12 2007
@@ -26,7 +26,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMText;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.apache.tuscany.core.test.SCATestCaseRunner;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -45,7 +45,7 @@
server = new SCATestCaseRunner(HelloWorldServerTest.class);
server.setUp();
- SCAContainer.start("helloworldwsclient-om.composite");
+ SCARuntime.start("helloworldwsclient-om.composite");
CompositeContext compositeContext = CurrentCompositeContext.getContext();
helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
@@ -66,7 +66,7 @@
@Override
protected void tearDown() throws Exception {
server.tearDown();
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTest.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTest.java Fri Mar 9 01:43:12 2007
@@ -23,13 +23,13 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
public class HelloWorldServerTest extends TestCase {
@Override
protected void setUp() throws Exception {
- SCAContainer.start("helloworldws-om.composite");
+ SCARuntime.start("helloworldws-om.composite");
}
public void testPing() throws IOException {
@@ -38,7 +38,7 @@
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java Fri Mar 9 01:43:12 2007
@@ -3,7 +3,7 @@
import java.io.IOException;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
public class HelloWorldServer {
@@ -12,7 +12,7 @@
*/
public static void main(String[] args) {
- SCAContainer.start("helloworldws.composite");
+ SCARuntime.start("helloworldws.composite");
try {
System.out.println("HelloWorld server started");
@@ -21,7 +21,7 @@
e.printStackTrace();
}
- SCAContainer.stop();
+ SCARuntime.stop();
System.out.println("HelloWorld server stopped");
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java Fri Mar 9 01:43:12 2007
@@ -21,7 +21,7 @@
import java.io.IOException;
import java.net.Socket;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -32,7 +32,7 @@
@Before
public void startServer() throws Exception {
- SCAContainer.start("helloworldws.composite");
+ SCARuntime.start("helloworldws.composite");
}
@Test
@@ -42,7 +42,7 @@
@After
public void stopServer() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java Fri Mar 9 01:43:12 2007
@@ -18,7 +18,7 @@
*/
package helloworld;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -29,13 +29,13 @@
public class HelloWorldClient {
public final static void main(String[] args) throws Exception {
- SCAContainer.start("helloworldwsclient.composite");
+ SCARuntime.start("helloworldwsclient.composite");
CompositeContext compositeContext = CurrentCompositeContext.getContext();
HelloWorldService helloWorldService= compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
String value = helloWorldService.getGreetings("World");
System.out.println(value);
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.apache.tuscany.core.test.SCATestCaseRunner;
import org.junit.After;
import org.junit.Before;
@@ -41,7 +41,7 @@
@Before
public void startClient() throws Exception {
- SCAContainer.start("helloworldwsclient.composite");
+ SCARuntime.start("helloworldwsclient.composite");
CompositeContext compositeContext = CurrentCompositeContext.getContext();
helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
@@ -59,7 +59,7 @@
@After
public void stopClient() throws Exception {
server.after();
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java Fri Mar 9 01:43:12 2007
@@ -21,7 +21,7 @@
import java.io.IOException;
import java.net.Socket;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -30,7 +30,7 @@
@Before
public void startServer() throws Exception {
- SCAContainer.start("helloworldws.composite");
+ SCARuntime.start("helloworldws.composite");
}
@Test
@@ -40,7 +40,7 @@
@After
public void stopServer() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml Fri Mar 9 01:43:12 2007
@@ -64,8 +64,8 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
- <module>helloworld-om-ws</module>
- <module>helloworld-om-wsclient</module>
+ <module>helloworld-ws</module>
+ <module>helloworld-wsclient</module>
</modules>
</profile>
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/test/java/org/apache/tuscany/binding/jms/JMSBindingTestCaseX.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/test/java/org/apache/tuscany/binding/jms/JMSBindingTestCaseX.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/test/java/org/apache/tuscany/binding/jms/JMSBindingTestCaseX.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/test/java/org/apache/tuscany/binding/jms/JMSBindingTestCaseX.java Fri Mar 9 01:43:12 2007
@@ -31,7 +31,7 @@
import org.activemq.broker.BrokerContainer;
import org.activemq.broker.impl.BrokerContainerImpl;
import org.activemq.store.vm.VMPersistenceAdapter;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
import org.osoa.sca.CompositeContext;
@@ -80,7 +80,7 @@
protected void setUp() throws Exception {
startBroker();
- SCAContainer.start("META-INF/sca/default.scdl");
+ SCARuntime.start("META-INF/sca/default.scdl");
super.setUp();
CompositeContext context = CurrentCompositeContext.getContext();
introService = context.locateService(IntroService.class, "IntroServiceComponent");
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -31,14 +31,14 @@
public class HelloWorldJmsClient extends TestCase{
private HelloWorldService helloWorldService;
protected void setUp() throws Exception {
- SCAContainer.start("META-INF/sca/default.scdl");
+ SCARuntime.start("META-INF/sca/default.scdl");
CompositeContext context = CurrentCompositeContext.getContext();
helloWorldService = context.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void testHelloWorld(){
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/samples/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java Fri Mar 9 01:43:12 2007
@@ -23,7 +23,7 @@
import org.activemq.broker.BrokerContainer;
import org.activemq.broker.impl.BrokerContainerImpl;
import org.activemq.store.vm.VMPersistenceAdapter;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CurrentCompositeContext;
@@ -47,13 +47,13 @@
protected void setUp() throws Exception {
startBroker();
- SCAContainer.start( "META-INF/sca/default.scdl");
+ SCARuntime.start( "META-INF/sca/default.scdl");
CurrentCompositeContext.getContext();
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
public void testJMSServer(){
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/calculator/CalculatorClientTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -47,13 +47,13 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("calculator/sample.calculator.composite");
+ SCARuntime.start("calculator/sample.calculator.composite");
this.compositeContext = CurrentCompositeContext.getContext();
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -60,13 +60,13 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("META-INF/sca/helloworld.composite");
+ SCARuntime.start("META-INF/sca/helloworld.composite");
this.compositeContext = CurrentCompositeContext.getContext();
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/JavaScriptPropertiesTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -63,13 +63,13 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("META-INF/sca/properties.composite");
+ SCARuntime.start("META-INF/sca/properties.composite");
this.compositeContext = CurrentCompositeContext.getContext();
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/PythonPropertiesTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -62,13 +62,13 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("META-INF/sca/properties.composite");
+ SCARuntime.start("META-INF/sca/properties.composite");
this.compositeContext = CurrentCompositeContext.getContext();
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/ReferencesTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -56,13 +56,13 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("META-INF/sca/references.composite");
+ SCARuntime.start("META-INF/sca/references.composite");
this.compositeContext = CurrentCompositeContext.getContext();
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/RubyPropertiesTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -61,13 +61,13 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("META-INF/sca/properties.composite");
+ SCARuntime.start("META-INF/sca/properties.composite");
this.compositeContext = CurrentCompositeContext.getContext();
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/XMLTestCase.java Fri Mar 9 01:43:12 2007
@@ -22,7 +22,7 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CompositeContext;
import org.osoa.sca.CurrentCompositeContext;
@@ -49,13 +49,13 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("META-INF/sca/xml.composite");
+ SCARuntime.start("META-INF/sca/xml.composite");
this.compositeContext = CurrentCompositeContext.getContext();
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Added: incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCARuntime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCARuntime.java?view=auto&rev=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCARuntime.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCARuntime.java Fri Mar 9 01:43:12 2007
@@ -0,0 +1,250 @@
+/*
+ * 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 org.apache.tuscany.api;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import org.osoa.sca.ComponentContext;
+
+/**
+ * SCARuntime is used to start a Tuscany SCA runtime.
+ */
+public abstract class SCARuntime {
+ public static final String DEFAULT_SYSTEM_SCDL = "META-INF/tuscany/default-system.composite";
+ public static final String SYSTEM_SCDL = "system.composite";
+ public static final String EXTENSION_SCDL = "META-INF/sca/extension.composite";
+ public static final String SERVICE_SCDL = "META-INF/sca/service.composite";
+ public static final String META_APPLICATION_SCDL = "META-INF/sca/application.composite";
+ public static final String APPLICATION_SCDL = "application.composite";
+
+ private static SCARuntime instance;
+
+ /**
+ * Read the service name from a configuration file
+ * @param classLoader
+ * @param name
+ * @return
+ * @throws IOException
+ */
+ private static String getServiceName(ClassLoader classLoader, String name) throws IOException {
+ InputStream is = classLoader.getResourceAsStream("META-INF/services/" + name);
+ if (is == null) {
+ return null;
+ }
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(is));
+ while (true) {
+ String line = reader.readLine();
+ if (line == null) {
+ break;
+ } else if (!line.startsWith("#")) {
+ return line.trim();
+ }
+ }
+ } finally {
+ if (reader != null) {
+ reader.close();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns a TuscanyContainer instance. If the system property
+ * "org.apache.tuscany.api.TuscanyContainer" is set, its value is used as
+ * the name of the implementation class. Otherwise, if the resource
+ * "META-INF/services/org.apache.tuscany.api.TuscanyContainer" can be loaded
+ * from the supplied classloader. Otherwise, it will use
+ * "org.apache.tuscany.core.bootstrap.DefaultSCARuntime" as the default.
+ * The named class is loaded from the supplied classloader and instantiated
+ * using its default (no-arg) constructor.
+ *
+ * @return
+ */
+ private static SCARuntime newInstance(final ClassLoader classLoader) {
+
+ try {
+ final String name = SCARuntime.class.getName();
+ String className = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ public String run() {
+ return System.getProperty(name);
+ }
+ });
+
+ if (className == null) {
+ className = getServiceName(classLoader, name);
+ }
+ if (className == null) {
+ className = "org.apache.tuscany.core.bootstrap.DefaultSCARuntime";
+ }
+ Class cls = Class.forName(className, true, classLoader);
+ return (SCARuntime)cls.newInstance(); // NOPMD lresende
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Get an instance of Tuscany container
+ *
+ * @return The instance
+ */
+ public synchronized static SCARuntime getInstance() { // NOPMD
+ if (instance != null) {
+ return instance;
+ }
+ ClassLoader classLoader = SCARuntime.class.getClassLoader();
+ instance = newInstance(classLoader);
+ return instance;
+ }
+
+ /**
+ * Start the Tuscany runtime using default SCDLs
+ */
+ public static void start() {
+ try {
+ getInstance().startup(null, null, null, null);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Start the Tuscany container with the given SCDLs
+ *
+ * @param system The URL for the system SCDL
+ * @param extensions An array of URLs for extensions
+ * @param application The URL for the application SCDL
+ */
+ public static void start(URL system, URL[] extensions, URL application, String compositePath) {
+ try {
+ getInstance().startup(system, extensions, application, compositePath);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Start the Tuscany container with the given SCDL
+ *
+ * @param application The URL for the application SCDL
+ */
+ public static void start(URL application, String compositePath) {
+ try {
+ getInstance().startup(null, null, application, compositePath);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Start the Tuscany container with the given SCDL
+ *
+ * @param compositePath The path of the application SCDL
+ */
+ public static void start(String compositePath) {
+ try {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ URL applicationURL = cl.getResource(compositePath);
+ getInstance().startup(null, null, applicationURL, compositePath);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Start the Tuscany container with the given SCDL
+ *
+ * @param compositePath The path of the system SCDL
+ * @param compositePath The path of the application SCDL
+ */
+ public static void start(String system, String compositePath) {
+ try {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ URL systemURL = cl.getResource(system);
+ URL applicationURL = cl.getResource(compositePath);
+ getInstance().startup(systemURL, null, applicationURL, compositePath);
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Get the ComponentContext by name
+ *
+ * @param componentName
+ * @return
+ */
+ public static ComponentContext getComponentContext(String componentName) {
+ return getInstance().getContext(componentName);
+ }
+
+
+ /**
+ * Get access to a system service
+ * @param serviceName
+ * @return
+ */
+ protected abstract Object getSystemService(String serviceName);
+
+ /**
+ * Stop the Tuscany container
+ */
+ public static void stop() {
+ try {
+ getInstance().shutdown();
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ } finally {
+ instance = null;
+ }
+ }
+
+ /**
+ * Look up the ComponentContext by name
+ * @param componentName
+ * @return
+ */
+ protected abstract ComponentContext getContext(String componentName);
+
+ /**
+ * Start up the container
+ * @param system The URL of the SCDL for tuscany system composite
+ * @param extensions The URLs of the SCDLs for tuscany extension composites
+ * @param application The URL of the SCDL for the application composite
+ * @param compositePath The path of the application composite relative to the application URL
+ * @throws Exception
+ */
+ protected abstract void startup(URL system, URL[] extensions, URL application, String compositePath)
+ throws Exception;
+
+ /**
+ * Shutdown the container
+ * @throws Exception
+ */
+ protected abstract void shutdown() throws Exception;
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCARuntime.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/kernel/api/src/main/java/org/apache/tuscany/api/SCARuntime.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCARuntime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCARuntime.java?view=auto&rev=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCARuntime.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCARuntime.java Fri Mar 9 01:43:12 2007
@@ -0,0 +1,92 @@
+/*
+ * 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 org.apache.tuscany.core.bootstrap;
+
+import java.net.URI;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.tuscany.api.SCARuntime;
+import org.apache.tuscany.api.TuscanyException;
+import org.apache.tuscany.core.component.ComponentContextImpl;
+import org.apache.tuscany.core.launcher.CompositeContextImpl;
+import org.apache.tuscany.core.runtime.mini.SimpleRuntime;
+import org.apache.tuscany.core.runtime.mini.SimpleRuntimeImpl;
+import org.apache.tuscany.core.runtime.mini.SimpleRuntimeInfo;
+import org.apache.tuscany.core.runtime.mini.SimpleRuntimeInfoImpl;
+import org.apache.tuscany.spi.component.Component;
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.component.TargetResolutionException;
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.CurrentCompositeContext;
+import org.osoa.sca.ServiceUnavailableException;
+
+/**
+ * Default implementation of SCARuntime.
+ *
+ * @version $Rev$ $Date$
+ */
+@SuppressWarnings("deprecation")
+public class DefaultSCARuntime extends SCARuntime {
+ protected CompositeComponent application;
+ protected CompositeContextImpl context;
+
+ protected SimpleRuntime runtime;
+
+ protected void startup(URL system, URL[] exts, URL applicationSCDL, String compositePath) throws Exception {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ List<URL> extensions = exts == null ? null : Arrays.asList(exts);
+ URI contributionURI = URI.create("/default");
+ SimpleRuntimeInfo runtimeInfo =
+ new SimpleRuntimeInfoImpl(cl, system, extensions, contributionURI, applicationSCDL, compositePath);
+ runtime = new SimpleRuntimeImpl(runtimeInfo);
+
+ try {
+ application = runtime.start();
+ } catch (TuscanyException e) {
+ throw e;
+ }
+
+ }
+
+ protected void shutdown() throws Exception {
+ runtime.destroy();
+ }
+
+ @Override
+ protected ComponentContext getContext(String componentName) {
+ CompositeComponent composite = ((CompositeContextImpl)context).getComposite();
+ Component component = (Component)composite.getChild(componentName);
+ return new ComponentContextImpl(CurrentCompositeContext.getContext(), component);
+ }
+
+ public CompositeComponent getCompsiteComponent() {
+ return application;
+ }
+
+ @Override
+ public Object getSystemService(String serviceName) {
+ try {
+ return runtime.getSystemService(Object.class, serviceName);
+ } catch (TargetResolutionException e) {
+ throw new ServiceUnavailableException(e);
+ }
+ }
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCARuntime.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/bootstrap/DefaultSCARuntime.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java Fri Mar 9 01:43:12 2007
@@ -6,13 +6,13 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
public class SCATestToolServerTest extends TestCase {
@Override
protected void setUp() throws Exception {
- SCAContainer.start("bindingscomposite-system.composite", "bindingscomposite.composite");
+ SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite");
}
public void testPing() throws IOException {
@@ -21,7 +21,7 @@
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java Fri Mar 9 01:43:12 2007
@@ -23,7 +23,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.apache.tuscany.core.test.SCATestCaseRunner;
import org.apache.tuscany.sca.util.SCATestUtilityServerTest;
import org.osoa.sca.CompositeContext;
@@ -50,7 +50,7 @@
}
protected void setUp() throws Exception {
- SCAContainer.start("bindingsclient.composite");
+ SCARuntime.start("bindingsclient.composite");
toolServer = new SCATestCaseRunner(SCATestToolServerTest.class);
toolServer.setUp();
@@ -73,7 +73,7 @@
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
toolServer.tearDown();
utilityServer.tearDown();
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java Fri Mar 9 01:43:12 2007
@@ -5,7 +5,7 @@
import java.io.IOException;
import java.net.Socket;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import junit.framework.TestCase;
@@ -13,7 +13,7 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("bindingsutility-system.composite", "bindingsutility.composite");
+ SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite");
}
public void testPing() throws IOException {
@@ -22,7 +22,7 @@
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java Fri Mar 9 01:43:12 2007
@@ -3,7 +3,7 @@
import java.io.IOException;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
public class SCATestToolServer {
@@ -12,7 +12,7 @@
*/
public static void main(String[] args) {
- SCAContainer.start("bindingscomposite-system.composite", "bindingscomposite.composite");
+ SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite");
try {
System.out.println("SCATestTool server started");
@@ -21,7 +21,7 @@
e.printStackTrace();
}
- SCAContainer.stop();
+ SCARuntime.stop();
System.out.println("SCATestTool server stopped");
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java Fri Mar 9 01:43:12 2007
@@ -6,13 +6,13 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
public class SCATestToolServerTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- SCAContainer.start("bindingscomposite-system.composite", "bindingscomposite.composite");
+ SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite");
}
public void testPing() throws IOException {
@@ -21,7 +21,7 @@
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java Fri Mar 9 01:43:12 2007
@@ -3,7 +3,7 @@
import java.io.IOException;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
public class SCATestUtilityServer {
@@ -12,7 +12,7 @@
*/
public static void main(String[] args) {
- SCAContainer.start("bindingsutility-system.composite", "bindingsutility.composite");
+ SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite");
try {
System.out.println("SCATestUtility server started");
@@ -21,7 +21,7 @@
e.printStackTrace();
}
- SCAContainer.stop();
+ SCARuntime.stop();
System.out.println("SCATestUtility server stopped");
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java Fri Mar 9 01:43:12 2007
@@ -4,7 +4,7 @@
import java.io.IOException;
import java.net.Socket;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import junit.framework.TestCase;
@@ -12,7 +12,7 @@
@Override
protected void setUp() throws Exception {
- SCAContainer.start("bindingsutility-system.composite", "bindingsutility.composite");
+ SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite");
}
public void testPing() throws IOException {
@@ -21,7 +21,7 @@
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CurrentCompositeContext;
public class CallBackApiTest extends TestCase {
@@ -32,14 +32,14 @@
}
protected void setUp() throws Exception {
- SCAContainer.start("CallBackApiTest.composite");
+ SCARuntime.start("CallBackApiTest.composite");
aCallBackClient =
CurrentCompositeContext.getContext().locateService(CallBackApiClient.class, "CallBackApiClient");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java Fri Mar 9 01:43:12 2007
@@ -2,7 +2,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CurrentCompositeContext;
public class CallBackBasicTestCase extends TestCase {
@@ -14,14 +14,14 @@
}
protected void setUp() throws Exception {
- SCAContainer.start("CallBackBasicTest.composite");
+ SCARuntime.start("CallBackBasicTest.composite");
aCallBackClient = CurrentCompositeContext.getContext().locateService(CallBackBasicClient.class, "CallBackBasicClient");
}
@Override
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java?view=diff&rev=516344&r1=516343&r2=516344
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java Fri Mar 9 01:43:12 2007
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.api.SCARuntime;
import org.osoa.sca.CurrentCompositeContext;
public class CallBackCTypeTest extends TestCase {
@@ -32,14 +32,14 @@
}
protected void setUp() throws Exception {
- SCAContainer.start("CallBackCTypeClient.composite");
+ SCARuntime.start("CallBackCTypeClient.composite");
aCallBackClient =
CurrentCompositeContext.getContext().locateService(CallBackCTypeClient.class, "CallBackCTypeClient");
}
protected void tearDown() throws Exception {
- SCAContainer.stop();
+ SCARuntime.stop();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org