airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patanac...@apache.org
Subject svn commit: r1174998 - /incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/broker/BrokerServiceLifeCycle.java
Date Fri, 23 Sep 2011 20:18:47 GMT
Author: patanachai
Date: Fri Sep 23 20:18:47 2011
New Revision: 1174998

URL: http://svn.apache.org/viewvc?rev=1174998&view=rev
Log:
AIRAVATA-101 add queue initialization

Modified:
    incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/broker/BrokerServiceLifeCycle.java

Modified: incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/broker/BrokerServiceLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/broker/BrokerServiceLifeCycle.java?rev=1174998&r1=1174997&r2=1174998&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/broker/BrokerServiceLifeCycle.java
(original)
+++ incubator/airavata/trunk/modules/ws-messenger/messagebroker/src/main/java/org/apache/airavata/wsmg/broker/BrokerServiceLifeCycle.java
Fri Sep 23 20:18:47 2011
@@ -29,7 +29,6 @@ import org.apache.airavata.wsmg.commons.
 import org.apache.airavata.wsmg.commons.config.ConfigurationManager;
 import org.apache.airavata.wsmg.commons.storage.WsmgInMemoryStorage;
 import org.apache.airavata.wsmg.commons.storage.WsmgPersistantStorage;
-import org.apache.airavata.wsmg.commons.storage.WsmgStorage;
 import org.apache.airavata.wsmg.commons.util.Axis2Utils;
 import org.apache.airavata.wsmg.config.WSMGParameter;
 import org.apache.airavata.wsmg.config.WsmgConfigurationContext;
@@ -91,20 +90,22 @@ public class BrokerServiceLifeCycle impl
         /*
          * Determine Storage
          */
-        WsmgStorage storage = null;
-
         if (WsmgCommonConstants.STORAGE_TYPE_IN_MEMORY.equalsIgnoreCase(type)) {
-            storage = new WsmgInMemoryStorage();
+            WsmgInMemoryStorage inmem = new WsmgInMemoryStorage();
+
+            wsmgConfig.setStorage(inmem);
+            wsmgConfig.setQueue(inmem);
+            wsmgConfig.setSubscriptionManager(new SubscriptionManager(wsmgConfig, inmem));
+            
         } else {
             String jdbcUrl = configMan.getConfig(WsmgCommonConstants.CONFIG_JDBC_URL);
             String jdbcDriver = configMan.getConfig(WsmgCommonConstants.CONFIG_JDBC_DRIVER);
-            storage = new WsmgPersistantStorage(jdbcUrl, jdbcDriver);
-        }
-
-        wsmgConfig.setStorage(storage);
-
-        SubscriptionManager subManager = new SubscriptionManager(wsmgConfig, storage);
-        wsmgConfig.setSubscriptionManager(subManager);
+            WsmgPersistantStorage persis = new WsmgPersistantStorage(jdbcUrl, jdbcDriver);
+            
+            wsmgConfig.setStorage(persis);
+            wsmgConfig.setQueue(persis);
+            wsmgConfig.setSubscriptionManager(new SubscriptionManager(wsmgConfig, persis));
+        }                
 
         NotificationProcessor notificatonProcessor = new NotificationProcessor(wsmgConfig);
         wsmgConfig.setNotificationProcessor(notificatonProcessor);



Mime
View raw message