5 Replies Latest reply on Jan 21, 2007 7:30 AM by marklittle

    Resource does not get called

    rookie1977

      I have one problem when testing JTS/OTS examples (jts/remotebank and jts/explicitremotebank)
      provided with the JBossTS. I set up the classpath with the provided script, start recovery manager,
      then start server and client, and I am able to play with the examples (creating account etc).

      The problem is that AccountResource's methods (prepare, commit, rollback) never get called, no matter
      what is the outcome of the transaction is. I even inserted simple "throw new IllegalArgumentException()"
      at the beginning of the methods, to confirm this.

        • 1. Re: Resource does not get called
          marklittle

          Check the following:

          (i) that you are registering the resource with the transaction.

          (ii) that if this is a distributed transaction, you are propagating the transaction context.

          • 2. Re: Resource does not get called
            rookie1977

            I double checked and all tasks are done:

            -in AccountResource.getResource() method I perform:
            "RecoveryCoordinator recoverycoordinator = OTSManager .get_current().get_control().get_coordinator().register_resource(ref);" where ref is the Resource object wraping AccoutResource object which implements org.omg.CosTransactions.ResourcePOA.

            Account object inherits from CosTransactions::TransactionalObject and on the client side I use implicit Transaction Context Prropagation.

            Property com.arjuna.ats.jts.contextPropMode has default value INTERPOSITION.

            These are default examples that ship with the JBossTS, and I havent changed no code except injecting my throw exception hooks mentioned previously, so am I missing something here?

            Thanks in advance

            • 3. Re: Resource does not get called
              marklittle

              Did you solve your problem? If not, I'll take a look in the next few days.

              • 4. Re: Resource does not get called
                rookie1977

                Actually I have not but I have written my new example from scratch and it works just fine and methods of my implementation of ResourcePOA do get called, while ones in the examples do not.

                • 5. Re: Resource does not get called
                  marklittle

                  OK, as long as you've managed to get past this point.