[jboss-svn-commits] JBL Code SVN: r23495 - labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 17 08:09:36 EDT 2008


Author: adinn
Date: 2008-10-17 08:09:36 -0400 (Fri, 17 Oct 2008)
New Revision: 23495

Modified:
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java
Log:
added some missing message dispatches as per spec state tables

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java	2008-10-17 12:07:21 UTC (rev 23494)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/CoordinatorCompletionCoordinatorProcessorImpl.java	2008-10-17 12:09:36 UTC (rev 23495)
@@ -188,8 +188,8 @@
       * @param addressingProperties The addressing context.
       * @param arjunaContext The arjuna context.
       *
-      * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_1] - Unexpected exception thrown from compensated:
-      * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2] - Compensated called on unknown coordinator: {0}
+      * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_1] - Unexpected exception thrown from failed:
+      * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2] - Failed called on unknown coordinator: {0}
       */
      public void fail(final ExceptionType fail, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
      {
@@ -213,6 +213,7 @@
          else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
          {
              WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.fail_2", new Object[] {instanceIdentifier}) ;
+             sendFailed(addressingProperties, arjunaContext) ;
          }
      }
     
@@ -295,8 +296,8 @@
      * @param addressingProperties The addressing context.
      * @param arjunaContext The arjuna context.
      *
-     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_1] - Unexpected exception thrown from fault:
-     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2] - Fault called on unknown coordinator: {0}
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_1] - Unexpected exception thrown from cannotComplete:
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2] - cannotComplete called on unknown coordinator: {0}
      */
     public void cannotComplete(final NotificationType cannotComplete, final AddressingProperties addressingProperties,
         final ArjunaContext arjunaContext)
@@ -324,7 +325,7 @@
             {
                 WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.cannotComplete_2", new Object[] {instanceIdentifier}) ;
             }
-            sendFailed(addressingProperties, arjunaContext) ;
+            sendNotCompleted(addressingProperties, arjunaContext) ;
         }
     }
 
@@ -486,4 +487,32 @@
             }
         }
     }
+
+    /**
+     * Send a not completed message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendNotCompleted_1 [com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingContext = AddressingHelper.createOneWayResponseContext(addressingProperties, messageId) ;
+
+        try
+        {
+            // supply null endpoint so that addressing properties are used to deliver message
+            CoordinatorCompletionParticipantClient.getClient().sendNotCompleted(null, responseAddressingContext, arjunaContext.getInstanceIdentifier()); ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.CoordinatorCompletionCoordinatorProcessorImpl.sendNotCompleted_1", th) ;
+            }
+        }
+    }
 }
\ No newline at end of file

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java	2008-10-17 12:07:21 UTC (rev 23494)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/ParticipantCompletionCoordinatorProcessorImpl.java	2008-10-17 12:09:36 UTC (rev 23495)
@@ -249,6 +249,7 @@
         else if (WSTLogger.arjLoggerI18N.isDebugEnabled())
         {
             WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.completed_2", new Object[] {instanceIdentifier}) ;
+            sendNotCompleted(addressingProperties, arjunaContext) ;
         }
     }
 
@@ -485,4 +486,31 @@
             }
         }
     }
+
+    /**
+     * Send a not completed message.
+     *
+     * @param addressingProperties The addressing context.
+     * @param arjunaContext The arjuna context.
+     *
+     * @message com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendNotCompleted_1 [com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendNotCompleted_1] - Unexpected exception while sending NotCompleted
+     */
+    private void sendNotCompleted(final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
+    {
+        // KEV add check for recovery
+        final String messageId = MessageId.getMessageId() ;
+        final AddressingProperties responseAddressingProperties = AddressingHelper.createOneWayResponseContext(addressingProperties, messageId) ;
+        try
+        {
+            // supply null endpoint so that addressing properties are used to deliver message
+            ParticipantCompletionParticipantClient.getClient().sendNotCompleted(null, responseAddressingProperties, arjunaContext.getInstanceIdentifier()); ;
+        }
+        catch (final Throwable th)
+        {
+            if (WSTLogger.arjLoggerI18N.isDebugEnabled())
+            {
+                WSTLogger.arjLoggerI18N.debug("com.arjuna.wst11.messaging.ParticipantCompletionCoordinatorProcessorImpl.sendNotCompleted_1", th) ;
+            }
+        }
+    }
 }
\ No newline at end of file




More information about the jboss-svn-commits mailing list