Author: lresende
Date: Fri Mar 28 13:13:23 2008
New Revision: 642361
URL: http://svn.apache.org/viewvc?rev=642361&view=rev
Log:
TUSCANY-2127 and TUSCANY-2150 - Fixes around dependency and proper
initialization of JMS broker
Modified:
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/pom.xml
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/pom.xml
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
Modified:
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/pom.xml?rev=642361&r1=642360&r2=642361&view=diff
==============================================================================
---
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/pom.xml
(original)
+++
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/pom.xml
Fri Mar 28 13:13:23 2008
@@ -39,16 +39,23 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-host-embedded</artifactId>
- <version>1.2-incubating-SNAPSHOT</version>
+ <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>
</dependency>
-
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <version>1.2-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-binding-jms</artifactId>
Modified:
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java?rev=642361&r1=642360&r2=642361&view=diff
==============================================================================
---
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java
(original)
+++
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-reference-jms/src/main/java/helloworld/HelloWorldJmsClient.java
Fri Mar 28 13:13:23 2008
@@ -19,8 +19,6 @@
package helloworld;
import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
/**
* This client program shows how to create an SCA runtime, start it,
@@ -29,15 +27,12 @@
public class HelloWorldJmsClient {
public final static void main(String[] args) throws Exception {
- SCANode node =
SCANodeFactory.createNodeWithComposite("helloworldjmsreference.composite");
- HelloWorldService helloWorldService =
node.getDomain().getService(HelloWorldService.class,
"HelloWorldServiceComponent");
-
- //SCADomain scaDomain =
SCADomain.newInstance("helloworldjmsreference.composite");
- //HelloWorldService helloWorldService =
scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent");
+ SCADomain scaDomain =
SCADomain.newInstance("helloworldjmsreference.composite");
+ HelloWorldService helloWorldService =
scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent");
String value = helloWorldService.getGreetings("World");
System.out.println(value);
- node.destroy();
+ scaDomain.close();
}
}
Modified:
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/pom.xml?rev=642361&r1=642360&r2=642361&view=diff
==============================================================================
---
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/pom.xml
(original)
+++
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/pom.xml
Fri Mar 28 13:13:23 2008
@@ -38,7 +38,7 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-jetty</artifactId>
+ <artifactId>tuscany-sca-api</artifactId>
<version>1.2-incubating-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
@@ -47,7 +47,7 @@
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-host-embedded</artifactId>
<version>1.2-incubating-SNAPSHOT</version>
- <scope>compile</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
@@ -63,7 +63,21 @@
<version>1.2-incubating-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
-
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms</artifactId>
+ <version>1.2-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>apache-activemq</artifactId>
+ <version>4.1.1</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Modified:
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java?rev=642361&r1=642360&r2=642361&view=diff
==============================================================================
---
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
(original)
+++
incubator/tuscany/branches/sca-java-1.2/samples/helloworld-service-jms/src/main/java/helloworld/HelloWorldServer.java
Fri Mar 28 13:13:23 2008
@@ -20,6 +20,7 @@
import java.io.IOException;
+import org.apache.activemq.broker.BrokerService;
import org.apache.tuscany.sca.host.embedded.SCADomain;
/**
@@ -29,19 +30,31 @@
public class HelloWorldServer {
public static void main(String[] args) {
+ SCADomain scaDomain = null;
+ try {
+ BrokerService broker = new BrokerService();
+ broker.setPersistent(false);
+ broker.setUseJmx(false);
+ broker.addConnector("tcp://localhost:61619");
+ broker.start();
- // ActiveMQModuleActivator.startBroker();
- SCADomain scaDomain =
SCADomain.newInstance("helloworldjmsservice.composite");
+ // ActiveMQModuleActivator.startBroker();
+ scaDomain =
SCADomain.newInstance("helloworldjmsservice.composite");
- try {
- System.out.println("HelloWorld server started (press enter to
shutdown)");
- System.in.read();
- } catch (IOException e) {
- e.printStackTrace();
- }
+ try {
+ System.out
+ .println("HelloWorld server
started (press enter to shutdown)");
+ System.in.read();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
scaDomain.close();
System.out.println("HelloWorld server stopped");
+
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]