airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject git commit: removing mysql credential store properties and update consumer
Date Tue, 14 Oct 2014 20:23:36 GMT
Repository: airavata
Updated Branches:
  refs/heads/master a82045d62 -> e51565195


removing mysql credential store properties and update consumer


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/e5156519
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/e5156519
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/e5156519

Branch: refs/heads/master
Commit: e515651957befb461f741be3e0214145556624ca
Parents: a82045d
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Tue Oct 14 16:23:31 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Tue Oct 14 16:23:31 2014 -0400

----------------------------------------------------------------------
 .../server/src/main/resources/airavata-server.properties     | 8 ++++----
 .../java/org/apache/airavata/messaging/core/Consumer.java    | 1 -
 .../java/org/apache/airavata/messaging/core/TestClient.java  | 5 ++++-
 .../airavata/messaging/core/impl/RabbitMQConsumer.java       | 6 ++++--
 4 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e5156519/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index d618645..878c341 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -224,10 +224,10 @@ shutdown.trategy=SELF_TERMINATE
 credential.store.keystore.url=/Users/lahirugunathilake/Downloads/airavata_sym.jks
 credential.store.keystore.alias=airavata
 credential.store.keystore.password=airavata
-credential.store.jdbc.url=jdbc:mysql://gw110.iu.xsede.org:3306/airavata_pga_prod
-credential.store.jdbc.user=
-credential.store.jdbc.password=
-credential.store.jdbc.driver=com.mysql.jdbc.Driver
+credential.store.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+credential.store.jdbc.user=airavata
+credential.store.jdbc.password=airavata
+credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
 
 notifier.enabled=false
 #period in milliseconds

http://git-wip-us.apache.org/repos/asf/airavata/blob/e5156519/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
index 9f4352a..ecd23bd 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
@@ -22,7 +22,6 @@
 package org.apache.airavata.messaging.core;
 
 import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.model.messaging.event.Message;
 
 /**
  * This is the basic consumer

http://git-wip-us.apache.org/repos/asf/airavata/blob/e5156519/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/TestClient.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/TestClient.java
b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/TestClient.java
index ed04cc8..8d4a87b 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/TestClient.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/TestClient.java
@@ -29,11 +29,12 @@ import org.apache.airavata.model.messaging.event.Message;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class TestClient {
     public static final String RABBITMQ_BROKER_URL = "rabbitmq.broker.url";
     public static final String RABBITMQ_EXCHANGE_NAME = "rabbitmq.exchange.name";
     private final static Logger logger = LoggerFactory.getLogger(TestClient.class);
-    private final static String experimentId = "echoExperiment_825d89fa-179a-4da0-ae1e-e7fa0e58bdb2";
+    private final static String experimentId = "echoExperiment_cc733586-2bf8-4ee2-8a25-6521db135e7f";
 
     public static void main(String[] args) {
         try {
@@ -44,6 +45,8 @@ public class TestClient {
             consumer.listen(new MessageHandler() {
                 @Override
                 public void onMessage(Message message) {
+                    System.out.println(" Message Received with message id '" + message.getMessageId()
+                            + "' and with message type '" + message.getMessageType());
                     System.out.println("message received: " + message);
                 }
             });

http://git-wip-us.apache.org/repos/asf/airavata/blob/e5156519/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
index ba5527e..89de2bf 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
@@ -39,7 +39,7 @@ public class RabbitMQConsumer implements Consumer {
     private String url;
     private Connection connection;
     private Channel channel;
-    private String consumerTag;
+    private String consumerTag = "hhh";
     private static Logger log = LoggerFactory.getLogger(RabbitMQConsumer.class);
     private String routingKey;
 
@@ -49,7 +49,7 @@ public class RabbitMQConsumer implements Consumer {
         this.routingKey = routingKey;
     }
 
-    public void listen(MessageHandler handler) throws AiravataException {
+    public void listen(final MessageHandler handler) throws AiravataException {
         try {
             connection = createConnection();
             channel = connection.createChannel();
@@ -58,6 +58,7 @@ public class RabbitMQConsumer implements Consumer {
             final String queueName = channel.queueDeclare().getQueue();
             channel.queueBind(queueName, exchangeName, routingKey);
 
+
             channel.basicConsume(queueName, true, consumerTag, new DefaultConsumer(channel)
{
                 @Override
                 public void handleDelivery(String consumerTag,
@@ -88,6 +89,7 @@ public class RabbitMQConsumer implements Consumer {
                             log.debug(" Message Received with message id '" + message.getMessageId()
                                     + "' and with message type '" + message.getMessageType()
+ "'  with status " + jobStatusChangeEvent.getState());
                         }
+                        handler.onMessage(message);
                     } catch (TException e) {
                         String msg = "Failed to de-serialize the thrift message, exchange:
" + exchangeName + " routingKey: " + routingKey + " queue: " + queueName;
                         log.warn(msg, e);


Mime
View raw message