ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamik...@apache.org
Subject svn commit: r372807 - in /webservices/sandesha/trunk/src/org/apache/sandesha2: handlers/SandeshaOutHandler.java msgprocessors/AcknowledgementProcessor.java msgprocessors/ApplicationMsgProcessor.java workers/Sender.java
Date Fri, 27 Jan 2006 10:40:53 GMT
Author: chamikara
Date: Fri Jan 27 02:39:55 2006
New Revision: 372807

URL: http://svn.apache.org/viewcvs?rev=372807&view=rev
Log:
Had to avaoid sending messages through the Sandesha2transportsender due to a bug (probably
in axis2). Will add those again after figuring out the reason.

Modified:
    webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java?rev=372807&r1=372806&r2=372807&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/handlers/SandeshaOutHandler.java Fri
Jan 27 02:39:55 2006
@@ -385,7 +385,7 @@
 
 		//cannot pause since the message have to be saved at the sender
 		//pausing the message
-		//msgCtx.pause();
+		msgCtx.pause();
 		
 		responseProcessTransaction.commit();
 	}
@@ -461,14 +461,15 @@
 				.getRetransmitterBeanMgr();
 
 		String key = SandeshaUtil.getUUID();
-
+		storageManager.storeMessageContext(key,createSeqMsg);
+		
 		SenderBean createSeqEntry = new SenderBean();
 		createSeqEntry.setMessageContextRefKey(key);
 		createSeqEntry.setTimeToSend(System.currentTimeMillis());
 		createSeqEntry.setMessageID(createSeqRMMessage.getMessageId());
 		
 		//this will be set to true in the sender
-		createSeqEntry.setSend(false);
+		createSeqEntry.setSend(true);
 		createSeqEntry.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ); 
 		retransmitterMgr.insert(createSeqEntry);
 		createSeqTransaction.commit();
@@ -488,14 +489,16 @@
 		createSeqMsg.setProperty(Sandesha2Constants.MESSAGE_STORE_KEY,key);
 		
 		//setting the sandesha2 sender as the sender.
-		createSeqMsg.getTransportOut().setSender(sender);
+		//createSeqMsg.getTransportOut().setSender(sender);
+		
+//		try {
+//			log.info ("Sending create seq msg...");
+//			engine.send(createSeqMsg);
+//		} catch (AxisFault e) {
+//			throw new SandeshaException (e.getMessage());
+//		}
+		
 		
-		try {
-			log.info ("Sending create seq msg...");
-			engine.send(createSeqMsg);
-		} catch (AxisFault e) {
-			throw new SandeshaException (e.getMessage());
-		}
 		
 	}
 
@@ -685,6 +688,7 @@
 //		String key = storageManager
 //				.storeMessageContext(rmMsg.getMessageContext());
 		String storageKey = SandeshaUtil.getUUID();
+		storageManager.storeMessageContext(storageKey,msg); 
 		
 		appMsgEntry.setMessageContextRefKey(storageKey);
 		
@@ -717,7 +721,7 @@
 			msg.setProperty(Sandesha2Constants.MESSAGE_STORE_KEY,storageKey);
 			//sandesha2Sender.setMessageStoreKey(storageKey);
 			
-			msg.getTransportOut().setSender(sandesha2Sender);
+			//msg.getTransportOut().setSender(sandesha2Sender);
 			msg.setProperty(Sandesha2Constants.ORIGINAL_TRANSPORT_SENDER,sender);
 		}
 		

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=372807&r1=372806&r2=372807&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java
Fri Jan 27 02:39:55 2006
@@ -304,7 +304,7 @@
 		terminateBean.setMessageContextRefKey(key);
 
 		
-		
+		storageManager.storeMessageContext(key,terminateRMMessage.getMessageContext());
 
 		
 		//Set a retransmitter lastSentTime so that terminate will be send with
@@ -317,7 +317,7 @@
 		terminateBean.setMessageID(terminateRMMessage.getMessageId());
 		
 		//this will be set to true at the sender.
-		terminateBean.setSend(false);
+		terminateBean.setSend(true);
 		terminateBean.setReSend(false);
 
 		SenderBeanMgr retramsmitterMgr = storageManager
@@ -343,14 +343,14 @@
 		
 		terminateRMMessage.setProperty(Sandesha2Constants.SET_SEND_TO_TRUE,Sandesha2Constants.VALUE_TRUE);
 		
-		transportOut.setSender(sandesha2Sender);
+		//transportOut.setSender(sandesha2Sender);
 		
 	    AxisEngine engine = new AxisEngine (incomingAckRMMsg.getMessageContext().getConfigurationContext());
-	    try {
-			engine.send(terminateRMMessage.getMessageContext());
-		} catch (AxisFault e) {
-			throw new SandeshaException (e.getMessage());
-		}
+//	    try {
+//			engine.send(terminateRMMessage.getMessageContext());
+//		} catch (AxisFault e) {
+//			throw new SandeshaException (e.getMessage());
+//		}
 	    
 	}
 	

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=372807&r1=372806&r2=372807&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
Fri Jan 27 02:39:55 2006
@@ -397,7 +397,7 @@
 			String key = SandeshaUtil.getUUID();
 			
 			//dumping to the storage will be done be Sandesha2 Transport Sender
-			//storageManager.storeMessageContext(key,ackMsgCtx);
+			storageManager.storeMessageContext(key,ackMsgCtx);
 			
 			SenderBean ackBean = new SenderBean();
 			ackBean.setMessageContextRefKey(key);
@@ -405,7 +405,7 @@
 			ackBean.setReSend(false);
 			
 			//this will be set to true in the sender.
-			ackBean.setSend(false);
+			ackBean.setSend(true);
 			ackBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
 			
 			//the internalSequenceId value of the retransmitter Table for the
@@ -470,14 +470,14 @@
 			ackMsgCtx.setProperty(Sandesha2Constants.MESSAGE_STORE_KEY,key);
 			//sandesha2Sender.setMessageStoreKey(key);
 			
-			transportOut.setSender(sandesha2Sender);
+			//transportOut.setSender(sandesha2Sender);
 			
 			AxisEngine engine = new AxisEngine (configCtx);
-			try {
-				engine.send(ackMsgCtx);
-			} catch (AxisFault e) {
-				throw new SandeshaException (e.getMessage());
-			}
+//			try {
+//				engine.send(ackMsgCtx);
+//			} catch (AxisFault e) {
+//				throw new SandeshaException (e.getMessage());
+//			}
 			
 			SandeshaUtil.startSenderForTheSequence(configCtx,sequenceId);
 		}

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java?rev=372807&r1=372806&r2=372807&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/workers/Sender.java Fri Jan 27 02:39:55
2006
@@ -128,10 +128,10 @@
 					//But it will set if it is not set (null)
 					
 					//This is used to make sure that the mesage get passed the Sandesha2TransportSender.
-					String qualifiedForSending = (String) msgCtx.getProperty(Sandesha2Constants.QUALIFIED_FOR_SENDING);
-					if (qualifiedForSending!=null && !qualifiedForSending.equals(Sandesha2Constants.VALUE_TRUE))
{
-						continue;
-					}
+//					String qualifiedForSending = (String) msgCtx.getProperty(Sandesha2Constants.QUALIFIED_FOR_SENDING);
+//					if (qualifiedForSending!=null && !qualifiedForSending.equals(Sandesha2Constants.VALUE_TRUE))
{
+//						continue;
+//					}
 					
 					try {
 



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message