airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1163648 - in /incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking: AbstractNotifier.java common/WorkflowTrackingContext.java
Date Wed, 31 Aug 2011 14:39:59 GMT
Author: lahiru
Date: Wed Aug 31 14:39:59 2011
New Revision: 1163648

URL: http://svn.apache.org/viewvc?rev=1163648&view=rev
Log:
fixing workflow tracking bug.

Modified:
    incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/AbstractNotifier.java
    incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/common/WorkflowTrackingContext.java

Modified: incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/AbstractNotifier.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/AbstractNotifier.java?rev=1163648&r1=1163647&r2=1163648&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/AbstractNotifier.java
(original)
+++ incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/AbstractNotifier.java
Wed Aug 31 14:39:59 2011
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.workflow.tracking;
 
+import java.io.IOException;
 import java.net.URI;
 import java.util.Calendar;
 import java.util.Date;
@@ -129,17 +130,17 @@ public abstract class AbstractNotifier {
             String[] descriptionAndAnnotation, String defaultDesc) {
         BaseNotificationType xmlMessage = XmlBeanUtils.extractBaseNotificationType(xmldata);
         NotificationPublisher publisher = publishermap.get(context.getBrokerEpr());
+        try {
         if (publisher == null) {
             // if a publisher class name has been defined to override the default WSM publisher,
use it
             if (context.getPublisherImpl() != null) {
                 publisher = PublisherFactory.createSomePublisher(context.getPublisherImpl(),
context);
             } else {
-                publisher = new WSMPublisher(100, context.isEnableAsyncPublishing(), context.getBrokerEpr());
+                publisher = new WSMPublisher(100, context.isEnableAsyncPublishing(), context.getBrokerEpr().getAddress(),context.getTopic());
             }
             publishermap.put(context.getBrokerEpr(), publisher);
         }
 
-        try {
             setIDAndTimestamp(context, xmlMessage, context.getMyself(), activityTimestamp
!= null ? activityTimestamp
                     : new Date());
             setDescAndAnno(context, xmlMessage, descriptionAndAnnotation, defaultDesc);
@@ -150,6 +151,8 @@ public abstract class AbstractNotifier {
             publisher.publish(xmldata);
         } catch (RuntimeException e) {
             throw new WorkflowTrackingException(e);
+        } catch (IOException e){
+            throw new WorkflowTrackingException(e);
         }
     }
 

Modified: incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/common/WorkflowTrackingContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/common/WorkflowTrackingContext.java?rev=1163648&r1=1163647&r2=1163648&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/common/WorkflowTrackingContext.java
(original)
+++ incubator/airavata/trunk/modules/commons/workflow-tracking/src/main/java/org/apache/airavata/workflow/tracking/common/WorkflowTrackingContext.java
Wed Aug 31 14:39:59 2011
@@ -31,6 +31,7 @@ public class WorkflowTrackingContext {
     private InvocationEntity myself;
     private String publisherImpl;
     private boolean enableAsyncPublishing;
+    private String topic;
 
     public void setGlobalAnnotations(Properties globalAnnotations) {
         StringBuffer buf = new StringBuffer();
@@ -62,7 +63,13 @@ public class WorkflowTrackingContext {
     public void setBrokerEpr(EndpointReference brokerEpr) {
         this.brokerEpr = brokerEpr;
     }
+    public String getTopic() {
+        return topic;
+    }
 
+    public void setTopic(String topic) {
+        this.topic = topic;
+    }
     public String getPublisherImpl() {
         return publisherImpl;
     }
@@ -79,4 +86,5 @@ public class WorkflowTrackingContext {
         this.enableAsyncPublishing = enableAsyncPublishing;
     }
 
+
 }



Mime
View raw message