You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2011/08/29 21:02:19 UTC
svn commit: r1162946 - in
/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya:
interpretor/WorkflowInterpretorEventListener.java
jython/lib/NotificationSender.java monitor/WsmgClient.java
Author: lahiru
Date: Mon Aug 29 19:02:19 2011
New Revision: 1162946
URL: http://svn.apache.org/viewvc?rev=1162946&view=rev
Log:
fixing xbaya notification implementation.
Modified:
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java?rev=1162946&r1=1162945&r2=1162946&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java Mon Aug 29 19:02:19 2011
@@ -101,14 +101,12 @@ public class WorkflowInterpretorEventLis
try {
if (this.pullMode) {
EndpointReference messageBoxEPR = this.wseClient.createPullMsgBox(this.messageBoxURL.toString());
- this.subscriptionID = this.wseClient.subscribe(this.brokerURL.toString(), messageBoxEPR.getAddress(),
- this.topic);
+ this.subscriptionID = this.wseClient.subscribe(messageBoxEPR.getAddress(),
+ this.topic,null);
this.messagePuller = this.wseClient.startPullingEventsFromMsgBox(messageBoxEPR, this, 1000L,20000L);
} else {
String[] endpoints = this.wseClient.startConsumerService(2222,this);
- URL consumerUrl = new URL(endpoints[0]);
- this.subscriptionID = this.wseClient.subscribe(this.brokerURL.toString(), consumerUrl.getHost() + ":"
- + consumerUrl.getPort(), this.topic);
+ this.subscriptionID = this.wseClient.subscribe(endpoints[0], this.topic,null);
}
} catch (IOException e) {
throw new MonitorException("Failed to subscribe.", e);
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java?rev=1162946&r1=1162945&r2=1162946&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java Mon Aug 29 19:02:19 2011
@@ -81,7 +81,6 @@ public class NotificationSender {
this.topic = topic;
this.brokerURL = brokerURL;
this.workflowID = URI.create(StringUtil.convertToJavaIdentifier(this.topic));
- //todo have to remove the xsul dependency completely
this.eventSink = new EndpointReference(this.brokerURL);
Properties props = new Properties();
@@ -90,7 +89,7 @@ public class NotificationSender {
URI initiatorServiceID = URI.create("XBaya");
String initiatorWorkflowNodeID = null;
Integer initiatorWorkflowTimeStep = null;
- context = this.notifier.createTrackingContext(props,eventSink,initiatorWorkflowID,
+ this.context = this.notifier.createTrackingContext(props,eventSink,initiatorWorkflowID,
initiatorServiceID,initiatorWorkflowNodeID,initiatorWorkflowTimeStep);
this.initiator = this.notifier.createEntity(initiatorWorkflowID, initiatorServiceID, initiatorWorkflowNodeID,
initiatorWorkflowTimeStep);
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java?rev=1162946&r1=1162945&r2=1162946&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java Mon Aug 29 19:02:19 2011
@@ -31,8 +31,10 @@ import org.apache.airavata.wsmg.client.M
import org.apache.airavata.wsmg.client.NotificationHandler;
import org.apache.airavata.wsmg.client.WseMsgBrokerClient;
import org.apache.airavata.wsmg.client.msgbox.MessagePuller;
+import org.apache.airavata.wsmg.msgbox.client.MsgBoxClient;
import org.apache.airavata.xbaya.util.XMLUtil;
import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axis2.addressing.EndpointReference;
import org.xmlpull.infoset.XmlElement;
import xsul5.MLogger;
@@ -87,15 +89,13 @@ public class WsmgClient implements Consu
public synchronized void subscribe() throws MonitorException {
try {
if (this.pullMode) {
- org.apache.axis2.addressing.EndpointReference messageBoxEPR = this.wseClient.createPullMsgBox(this.messageBoxURL.toString());
- this.subscriptionID = this.wseClient.subscribe(this.brokerURL.toString(), messageBoxEPR.toString(),
- this.topic);
+ EndpointReference messageBoxEPR = this.wseClient.createPullMsgBox(this.messageBoxURL.toString());
+ this.subscriptionID = this.wseClient.subscribe(messageBoxEPR.getAddress(),
+ this.topic,null);
this.messagePuller = this.wseClient.startPullingEventsFromMsgBox(messageBoxEPR, this, 1000L,20000L);
} else {
String[] endpoints = this.wseClient.startConsumerService(2222,this);
- URL consumerUrl = new URL(endpoints[0]);
- this.subscriptionID = this.wseClient.subscribe(this.brokerURL.toString(), consumerUrl.getHost() + ":"
- + consumerUrl.getPort(), this.topic);
+ this.subscriptionID = this.wseClient.subscribe(endpoints[0], this.topic,null);
}
} catch (IOException e) {
throw new MonitorException("Failed to subscribe.", e);