1 Reply Latest reply on Aug 28, 2012 1:24 PM by shawkins

    Question about TransactionManager in EmbeddedConfiguration

    ichanjasper

      What should I set for TransactionManager in EmbeddedConfiguration?  I found the following code in your embedded server test code:

       

      if (config.getTransactionManager() == null) {
      config.setTransactionManager(SimpleMock.createSimpleMock(TransactionManager.class));
      this.transactionService.setXaTerminator(SimpleMock.createSimpleMock(XATerminator.class));
      this.transactionService.setWorkManager(new FakeWorkManager());
      detectTransactions = false;
      }

       

      What is the default in runtime for standalone version?  Thanks.

       

      - Ivan

        • 1. Re: Question about TransactionManager in EmbeddedConfiguration
          shawkins

          That code is for the FakeServer, which is just a test harness.  The EmbeddedServer does not require a TransactionManager.  See the EmbeddedServer class.  If you don't set a TransactionManger any transaction related method will fail with an unsupported operation exception.  If you are in a transaction aware environment, then you should set the EmbeddedConfiguration TransactionManager to the TransactionManager in that environment (you would typically have to perform a JNDI lookup).

           

          Steve