[jboss-svn-commits] JBL Code SVN: r25367 - labs/jbosstm/trunk/XTS/sar/tests/dd/scripts.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Feb 20 12:15:46 EST 2009


Author: adinn
Date: 2009-02-20 12:15:46 -0500 (Fri, 20 Feb 2009)
New Revision: 25367

Added:
   labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringOnePhaseCommit.txt
Modified:
   labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringCommit.txt
   labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATHeuristicRecoveryAfterDelayedCommit.txt
   labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATParticipantCrashAndRecover.txt
   labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/BACrashDuringCommit.txt
Log:
corrected errors in some of the existing scripts and added new script which can be used with service test org.jboss.jbossts.xts.servicetests.test.at.SingleParticipantPrepareAndCommitTest

Modified: labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringCommit.txt
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringCommit.txt	2009-02-20 17:12:55 UTC (rev 25366)
+++ labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringCommit.txt	2009-02-20 17:15:46 UTC (rev 25367)
@@ -120,17 +120,15 @@
 #
 # Available tests include:
 #
-# Tests still to be written include:
-#
-# org.jboss.jbossts.xts.servicetests.test.ATMultiParticipantPrepareAndCommitTest
-# this test invokes a single service registering 3 coordinator completion participants
+# org.jboss.jbossts.xts.servicetests.test.at.MultiParticipantPrepareAndCommitTest
+# this test invokes a single service registering 3 participants
 # the location of service is defined by defining a system property:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 # if this is not set the value used defaults to
 #    http://localhost:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.ATMultiServicePrepareAndCommitTest
-# this test invokes 3 separate services registering a coordinator completion participant with each service
+# org.jboss.jbossts.xts.servicetests.test.at.MultiServicePrepareAndCommitTest
+# this test invokes 3 separate services registering a participant with each service
 # the location of service is defined by defining by system properties:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 #    org.jboss.jbossts.xts.servicetests.ServiceURL2
@@ -202,16 +200,16 @@
 # (CoordinatorEngine) is sent a commit message. It exits the JVM,
 # simulating a crash. The trigger location is on entry
 
-RULE kill JVM at participant completion close
+RULE kill JVM at commit
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
-METHOD close
+METHOD commit
 AT ENTRY
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
 IF (NOT recovered)
    AND
-   debug("close on non-recovered coordinator engine " + identifier)
+   debug("commit on non-recovered coordinator engine " + identifier)
 DO traceln("log", "JVM exit"),
    debug("!!!killing JVM!!!"),
    killJVM()
@@ -219,10 +217,10 @@
 
 #######################################################################
 # This rule is triggered when a non-recovered coordinator engine
-# (CoordinatorEngine) is requested to send a prepared message. It
+# (CoordinatorEngine) is requested to send a prepare message. It
 # traces the call.
 
-RULE trace coordinator completion close
+RULE trace participant prepare
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD prepare
 AFTER SYNCHRONIZE
@@ -230,15 +228,15 @@
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
 IF NOT recovered
-DO debug("close on recovered coordinator engine " + identifier),
-   traceln("log", "close on recovered coordinator engine " + identifier)
+DO debug("prepare on recovered coordinator engine " + identifier),
+   traceln("log", "prepare on recovered coordinator engine " + identifier)
 ENDRULE
 
 #######################################################################
 # This rule is triggered when a non-recovered coordinator engine
 # (CoordinatorEngine) receives a prepared message. It traces the call.
 
-RULE trace coordinator completion completed
+RULE trace participant prepared
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD prepared(NotificationType, AddressingProperties, ArjunaContext)
 AT ENTRY
@@ -246,8 +244,8 @@
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
 IF NOT recovered
-DO debug("received completed message for coordinator engine " + identifier),
-   traceln("log", "received completed message for coordinator engine " + identifier)
+DO debug("received prepared message for coordinator engine " + identifier),
+   traceln("log", "received prepared message for coordinator engine " + identifier)
 ENDRULE
 
 #######################################################################
@@ -270,59 +268,24 @@
 ENDRULE
 
 #######################################################################
-# This rule is triggered when a coordinator engine
-# (CoordinatorCompletionCoordinatorEngine) is created from details
-# located in the log record. It traces the create operation
-# The trigger location is at entry but the rule should only be triggered
-# after calling the super constructor
-RULE trace coordinator completion engine create
-CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
-METHOD <init>(String, boolean, W3CEndpointReference, State, boolean)
-AT ENTRY
-BIND identifier = $1,
-     recovered=$4
-IF recovered
-DO debug("created recovered coordinator engine " + identifier),
-   trace("log", "created recovered coordinator engine " + identifier)
-ENDRULE
-
-#######################################################################
 # This rule is triggered when a recovered coordinator engine
-# (CoordinatorEngine) is requested to send a close message. This
+# (CoordinatorEngine) is requested to send a commit message. This
 # happens during replay of a prepared TX from
 # the log. It traces the call.
 
-RULE trace participant completion close
-CLASS com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine
+RULE trace recovered participant commit
+CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD close
 AFTER SYNCHRONIZE
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
 IF recovered
-DO debug("close on recovered participant completion participant engine " + identifier),
-   traceln("log", "close on recovered participant completion participant engine " + identifier)
+DO debug("commit on recovered coordinator engine " + identifier),
+   traceln("log", "commit on recovered coordinator engine " + identifier)
 ENDRULE
 
 #######################################################################
-# This rule is triggered when a recovered coordinator completion
-# participant stub (CoordinatorCompletionCoordinatorEngine) is requested
-# to send a close message. This happens during replay of a prepared TX from
-# the log. It traces the call.
-
-RULE trace coordinator completion close
-CLASS com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine
-METHOD close
-AFTER SYNCHRONIZE
-BIND engine:CoordinatorEngine = $0,
-     recovered:boolean = engine.isRecovered(),
-     identifier:String = engine.getId()
-IF recovered
-DO debug("close on recovered coordinator completion participant engine " + identifier),
-   traceln("log", "close on recovered coordinator completion participant engine " + identifier)
-ENDRULE
-
-#######################################################################
 # This rule is triggered when the recovery system finds a PREPARED
 # activity in the log and reruns the phase 2 commit operation.
 # It prints a message which can be used to verify that the test has
@@ -338,8 +301,8 @@
 IF (status == com.arjuna.ats.arjuna.coordinator.ActionStatus.PREPARED)
      OR
      (status == com.arjuna.ats.arjuna.coordinator.ActionStatus.COMMITTING)
-DO debug("replaying close for prepared activity " + uid),
-   traceln("log", "replaying close for prepared activity " + uid)
+DO debug("replaying close for prepared transaction " + uid),
+   traceln("log", "replaying commit for prepared transaction " + uid)
 ENDRULE
 
 #######################################################################
@@ -355,7 +318,7 @@
 BIND action : BasicAction = $0,
      uid  = action.get_uid()
 IF TRUE
-DO traceln("log", "removed committed activity " + uid),
+DO traceln("log", "removed committed transaction " + uid),
    debug("removed committed transaction " + uid),
    debug("!!!killing JVM!!!"),
    killJVM()

Copied: labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringOnePhaseCommit.txt (from rev 25228, labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringCommit.txt)
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringOnePhaseCommit.txt	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATCrashDuringOnePhaseCommit.txt	2009-02-20 17:15:46 UTC (rev 25367)
@@ -0,0 +1,443 @@
+##############################################################################
+# JBoss, Home of Professional Open Source
+# Copyright 2009, Red Hat Middleware LLC, and individual contributors
+# by the @authors tag. See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+# @authors Andrew Dinn
+#
+# AT Crash During One PhaseCommit
+#
+# This script automates testing of a specific recovery scenario for the
+# JBossTS XTS implementation of the WS-AT 1.1 protocol using orchestration
+# rules. The scenario employs a client, coordinator and 1 web service
+# running in a single JVM. It is also possible to run the test using
+# separate JVMs for the coordinator and participant web service but this
+# requires incluson of some extra rules which make sure the coordinator
+# and participant JVMs both crash.
+# The general scenario differentiates between events happening in the
+# coordinator JVM (AS1) and events happening in the participant JVM (AS2)
+# and rules are categorised according as to which AS they apply to.
+# The scenario is as follows (** indicates intercession by a TOAST rule):
+#
+# AS1 boots
+# AS2 boots
+# Client starts a WS-AT activity (AS1 or AS2 or even AS3)
+# Client invokes web service
+# Web service registers participant P1 (AS2)
+#
+# Client initiates transaction commit
+#
+# Coordinator initiates prepare of participant P1
+# ** AS1 Rule system traces dispatch of prepare to P1
+# ** AS2 Rule system traces receipt of prepare by P1
+# ** AS2 Rule system traces dispatch of prepared by P1
+# ** AS1 Rule system traces receipt of prepared from P1
+#
+# Coordinator sends commit of participant P1
+# -- Extra steps when AS1 != AS2
+# ** AS1 Rule system intercepts after send of commit
+#    has completed and kills AS1 JVM
+# -- End of extra steps
+# Participant P1 receives commit
+# ** AS2 Rule system intercepts commit and kills AS2 JVM
+#
+# -- Extra steps when AS1 != AS2
+# Coordinator resends commit of participant P1
+# ** AS1 Rule system intercepts commit and kills AS1 JVM
+# AS1 reboots
+# -- End of extra steps
+#
+# -- Extra steps when AS1 != AS2
+# AS1 reboots
+# -- End of extra steps
+#
+# AS2 reboots
+#
+# AS2 Recovery system starts after 2 minutes
+# Recovery system recreates participant stub for P1
+# ** AS2 Rule system traces create
+#
+# Participant P1 sends GetStatus to coordinator
+# ** AS2 Rule system traces dispatch of prepared by P1
+# Coordinator receives GetStatus message
+# ** AS1 Rule system traces receipt of GetStatus
+# Coordinator responds with rollback
+# ** AS1 Rule system traces send of rollback
+# -- Extra steps when AS1 != AS2
+# ** AS1 Rule system intercepts _after_ send of
+#    rollback has completed and kills AS1 JVM
+# -- End of extra steps
+# Participant P1 receives rollback
+# ** AS2 Rule system traces receipt of rollback
+# Participant P2 calls rollback
+# ** AS2 Rule system traces rollback call and then kills AS2 JVM
+#
+# Use of this script
+#
+# The default way of exercising this test is to deploy the xtstest war
+# to a single AS and configure it to run the relevant XTS Service Test.
+# The web service and coordinator will be located with the client.
+# The web service, client (i.e. the XTS Service Test which drives
+# the test) and coordinator service can optionally be located in separate
+# ASs. The participant AS should crash when a commit request is received.
+# If the coordinator is in a separate AS it need not be crashed.
+# At reboot of AS2 the rest of the test should run
+# automatically. The participant AS should be killed after the
+# participant recovery is attempted and the participant is rollback.
+# If the coordinator is in a separate AS then it will need to be killed
+# by the test driver
+#
+# This script needs to be passed to a TOAST agent in the JVM running
+# the coordinator service both at first boot and at reboot. Output will be
+# written to file testlog in the working directory of the AS.
+# If the participant is not running in the same JVM as the coordinator then
+# this script needs and the supplementary script ATCrashDuringOnePhaseCommitExtra.txt
+# needs to be passed to a TOAST agent in the JVM running the coordinator.
+# This script on its own eneds ot bepassed to a TOAST agent runing in the
+# participant JVM. Ouptut from the participant will be written to file
+# testlog in the working directory of this second JVM.
+#
+# XTS Service tests which can operate with this scenario can be selected for
+# execution at AS boot by the XTSServiceTestRunnerBean by setting system
+# property
+#    org.jboss.jbossts.xts.servicetests.XTSServiceTestName
+# to the name of a class which will execute the test. This property must
+# be defined in the JVM running the AS to which the xtstest war is deployed
+# i.e. the client AS. n.b. if the client is colocated with the coordinator or
+# participant then this property must be left undefined at AS reboot otherwise
+# the client will run again, starting a new TX which may interfere with
+# recovery of the crashed TX.
+#
+# Available tests include:
+#
+# org.jboss.jbossts.xts.servicetests.test.at.SingleParticipantPrepareAndCommitTest
+# this test invokes a single service registering a single participant
+# the location of participant web service is defined by defining a system property:
+#    org.jboss.jbossts.xts.servicetests.ServiceURL1
+# if this is not set the value used defaults to
+#    http://localhost:8080/xtstest/xtsservicetest1
+#
+# If the client is run in a different AS to the coordinator then the client
+# AS needs to be pointed at the coordinator AS. The easiest
+# way to do this is to define the system property
+#
+#    org.jboss.jbossts.xts11.coordinatorURL
+#
+# to something like
+#
+#    http://foo.bar.org:8080/ws-c11/soap/ActivationCoordinator
+#
+# or alternatively to redefine one or more of the component properties
+#
+#    org.jboss.jbossts.xts11.coordinator.host
+#    org.jboss.jbossts.xts11.coordinator.port
+#    org.jboss.jbossts.xts11.coordinator.path
+#
+# (you probably only need to reset the host component)
+#
+# Expected output
+#
+# After the first boot AS1 and AS2 should exit. File testlog written by
+# the coordinator AS (AS1) should contain output in the following format:
+#
+#   prepare sent for cordinator engine XXXXXX
+#   prepared received for cordinator engine XXXXXX
+#   commit sent for cordinator engine XXXXXX
+#   JVM exit
+#
+# File testlog written by the participant AS (AS2) should contain output
+# in the following format:
+#
+#   prepare received for participant XXXXXX
+#   prepared sent for participant XXXXXX
+#   commit received for participant XXXXXX
+#   JVM exit
+#
+# After reboot file testlog written by the coordinator AS (AS1) should
+# contain output in the following format:
+#
+#   prepare sent for cordinator engine XXXXXX
+#   prepared received for cordinator engine XXXXXX
+#   commit sent for cordinator engine XXXXXX
+#   JVM exit
+#   prepared received for unknown participant XXXXXX
+#   rollback sent for participant XXXXXX
+#
+# After reboot file testlog written by the participant AS (AS2) should
+# contain output in the following format:
+#
+#   prepare received for participant XXXXXX
+#   prepared sent for participant XXXXXX
+#   commit received for participant XXXXXX
+#   JVM exit
+#   created recovered participant engine XXXXXX
+#   prepared sent for recovered participant XXXXXX
+#   rollback received for participant XXXXXX
+#   rollback called for participant XXXXXX
+#   JVM exit
+#
+#######################################################################
+# This rule opens a file for the trace output during XTS startup
+# It will be opened for append at reboot so messages from both runs
+# will go to this file. n.b. this runs in both AS1 and AS2 so it is
+# important to ensure that they employ different working directories.
+# If not then the second open will trash the first one.
+#
+RULE open trace file
+CLASS org.jboss.jbossts.XTSService
+METHOD start()
+BIND NOTHING
+IF TRUE
+DO openTrace("log", "testlog")
+ENDRULE
+
+#######################################################################
+## rules for first run of coordinator AS (AS1)
+
+#######################################################################
+# This rule is triggered when a non-recovered coordinator engine
+# (CoordinatorEngine) is requested to send a prepare message. It
+# traces the call.
+
+RULE trace coordinator prepare
+CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
+METHOD prepare
+AT INVOKE waitForState
+BIND engine:CoordinatorEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF NOT recovered
+DO debug("prepare sent for coordinator engine " + identifier),
+   traceln("log", "prepare sent for coordinator engine " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a non-recovered coordinator engine
+# (CoordinatorEngine) receives a prepared message. It traces the call.
+
+RULE trace coordinator prepared
+CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
+METHOD prepared(Notification, AddressingProperties, ArjunaContext)
+AT ENTRY
+BIND engine:CoordinatorEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF NOT recovered
+DO debug("prepared received for coordinator engine " + identifier),
+   traceln("log", "prepared received for coordinator engine " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered after a non-recovered coordinator engine
+# (CoordinatorEngine) has sent a commit message. It exits the JVM,
+# simulating a crash. This needs to go in a separate
+# script used for the coordinator when it is not co-located with the
+# participant.
+
+# RULE kill JVM at commit
+# CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
+#METHOD commit
+# AT INVOKE waitForState
+# BIND engine:CoordinatorEngine = $0,
+#      recovered:boolean = engine.isRecovered(),
+#      identifier:String = engine.getId()
+# IF (NOT recovered)
+#    AND
+#    debug("commit sent for coordinator engine " + identifier)
+#    AND
+#    traceln("log", "commit sent for coordinator engine " + identifier)
+# DO traceln("log", "JVM exit"),
+#    debug("!!!killing JVM!!!"),
+#    killJVM()
+# ENDRULE
+
+#######################################################################
+## rules for first run of participant AS (AS1)
+
+#######################################################################
+# This rule is triggered when a non-recovered participant engine
+# (ParticipantEngine) receives a prepare message. It traces the call.
+
+RULE trace coordinator prepare
+CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
+METHOD prepare
+AT SYNCHRONIZE
+BIND engine:ParticipantEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF NOT recovered
+DO debug("prepare received for participant engine " + identifier),
+   traceln("log", "prepare received for participant engine " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a non-recovered participant engine
+# (ParticipantEngine) sends a prepared message. It traces the call.
+
+RULE trace participant prepared
+CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
+METHOD sendPrepared(boolean)
+AT INVOKE updateResendPeriod
+BIND engine:ParticipantEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF NOT recovered
+DO debug("prepared sent for participant engine " + identifier),
+   traceln("log", "prepared sent for participant engine " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a non-recovered participant engine
+# (ParticipantEngine) receives a commit message. It exits the JVM,
+# simulating a crash.
+
+RULE kill JVM at commit
+CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
+METHOD commit
+AT SYNCHRONIZE
+BIND engine:ParticipantEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF (NOT recovered)
+   AND
+   debug("commit received for participant engine " + identifier)
+   AND
+   traceln("log", "commit received for participant engine " + identifier)
+DO traceln("log", "JVM exit"),
+   debug("!!!killing JVM!!!"),
+   killJVM()
+ENDRULE
+
+#######################################################################
+## rules for reboot run of coordinator AS (AS1)
+
+#######################################################################
+# This rule is triggered when a coordinator processor
+# (CoordinatorProcessorImpl) receives a prepared message for an
+# unknown coordinator. It traces the call.
+
+RULE trace unknown participant prepared
+CLASS com.arjuna.wst11.messaging.CoordinatorProcessorImpl
+METHOD prepared(boolean)
+AT INVOKE sendRollback
+BIND identifier:String = $3.getInstanceIdentifier().getInstanceIdentifier()
+IF TRUE
+DO debug("prepared received for unknown participant " + identifier),
+   traceln("log", "prepared received for unknown participant " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a coordinator processor
+# (CoordinatorProcessorImpl) sends a rollback prepared message for an
+# unknown coordinator. It traces the call.
+
+RULE trace participant rollback
+CLASS com.arjuna.wst11.messaging.CoordinatorProcessorImpl
+METHOD sendRollback
+AT INVOKE sendRollback
+BIND identifier:String = $2.getInstanceIdentifier().getInstanceIdentifier()
+IF TRUE
+DO debug("rollback send for participant " + identifier),
+   traceln("log", "rollback sent for participant " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a coordinator processor
+# (CoordinatorProcessorImpl) has sent a rollback prepared message for an
+# unknown coordinator. It exits the JVM. This needs to go in a separate
+# script used for the coordinator when it is not co-located with the
+# participant.
+
+# RULE trace unknown participant prepared
+# CLASS com.arjuna.wst11.messaging.CoordinatorProcessorImpl
+# METHOD prepared(boolean)
+# AFTER INVOKE sendRollback
+# BIND NOTHING
+# IF TRUE
+# DO debug("!!!killing JVM!!!"),
+#    traceln("log", "JVM exit")
+# ENDRULE
+
+#######################################################################
+## rules for reboot run of participant AS (AS2)
+
+#######################################################################
+# This rule is triggered when a participant engine (ParticipantEngine)
+# is created from details located in the log record. It traces the
+# create operation. The trigger location is at entry but the rule
+# should only be triggered after calling the super constructor
+
+RULE trace participant engine create
+CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
+METHOD <init>(Participant, String, State, W3CEndpointReference, boolean)
+AT ENTRY
+BIND identifier = $1,
+     recovered=$5
+IF recovered
+DO debug("created recovered participant engine " + identifier),
+   traceln("log", "created recovered participant engine " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a recovered participant engine
+# (ParticipantEngine) sends a prepared message. It traces the call.
+
+RULE trace recovered participant prepared
+CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
+METHOD sendPrepared(boolean)
+AT INVOKE updateResendPeriod
+BIND engine:ParticipantEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF recovered
+DO debug("prepared sent for recovered participant engine " + identifier),
+   traceln("log", "prepared sent for recovered participant engine " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a recovered participant engine
+# (ParticipantEngine) receives a rollback request. It traces the call.
+
+RULE trace recovered participant rollback
+CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
+METHOD rollback
+AFTER SYNCHRONIZE
+BIND engine:ParticipantEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF recovered
+DO debug("rollback received for recovered participant " + identifier),
+   traceln("log", "rollback received for recovered participant " + identifier)
+ENDRULE
+
+
+#######################################################################
+# This rule is triggered when a recovered participant engine
+# (ParticipantEngine) forgets a participant afer performing a rollback.
+# It kills the JVM.
+
+RULE kill JVM after rollback
+CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
+METHOD rollback
+AFTER INVOKE forget
+BIND NOTHING
+IF TRUE
+DO debug("!!!killing JVM!!!"),
+   traceln("log", "JVM exit")
+ENDRULE

Modified: labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATHeuristicRecoveryAfterDelayedCommit.txt
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATHeuristicRecoveryAfterDelayedCommit.txt	2009-02-20 17:12:55 UTC (rev 25366)
+++ labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATHeuristicRecoveryAfterDelayedCommit.txt	2009-02-20 17:15:46 UTC (rev 25367)
@@ -134,14 +134,14 @@
 #
 # Available tests include:
 #
-# org.jboss.jbossts.xts.servicetests.test.ATMultiParticipantPrepareAndCommitTest
+# org.jboss.jbossts.xts.servicetests.test.at.MultiParticipantPrepareAndCommitTest
 # this test invokes a single service registering 3 participant
 # the location of service is defined by defining a system property:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL
 # if this is not set the value used defaults to
 #    http://localhost:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.ATMultiServicePrepareAndCommitTest
+# org.jboss.jbossts.xts.servicetests.test.at.MultiServicePrepareAndCommitTest
 # this test invokes 3 separate services registering a participant with each service
 # the location of service is defined by defining by system properties:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1

Modified: labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATParticipantCrashAndRecover.txt
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATParticipantCrashAndRecover.txt	2009-02-20 17:12:55 UTC (rev 25366)
+++ labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATParticipantCrashAndRecover.txt	2009-02-20 17:15:46 UTC (rev 25367)
@@ -122,21 +122,21 @@
 #
 # Available tests include:
 #
-# org.jboss.jbossts.xts.servicetests.test.ATSingleParticipantPrepareAndCommitTest
+# org.jboss.jbossts.xts.servicetests.test.at.SingleParticipantPrepareAndCommitTest
 # this test invokes a single web service registering 1 participant
 # the location of service is defined by defining a system property:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 # which should be set to something like
 #    http://baz.bar.org:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.ATMultiParticipantPrepareAndCommitTest
+# org.jboss.jbossts.xts.servicetests.test.at.MultiParticipantPrepareAndCommitTest
 # this test invokes a single service registering 3 participants
 # the location of service is defined by defining a system property:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 # which should be set to something like
 #    http://baz.bar.org:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.ATMultiServicePrepareAndCommitTest
+# org.jboss.jbossts.xts.servicetests.test.at.MultiServicePrepareAndCommitTest
 # this test invokes 3 separate services registering a participant for each service
 # the location of service is defined by defining by system properties:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1

Modified: labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/BACrashDuringCommit.txt
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/BACrashDuringCommit.txt	2009-02-20 17:12:55 UTC (rev 25366)
+++ labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/BACrashDuringCommit.txt	2009-02-20 17:15:46 UTC (rev 25367)
@@ -149,23 +149,23 @@
 #
 # Available tests include:
 #
-# Tests still to be written include:
-#
-# org.jboss.jbossts.xts.servicetests.test.BAMultiCoordinatorCompletionParticipantCloseTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiCoordinatorCompletionParticipantCloseTest
 # this test invokes a single service registering 3 coordinator completion participants
+# and then closing the activity
 # the location of service is defined by defining a system property:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 # if this is not set the value used defaults to
 #    http://localhost:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.BAMultiParticipantCompletionParticipantCloseTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantCompletionParticipantCloseTest
 # this test invokes a single service registering 3 participant completion participants
+# it sends completed to each of the 3 participants before closing the activity
 # the location of service is defined by defining a system property:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 # if this is not set the value used defaults to
 #    http://localhost:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.BAMultiCoordinatorCompletionParticipantExitAndCloseTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiCoordinatorCompletionParticipantExitAndCloseTest
 # this test invokes a single service registering 3 coordinator completion participants
 # it sends an exit to the first participant before closing the activity
 # the location of service is defined by defining a system property:
@@ -173,16 +173,18 @@
 # if this is not set the value used defaults to
 #    http://localhost:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.BAMultiParticipantCompletionParticipantExitAndCloseTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantCompletionParticipantExitAndCloseTest
 # this test invokes a single service registering 3 participant completion participants
-# it sends an exit to the first participant before closing the activity
+# it sends an exit to the first participant and completed to the other participants
+# before closing the activity
 # the location of service is defined by defining a system property:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 # if this is not set the value used defaults to
 #    http://localhost:8080/xtstest/xtsservicetest1
 #
-# org.jboss.jbossts.xts.servicetests.test.BAMultiServiceCoordinatorCompletionParticipantCloseTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceCoordinatorCompletionParticipantCloseTest
 # this test invokes 3 separate services registering a coordinator completion participant with each service
+# and then closing the activity
 # the location of service is defined by defining by system properties:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 #    org.jboss.jbossts.xts.servicetests.ServiceURL2
@@ -192,8 +194,9 @@
 #    http://localhost:8080/xtstest/xtsservicetest2
 #    http://localhost:8080/xtstest/xtsservicetest3
 #
-# org.jboss.jbossts.xts.servicetests.test.BAMultiServiceParticipantCompletionParticipantCloseTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceParticipantCompletionParticipantCloseTest
 # this test invokes 3 separate services registering a participant completion participant with each service
+# it sends completed to each of the 3 participants before closing the activity
 # the location of service is defined by defining by system properties:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 #    org.jboss.jbossts.xts.servicetests.ServiceURL2
@@ -203,7 +206,7 @@
 #    http://localhost:8080/xtstest/xtsservicetest2
 #    http://localhost:8080/xtstest/xtsservicetest3
 #
-# org.jboss.jbossts.xts.servicetests.test.BAMultiServiceCoordinatorCompletionParticipantCloseAndExitTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceCoordinatorCompletionParticipantCloseAndExitTest
 # this test invokes 3 separate services registering a coordinator completion participant with each service
 # it sends an exit to the first participant before closing the activity
 # the location of service is defined by defining by system properties:
@@ -215,9 +218,10 @@
 #    http://localhost:8080/xtstest/xtsservicetest2
 #    http://localhost:8080/xtstest/xtsservicetest3
 #
-# org.jboss.jbossts.xts.servicetests.test.BAMultiServiceParticipantCompletionParticipantCloseAndExitTest
+# org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceParticipantCompletionParticipantCloseAndExitTest
 # this test invokes 3 separate services registering a participant completion participant with each service
-# it sends an exit to the first participant before closing the activity
+# it sends an exit to the first participant and completed to the other participants
+# before closing the activity
 # the location of service is defined by defining by system properties:
 #    org.jboss.jbossts.xts.servicetests.ServiceURL1
 #    org.jboss.jbossts.xts.servicetests.ServiceURL2
@@ -249,20 +253,31 @@
 #
 # After the first boot the JVM should exit leaving the following in file testlog
 #
-#   completed received for participant XXXXXX
-#   completed received for participant XXXXXX
-#   completed received for participant XXXXXX
+#   received exit message for XXXXXXX completion participant stub XXXXXX       (only for CloseAndExit tests)
+#   received completed message for XXXXXXX completion participant stub XXXXXX  (number of occcurences depends upon test)
+#   received completed message for XXXXXXX completion participant stub XXXXXX
+#   received completed message for XXXXXXX completion participant stub XXXXXX
 #   JVM exit
 #
 # After reboot the JVM should exit leaving output in the following format in file
-# testlog. Clearly the ids for the TX/participants may vary and the number of
-# countdown completed lines will depend upon the number of participants employed.
+# testlog.
 #
-#   completed received for participant XXXXXX
-#   completed received for participant XXXXXX
-#   completed received for participant XXXXXX
+#   received exit message for XXXXXXX completion participant stub XXXXXX       (only for CloseAndExit tests)
+#   received completed message for XXXXXXX completion participant stub XXXXXX
+#   received completed message for XXXXXXX completion participant stub XXXXXX
+#   received completed message for XXXXXXX completion participant stub XXXXXX
 #   JVM exit
-#   blah de blah
+#   created recovered XXXXXXX completion participant stub XXXXXX
+#   created recovered XXXXXXX completion participant stub XXXXXX
+#   created recovered XXXXXXX completion participant stub XXXXXX
+#   replaying close for prepared activity XXXXXX
+#   close on recovered XXXXXXX completion participant engine XXXXXX
+#   received closed message for XXXXXXX completion participant stub XXXXXX
+#   close on recovered XXXXXXX completion participant engine XXXXXX
+#   received closed message for XXXXXXX completion participant stub XXXXXX
+#   close on recovered XXXXXXX completion participant engine XXXXXX
+#   received closed message for XXXXXXX completion participant stub XXXXXX
+#   removed committed activity XXXXXX
 #
 #######################################################################
 # This rule opens a file for the trace output during XTS startup
@@ -324,7 +339,7 @@
 #######################################################################
 # This rule is triggered when a non-recovered coordinator completion
 # participant stub (CoordinatorCompletionCoordinatorEngine) is requested
-# to send a complete message. t traces the call.
+# to send a complete message. It traces the call.
 
 RULE trace coordinator completion close
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine
@@ -480,6 +495,40 @@
 ENDRULE
 
 #######################################################################
+# This rule is triggered when a non-recovered participant completion
+# participant stub (ParticipantCompletionCoordinatorEngine) receives a
+# closed message. It traces the call.
+
+RULE trace participant completion closed
+CLASS com.arjuna.wst11.messaging.engines.ParticipantCompletionCoordinatorEngine
+METHOD closed(NotificationType, AddressingProperties, ArjunaContext)
+AT ENTRY
+BIND engine:CoordinatorEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF NOT recovered
+DO debug("received closed message for participant completion participant stub " + identifier),
+   traceln("log", "received closed message for participant completion participant stub " + identifier)
+ENDRULE
+
+#######################################################################
+# This rule is triggered when a non-recovered coordinator completion
+# participant stub (CoordinatorCompletionCoordinatorEngine) receives a
+# closed message. It traces the call.
+
+RULE trace coordinator completion closed
+CLASS com.arjuna.wst11.messaging.engines.CoordinatorCompletionCoordinatorEngine
+METHOD closed(NotificationType, AddressingProperties, ArjunaContext)
+AT ENTRY
+BIND engine:CoordinatorEngine = $0,
+     recovered:boolean = engine.isRecovered(),
+     identifier:String = engine.getId()
+IF NOT recovered
+DO debug("received closed message for coordinator completion participant stub " + identifier),
+   traceln("log", "received closed message for coordinator completion participant stub " + identifier)
+ENDRULE
+
+#######################################################################
 # This rule is triggered when the recovery system finds a PREPARED
 # activity in the log and reruns the phase 2 commit operation.
 # It prints a message which can be used to verify that the test has




More information about the jboss-svn-commits mailing list