From efe3363a815a777ecd283928900404dea84a7e1f Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Thu, 9 Oct 2008 06:33:54 +0000 Subject: 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 --- branches/sca-equinox/modules/binding-ejb-runtime/pom.xml | 2 +- .../sca/binding/ejb/tests/EJBReferenceTestCase.java | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'branches/sca-equinox/modules/binding-ejb-runtime') diff --git a/branches/sca-equinox/modules/binding-ejb-runtime/pom.xml b/branches/sca-equinox/modules/binding-ejb-runtime/pom.xml index c89585c95c..936c588788 100644 --- a/branches/sca-equinox/modules/binding-ejb-runtime/pom.xml +++ b/branches/sca-equinox/modules/binding-ejb-runtime/pom.xml @@ -73,7 +73,7 @@ org.apache.tuscany.sca - tuscany-host-embedded + tuscany-node-impl 1.4-SNAPSHOT test 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)); -- cgit v1.2.3