diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
commit | efe3363a815a777ecd283928900404dea84a7e1f (patch) | |
tree | 42522fd01e6af981f8ff94663d911d56744154d5 /branches/sca-equinox/modules/binding-ejb-runtime/src/test | |
parent | aacabe1650e380595a8d701123394d791656d17d (diff) |
Work in progress. Fixed implementation of NodeImpl, now working without dependencies on implementations from other bundles (except RuntimeAssemblyFactory, which will need to be cleaned up too). Started to remove dependencies on host-embedded and port code to NodeFactory and Node, as an interim step to bring them up, before porting them to the OSGi-enabled node launcher.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@703068 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/binding-ejb-runtime/src/test')
-rw-r--r-- | branches/sca-equinox/modules/binding-ejb-runtime/src/test/java/org/apache/tuscany/sca/binding/ejb/tests/EJBReferenceTestCase.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/branches/sca-equinox/modules/binding-ejb-runtime/src/test/java/org/apache/tuscany/sca/binding/ejb/tests/EJBReferenceTestCase.java b/branches/sca-equinox/modules/binding-ejb-runtime/src/test/java/org/apache/tuscany/sca/binding/ejb/tests/EJBReferenceTestCase.java index 82471acb16..87616330dc 100644 --- a/branches/sca-equinox/modules/binding-ejb-runtime/src/test/java/org/apache/tuscany/sca/binding/ejb/tests/EJBReferenceTestCase.java +++ b/branches/sca-equinox/modules/binding-ejb-runtime/src/test/java/org/apache/tuscany/sca/binding/ejb/tests/EJBReferenceTestCase.java @@ -20,7 +20,10 @@ package org.apache.tuscany.sca.binding.ejb.tests; import junit.framework.TestCase; -import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; import account.Customer; @@ -31,7 +34,7 @@ import account.Customer; */ public class EJBReferenceTestCase extends TestCase { private static final int MOCK_PORT = 8085; - private SCADomain scaDomain; + private Node node; @Override protected void setUp() throws Exception { @@ -39,7 +42,9 @@ public class EJBReferenceTestCase extends TestCase { System.setProperty("java.naming.provider.url", "ejbd://localhost:" + MOCK_PORT); System.setProperty("managed", "false"); - scaDomain = SCADomain.newInstance("account/account.composite"); + String contribution = ContributionLocationHelper.getContributionLocation(EJBReferenceTestCase.class); + node = NodeFactory.newInstance().createNode("account/account.composite", new Contribution("account", contribution)); + node.start(); // To capture the network traffic for the MockServer, uncomment the next line // new Thread(new SocketTracer(MOCK_PORT, OPENEJB_PORT)).start(); @@ -53,11 +58,12 @@ public class EJBReferenceTestCase extends TestCase { @Override protected void tearDown() throws Exception { - scaDomain.close(); + node.stop(); + node.destroy(); } public void testCalculator() throws Exception { - Customer customer = scaDomain.getService(Customer.class, "CustomerComponent"); + Customer customer = node.getService(Customer.class, "CustomerComponent"); // This is one of the customer numbers in bank application running on Geronimo String accountNo = "1234567890"; Double balance = customer.depositAmount(accountNo, new Double(100)); |