Author: antelder
Date: Tue Feb 19 01:26:09 2008
New Revision: 629046

URL: http://svn.apache.org/viewvc?rev=629046&view=rev
Log:
Update to start an embedded broker

Modified:
    incubator/tuscany/java/sca/samples/helloworld-reference-jms/pom.xml
    
incubator/tuscany/java/sca/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java

Modified: incubator/tuscany/java/sca/samples/helloworld-reference-jms/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-reference-jms/pom.xml?rev=629046&r1=629045&r2=629046&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-reference-jms/pom.xml 
(original)
+++ incubator/tuscany/java/sca/samples/helloworld-reference-jms/pom.xml Tue Feb 
19 01:26:09 2008
@@ -44,12 +44,6 @@
         
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-node-impl</artifactId>
-            <version>1.2-incubating-SNAPSHOT</version>
-        </dependency>        
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-implementation-java-runtime</artifactId>
             <version>1.2-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
@@ -57,7 +51,7 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <artifactId>tuscany-binding-jms</artifactId>
             <version>1.2-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>

Modified: 
incubator/tuscany/java/sca/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java?rev=629046&r1=629045&r2=629046&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java
 (original)
+++ 
incubator/tuscany/java/sca/samples/helloworld-reference-jms/src/test/java/helloworld/HelloWorldJmsClientTestCase.java
 Tue Feb 19 01:26:09 2008
@@ -21,6 +21,7 @@
 
 import junit.framework.Assert;
 
+import org.apache.activemq.broker.BrokerService;
 import org.apache.tuscany.sca.host.embedded.SCADomain;
 import org.junit.After;
 import org.junit.Before;
@@ -36,11 +37,13 @@
     private HelloWorldService helloTuscanyService;
     private SCADomain scaClientDomain;
     private SCADomain scaServiceDomain;
+    private BrokerService jmsBroker;
    
 
     @Before
     public void startClient() throws Exception {
         try {
+            startBroker();
             scaServiceDomain = 
SCADomain.newInstance("helloworldjmsservice.composite");
             scaClientDomain = 
SCADomain.newInstance("helloworldjmsreference.composite");
             helloWorldService = 
scaClientDomain.getService(HelloWorldService.class, 
"HelloWorldServiceComponent");
@@ -61,8 +64,17 @@
     @After
     public void stopClient() throws Exception {
         scaServiceDomain.close();
-        // TODO - causes problems on shudown
-        //scaClientDomain.close();
+        scaClientDomain.close();
+        if (jmsBroker != null) {
+            jmsBroker.stop();
+        }
     }
 
+    protected void startBroker() throws Exception {
+        jmsBroker = new BrokerService(); 
+        jmsBroker.setPersistent(false);
+        jmsBroker.setUseJmx(false);
+        jmsBroker.addConnector("tcp://localhost:61619");
+        jmsBroker.start();
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to