3 Replies Latest reply on Oct 24, 2011 5:05 AM by Amos Feng

    Is it possible to restart jboss container after crash ?

    Amos Feng Apprentice



      I want to test web serviece transaction crash recovery.

      currently, I used byteman script to make jvm crash when transaction commit.


      basically, I need to restart container after jvm crash.

      My test codes looks like following:




      public class ATCrashDuringOnePhaseCommitTest {


          private XTSServiceTestRunnerBean testRunner;


         @Deployment @TargetsContainer("container-at-crash-during-one-phase-commit")

         public static Archive<?> createTestArchive() {

              WebArchive archive = ShrinkWrap.

              createFromZipFile(WebArchive.class, new File("target/xtstest.war"));

              return archive;   




         public void SingleParticipantPrepareAndCommitTest() {

             String testName =


              try {


              } catch (Exception e) {

                   // jvm should crash on commit

                   // restart container to watch recovery



              fail("It should be crash by byteman script");



      is it possible to do or any other suggestion ?