Author: gatfora
Date: Wed Feb  7 03:23:30 2007
New Revision: 504506

URL: http://svn.apache.org/viewvc?view=rev&rev=504506
Log:
Add better error reporting when failing to send a TerminateResponse, add the 
logging to RMDBean for ServerCompletedMsgs

Modified:
    
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
    
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
    
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/beans/RMDBean.java

Modified: 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties?view=diff&rev=504506&r1=504505&r2=504506
==============================================================================
--- 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
 (original)
+++ 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/i18n/resource.properties
 Wed Feb  7 03:23:30 2007
@@ -128,7 +128,7 @@
 couldNotSendTerminate=Could not send the terminate message due to error {0}.
 couldNotSendClose=Could not send the close sequence message due to error {0}.
 couldNotSendAck=Could not send the ack message on sequence {0} due to an 
exception: {1}
-couldNotSendTerminateResponse=Could not send the terminate sequence response 
due to exception {0}.
+couldNotSendTerminateResponse=Could not send the terminate sequence response.  
Check linked exception for details.
 couldNotSendCloseResponse=Could not send the CloseSequenceResponse due to 
exception {0}.
 couldNotSendTerminateSeqNotFound=Internal sequenceID {0} was not found: cannot 
send the terminate message.
 couldNotSendCloseSeqNotFound=Internal sequenceID {0} was not found: cannot 
send the CloseSequence message.
@@ -308,4 +308,4 @@
 
 createSequenceRefused=The Create Sequence request has been refused by the RM 
Destination
 referencedMessageNotFound = Reference message is not present for the sequence 
with property key {0}
-messageNumberRollover=The maximum value for wsrm:MessageNumber has been 
exceeded.
\ No newline at end of file
+messageNumberRollover=The maximum value for wsrm:MessageNumber has been 
exceeded.

Modified: 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java?view=diff&rev=504506&r1=504505&r2=504506
==============================================================================
--- 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
 (original)
+++ 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java
 Wed Feb  7 03:23:30 2007
@@ -141,9 +141,6 @@
                        
TerminateManager.cleanReceivingSideOnTerminateMessage(context, sequenceId, 
storageManager);
                } else
                        
TerminateManager.cleanReceivingSideOnTerminateMessage(context, sequenceId, 
storageManager);
-               
-
-               
 
                rmdBean.setTerminated(true);            
                rmdBean.setLastActivatedTime(System.currentTimeMillis());
@@ -161,8 +158,16 @@
                                                
                        outMessage.setServerSide(true);
                                                
-                       engine.send(outMessage);
-
+                       try {                                                   
+                               engine.send(outMessage);
+                       } catch (AxisFault e) {
+                               if (log.isDebugEnabled())
+                                       log.debug("Unable to send terminate 
sequence response", e);
+                               
+                               throw new SandeshaException(
+                                               
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendTerminateResponse),
 e);
+                       }
+                       
                        if (toEPR.hasAnonymousAddress()) {
                                
terminateSeqMsg.getOperationContext().setProperty(
                                                
org.apache.axis2.Constants.RESPONSE_WRITTEN, "true");
@@ -204,7 +209,15 @@
                                        
terminateSeqMsg.getOperationContext().setProperty(
                                                        
org.apache.axis2.Constants.RESPONSE_WRITTEN, "true");
                                        AxisEngine engine = new 
AxisEngine(context);
-                                       engine.send(message);
+                                       try {                                   
                
+                                               engine.send(message);
+                                       } catch (AxisFault e) {
+                                               if (log.isDebugEnabled())
+                                                       log.debug("Unable to 
send terminate sequence response", e);
+                                               
+                                               throw new SandeshaException(
+                                                               
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendTerminateResponse),
 e);
+                                       }
                                        
                                        
MessageRetransmissionAdjuster.adjustRetransmittion(rmMessage, 
outgoingSideTerminateBean, context, storageManager);
                                }

Modified: 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/beans/RMDBean.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/beans/RMDBean.java?view=diff&rev=504506&r1=504505&r2=504506
==============================================================================
--- 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/beans/RMDBean.java
 (original)
+++ 
webservices/sandesha/trunk/java/src/org/apache/sandesha2/storage/beans/RMDBean.java
 Wed Feb  7 03:23:30 2007
@@ -167,6 +167,7 @@
                result.append("\nHishestInMessageKey: "); 
result.append(highestInMessageId);
                result.append("\nLastInMessageId: "); 
result.append(lastInMessageId);
                result.append("\nOutOfOrderRanges   :"); 
result.append(outOfOrderRanges);
+               result.append("\nServerCompletedMsgs:"); 
result.append(serverCompletedMessages);
                return result.toString();
        }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to