summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/binding-ejb-runtime
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-09 06:33:54 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-09 06:33:54 +0000
commitefe3363a815a777ecd283928900404dea84a7e1f (patch)
tree42522fd01e6af981f8ff94663d911d56744154d5 /branches/sca-equinox/modules/binding-ejb-runtime
parentaacabe1650e380595a8d701123394d791656d17d (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')
-rw-r--r--branches/sca-equinox/modules/binding-ejb-runtime/pom.xml2
-rw-r--r--branches/sca-equinox/modules/binding-ejb-runtime/src/test/java/org/apache/tuscany/sca/binding/ejb/tests/EJBReferenceTestCase.java16
2 files changed, 12 insertions, 6 deletions
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 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>test</scope>
</dependency>
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));