ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatf...@apache.org
Subject svn commit: r706546 - /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java
Date Tue, 21 Oct 2008 07:53:46 GMT
Author: gatfora
Date: Tue Oct 21 00:53:46 2008
New Revision: 706546

URL: http://svn.apache.org/viewvc?rev=706546&view=rev
Log:
Don't bother to notifyClientsOfFault for ACK and MakeConnection messages as the AxisOperations
won't have anything registered with them

Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java?rev=706546&r1=706545&r2=706546&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java
(original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/FaultManager.java
Tue Oct 21 00:53:46 2008
@@ -269,8 +269,6 @@
 			data.setCode(SOAP11Constants.FAULT_CODE_SENDER);
 		else
 			data.setCode(SOAP12Constants.FAULT_CODE_SENDER);
-		
-		System.out.println("makingInvalidAck piggy=" + piggybackedMessage + ": soap=" + SOAPVersion);
 
 		data.setType(Sandesha2Constants.SOAPFaults.FaultType.INVALID_ACKNOWLEDGEMENT);
 		data.setSubcode(SpecSpecificConstants.getFaultSubcode(rmMsgCtx.getRMNamespaceValue(), 
@@ -546,6 +544,7 @@
 
 		if (log.isDebugEnabled())
 			log.debug("Enter: FaultManager::getOrSendFault: " + referenceRMMsgContext + "," + data
+ "," + throwable + "," + acksToEPR);
+			
 		SOAPFactory factory = (SOAPFactory) referenceRMMsgContext.getSOAPEnvelope().getOMFactory();
 		
 		SOAPFaultCode faultCode = factory.createSOAPFaultCode();
@@ -652,8 +651,6 @@
 		if (log.isDebugEnabled())
 			log.debug("Exit: FaultManager::getOrSendFault");
 	}
-	
-
 
 	public static boolean isRMFault (String faultSubcodeValue) {
 		if (faultSubcodeValue==null)
@@ -1051,34 +1048,37 @@
 		while (iterator.hasNext()) {
 			SenderBean tempBean = (SenderBean) iterator.next();
 
-			String messageStoreKey = tempBean.getMessageContextRefKey();
-			
-			// Retrieve the message context.
-			MessageContext context = storageManager.retrieveMessageContext(messageStoreKey, configCtx);
-			
-			AxisOperation axisOperation = context.getAxisOperation();
-			if (axisOperation != null) {
+			if (tempBean.getMessageType() != Sandesha2Constants.MessageTypes.MAKE_CONNECTION_MSG &&
+				tempBean.getMessageType() != Sandesha2Constants.MessageTypes.ACK) {
+				String messageStoreKey = tempBean.getMessageContextRefKey();
 				
-				MessageReceiver msgReceiver = axisOperation.getMessageReceiver();
-				if ((msgReceiver != null) && (msgReceiver instanceof CallbackReceiver)) {
+				// Retrieve the message context.
+				MessageContext context = storageManager.retrieveMessageContext(messageStoreKey, configCtx);
+				
+				AxisOperation axisOperation = context.getAxisOperation();
+				if (axisOperation != null) {
 					
-					Object callback = ((CallbackReceiver)msgReceiver).lookupCallback(context.getMessageID());
-					if (callback instanceof Callback) {
-						try {
-							((CallbackReceiver)msgReceiver).addCallback(context.getMessageID(),(Callback)callback);
-						} catch (AxisFault axisFault) {
-							throw new SandeshaException(axisFault);
-						}
+					MessageReceiver msgReceiver = axisOperation.getMessageReceiver();
+					if ((msgReceiver != null) && (msgReceiver instanceof CallbackReceiver)) {
 						
-					((Callback)callback).onError(fault);
-					} else if(callback instanceof AxisCallback) {
-						try {
-							((CallbackReceiver)msgReceiver).addCallback(context.getMessageID(),(AxisCallback)callback);
-						} catch (AxisFault axisFault) {
-							throw new SandeshaException(axisFault);
+						Object callback = ((CallbackReceiver)msgReceiver).lookupCallback(context.getMessageID());
+						if (callback instanceof Callback) {
+							try {
+								((CallbackReceiver)msgReceiver).addCallback(context.getMessageID(),(Callback)callback);
+							} catch (AxisFault axisFault) {
+								throw new SandeshaException(axisFault);
+							}
+							
+						((Callback)callback).onError(fault);
+						} else if(callback instanceof AxisCallback) {
+							try {
+								((CallbackReceiver)msgReceiver).addCallback(context.getMessageID(),(AxisCallback)callback);
+							} catch (AxisFault axisFault) {
+								throw new SandeshaException(axisFault);
+							}
+							
+							((AxisCallback)callback).onError(fault);
 						}
-						
-						((AxisCallback)callback).onError(fault);
 					}
 				}
 			}



---------------------------------------------------------------------
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