9 Replies Latest reply on Feb 3, 2009 6:44 PM by Eduardo Martins

    Deploying TransactionManager in Microcontainer standalone

    Eduardo Martins Apprentice

      I'm trying to deploy the transaction manager in a Microcontainer Junit test case, using a modified beans-xml present in JBoss AS5, with the properties requiring ServiceBindingManager bean commented and using the JVM MBeanServer instead of the one from the JMXKernel, but this doesn't seem enough to start the transaction manager. Can someone provide me a simple beans config for this use case?

      Thanks in advance.

        • 1. Re: Deploying TransactionManager in Microcontainer standalon
          Jonathan Halliday Master

          What versions and what's the error?

          • 2. Re: Deploying TransactionManager in Microcontainer standalon
            Eduardo Martins Apprentice

            I'm importing the component matrix dependendy management from AS 5.0.0.GA, so it seems to be 4.4.0.GA

            Here is the test run log:

            -------------------------------------------------------
             T E S T S
            -------------------------------------------------------
            Running org.mobicents.slee.runtime.transaction.TestCase
            0 DEBUG [TestCase] ==== setUp org.mobicents.slee.runtime.transaction.TestCase ====
            13 DEBUG [KernelFactory] Starting JBoss Kernel construction...
            159 DEBUG [KernelFactory] Completed JBoss Kernel construction. Duration: 145 milliseconds
            193 DEBUG [TestCase] Deploying file:/Volumes/2/workspace/mobicents-jainslee-server-2.x.y/core/transaction/target/test-classes/org/mobicents/slee/runtime/transaction/TestCase.xml
            228 DEBUG [SaxJBossXBParser] Created parser: com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl@496e57, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
            231 DEBUG [SaxJBossXBParser] http://xml.org/sax/features/validation set to: true
            231 DEBUG [SaxJBossXBParser] http://xml.org/sax/features/namespaces set to: true
            231 DEBUG [SaxJBossXBParser] http://apache.org/xml/features/validation/dynamic set to: true
            253 DEBUG [SaxJBossXBParser] Created parser: com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl@496e57, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
            1348 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
            1349 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
            1395 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TxControl_1] - Name of XA node not defined. Using -53e0fec0:c439:49887b11:0
            1430 DEBUG [arjLogger] ShadowingStore.ShadowingStore( 14 )
            1430 DEBUG [arjLogger] ShadowNoFileLockStore.ShadowNoFileLockStore( 14 )
            1431 DEBUG [arjLogger] HashedStore.HashedStore( 14 )
            1431 DEBUG [arjLogger] HashedStore.HashedActionStore()
            1431 DEBUG [arjLogger] FileSystemStore.setupStore()
            1431 DEBUG [arjLogger] FileSystemStore.createHierarchy(/Volumes/2/workspace/mobicents-jainslee-server-2.x.y/core/transaction/ObjectStore/HashedActionStore/defaultStore/)
            1433 INFO [arjLoggerI18N] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_1] - Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 50234
            1434 INFO [arjLogger] TransactionStatusManagerItem - host: 127.0.0.1 port: 50234
            1436 DEBUG [arjLogger] OutputObjectState::OutputObjectState()
            1436 DEBUG [arjLogger] ShadowingStore.ShadowingStore( 14 )
            1436 DEBUG [arjLogger] ShadowNoFileLockStore.ShadowNoFileLockStore( 14 )
            1436 DEBUG [arjLogger] HashedStore.HashedStore( 14 )
            1436 DEBUG [arjLogger] HashedStore.HashedActionStore()
            1436 DEBUG [arjLogger] FileSystemStore.setupStore()
            1436 DEBUG [arjLogger] FileSystemStore.createHierarchy(/Volumes/2/workspace/mobicents-jainslee-server-2.x.y/core/transaction/ObjectStore/HashedActionStore/defaultStore/)
            1436 DEBUG [arjLogger] FileSystemStore.write_committed(-53e0fec0:c439:49887b11:1, /Recovery/TransactionStatusManager)
            1436 DEBUG [arjLogger] ShadowingStore.write_state(-53e0fec0:c439:49887b11:1, /Recovery/TransactionStatusManager, ObjectStore.OS_ORIGINAL)
            1437 DEBUG [arjLogger] HashedStore.genPathName(-53e0fec0:c439:49887b11:1, /Recovery/TransactionStatusManager, ObjectStore.OS_ORIGINAL)
            1439 DEBUG [arjLogger] ShadowingStore.openAndLock(/Volumes/2/workspace/mobicents-jainslee-server-2.x.y/core/transaction/ObjectStore/HashedActionStore/defaultStore/Recovery/TransactionStatusManager/#91#/-53e0fec0_c439_49887b11_1, FileLock.F_WRLCK, true)
            1439 DEBUG [arjLogger] FileSystemStore.createHierarchy(/Volumes/2/workspace/mobicents-jainslee-server-2.x.y/core/transaction/ObjectStore/HashedActionStore/defaultStore/Recovery/TransactionStatusManager/#91#/-53e0fec0_c439_49887b11_1)
            1441 DEBUG [arjLogger] ShadowingStore.closeAndUnlock(/Volumes/2/workspace/mobicents-jainslee-server-2.x.y/core/transaction/ObjectStore/HashedActionStore/defaultStore/Recovery/TransactionStatusManager/#91#/-53e0fec0_c439_49887b11_1, null, java.io.FileOutputStream@39af80)
            1441 INFO [arjLoggerI18N] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_3] - TransactionStatusManager started on port 50234 and host 127.0.0.1 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
            1455 INFO [tsmxLogger] Registering mbean for module 'arjuna'
            1457 DEBUG [tsmxLogger] TransactionService Management Extentions initialising
            1458 INFO [tsmxLogger] Initialising JMX agent com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl
            1458 DEBUG [tsmxLogger] Registering transaction service mbeans
            1463 DEBUG [arjLogger] TransactionReaper::create ( 120000 )
            1463 DEBUG [arjLogger] TransactionReaper::TransactionReaper ( 120000 )
            1468 DEBUG [arjLogger] ReaperThread.run ()
            1473 DEBUG [arjLogger] ReaperWorkerThread.run ()
            1473 DEBUG [arjLoggerI18N] [com.arjuna.ats.internal.arjuna.coordinator.ReaperWorkThread_1] - Thread Thread[Thread-3,5,main] waiting for cancelled TXs
            1473 DEBUG [arjLoggerI18N] [com.arjuna.ats.internal.arjuna.coordinator.ReaperThread_1] - Thread Thread[Thread-2,5,main] sleeping for 120000
            1476 FATAL [TransactionManagerService] Failed to create and register Propagation Context Manager
            javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
             at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
             at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
             at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
             at javax.naming.InitialContext.bind(InitialContext.java:359)
             at com.arjuna.ats.jbossatx.jta.TransactionManagerService.bindRef(TransactionManagerService.java:683)
             at com.arjuna.ats.jbossatx.jta.TransactionManagerService.create(TransactionManagerService.java:191)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
             at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
             at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
             at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
             at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
             at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
             at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
             at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
             at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
             at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
             at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
             at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
             at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
             at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:331)
             at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:309)
             at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
             at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
             at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:88)
             at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:158)
             at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:294)
             at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:438)
             at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.setUp(MicrocontainerTestDelegate.java:83)
             at org.jboss.test.AbstractTestSetup.setUp(AbstractTestSetup.java:63)
             at org.jboss.test.AbstractTestCaseWithSetup.setUp(AbstractTestCaseWithSetup.java:103)
             at org.jboss.test.kernel.junit.MicrocontainerTest.setUp(MicrocontainerTest.java:85)
             at junit.framework.TestCase.runBare(TestCase.java:128)
             at junit.framework.TestResult$1.protect(TestResult.java:110)
             at junit.framework.TestResult.runProtected(TestResult.java:128)
             at junit.framework.TestResult.run(TestResult.java:113)
             at junit.framework.TestCase.run(TestCase.java:120)
             at junit.framework.TestSuite.runTest(TestSuite.java:228)
             at junit.framework.TestSuite.run(TestSuite.java:223)
             at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
             at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
             at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
             at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
             at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
             at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
            1477 INFO [TransactionManagerService] Initializing recovery manager
            1498 INFO [arjLogger]
             --- Start RecoveryActivators
            1502 DEBUG [arjLoggerI18N] [com.arjuna.ats.internal.arjuna.recovery.ExpiredEntryMonitor_3] - No Expiry scanners loaded - not scanning
            1504 INFO [arjLoggerI18N] [com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery_13] - Recovery manager listening on endpoint 127.0.0.1:50,235
            1504 DEBUG [arjLogger] PeriodicRecovery: starting listener worker thread
            1504 INFO [arjLoggerI18N] [com.arjuna.ats.internal.arjuna.recovery.ready] RecoveryManagerImple is ready on port 50,235
            1504 INFO [TransactionManagerService] Recovery manager configured
            1504 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
            1522 ERROR [AbstractKernelController] Error installing to Create: name=TransactionManager state=Configured
            javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
             at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
             at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
             at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
             at javax.naming.InitialContext.rebind(InitialContext.java:367)
             at com.arjuna.ats.jta.utils.JNDIManager.bindJTATransactionManagerImplementation(JNDIManager.java:108)
             at com.arjuna.ats.jta.utils.JNDIManager.bindJTATransactionManagerImplementation(JNDIManager.java:92)
             at com.arjuna.ats.jbossatx.jta.TransactionManagerService.create(TransactionManagerService.java:242)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
             at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
             at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
             at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
             at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
             at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
             at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
             at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
             at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
             at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
             at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
             at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
             at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
             at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:331)
             at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:309)
             at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
             at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
             at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:88)
             at org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:158)
             at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:294)
             at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:438)
             at org.jboss.test.kernel.junit.MicrocontainerTestDelegate.setUp(MicrocontainerTestDelegate.java:83)
             at org.jboss.test.AbstractTestSetup.setUp(AbstractTestSetup.java:63)
             at org.jboss.test.AbstractTestCaseWithSetup.setUp(AbstractTestCaseWithSetup.java:103)
             at org.jboss.test.kernel.junit.MicrocontainerTest.setUp(MicrocontainerTest.java:85)
             at junit.framework.TestCase.runBare(TestCase.java:128)
             at junit.framework.TestResult$1.protect(TestResult.java:110)
             at junit.framework.TestResult.runProtected(TestResult.java:128)
             at junit.framework.TestResult.run(TestResult.java:113)
             at junit.framework.TestCase.run(TestCase.java:120)
             at junit.framework.TestSuite.runTest(TestSuite.java:228)
             at junit.framework.TestSuite.run(TestSuite.java:223)
             at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
             at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
             at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
             at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
             at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
             at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
            1557 DEBUG [TestCase] ==== Starting test ====
            1559 DEBUG [TestCase] No method specific deployment /org/mobicents/slee/runtime/transaction/TestCase#test.xml
            Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.635 sec <<< FAILURE!
            
            Results :
            
            Tests in error:
             test(org.mobicents.slee.runtime.transaction.TestCase)
            
            Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
            
            


            Here is the beans config:

            <?xml version="1.0" encoding="UTF-8"?>
            <deployment xmlns="urn:jboss:bean-deployer:2.0">
            
             <bean name="MBeanServerLocator"
             class="org.mobicents.slee.runtime.transaction.MBeanServerLocator">
             </bean>
            
             <bean name="Mobicents.JAINSLEE.TransactionManagerMBean"
             class="org.mobicents.slee.runtime.transaction.SleeTransactionManagerImpl">
             <!-- jboss as tx manager bean -->
             <constructor>
             <parameter><inject bean="RealTransactionManager"/></parameter>
             </constructor>
             </bean>
            
             <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
             <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation>
            
             <property name="transactionTimeout">300</property>
            
             <property name="mbeanServer"><inject bean="MBeanServerLocator" property="mbeanServer"/></property>
            
             <!--
             <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
            
             <property name="transactionStatusManagerInetAddress">
             <value-factory bean="ServiceBindingManager"
             method="getInetAddressBinding">
             <parameter>TransactionManager</parameter>
             <parameter>transactionStatusManager</parameter>
             </value-factory>
             </property>
             <property name="transactionStatusManagerPort">
             <value-factory bean="ServiceBindingManager"
             method="getIntBinding" >
             <parameter>TransactionManager</parameter>
             <parameter>transactionStatusManager</parameter>
             </value-factory>
             </property>
            
             <property name="recoveryInetAddress">
             <value-factory bean="ServiceBindingManager"
             method="getInetAddressBinding">
             <parameter>TransactionManager</parameter>
             <parameter>recoveryManager</parameter>
             </value-factory>
             </property>
             <property name="recoveryPort">
             <value-factory bean="ServiceBindingManager"
             method="getIntBinding" >
             <parameter>TransactionManager</parameter>
             <parameter>recoveryManager</parameter>
             </value-factory>
             </property>
            -->
             <property name="socketProcessIdPort">0</property>
            
             </bean>
            
             <!-- Make javax.transaction.TransactionManager available for injection -->
             <bean name="RealTransactionManager">
             <constructor factoryMethod="getTransactionManager">
             <factory bean="TransactionManager"/>
             </constructor>
             </bean>
            
             <!-- Handles user transaction providers and listeners -->
             <bean name="UserTransactionRegistry" class="org.jboss.tm.usertx.UserTransactionRegistry">
             <!-- Register providers -->
             <incallback method="addProvider"/>
             <uncallback method="removeProvider"/>
             <!-- Register listeners -->
             <incallback method="addListener"/>
             <uncallback method="removeListener"/>
             </bean>
            
             <!-- The provider for default in process UserTransactions -->
             <bean name="DefaultUserTransactionprovider" class="org.jboss.tm.usertx.client.ServerVMClientUserTransaction">
             <constructor factoryClass="org.jboss.tm.usertx.client.ServerVMClientUserTransaction" factoryMethod="getSingleton"/>
             <demand>TransactionManager</demand>
             </bean>
            
            </deployment>
            


            • 3. Re: Deploying TransactionManager in Microcontainer standalon
              Jonathan Halliday Master

              You've got a JNDI provider configured somewhere, right? It seems to be the JNDI bindings that are failing...

              • 4. Re: Deploying TransactionManager in Microcontainer standalon
                Eduardo Martins Apprentice

                Is there a way to not use ServiceBindingManager and JNDI? I would like to avoid adding more AS components to the tests...

                • 5. Re: Deploying TransactionManager in Microcontainer standalon
                  Jonathan Halliday Master

                  yes but you'll need to throw away TransactionManagerService entirely then and do it programatically in your test suite setup code:

                  TransactionManager tm = new com.arjuna.ats.internal.jta.transaction.arjjunacore.TransactionManagerImple();

                  That won't get you a working recovery system, but it should do basic transactions ok.

                  • 6. Re: Deploying TransactionManager in Microcontainer standalon
                    Eduardo Martins Apprentice

                    Exactly what I was looking for. Thanks :-)

                    For other forum users who may search for the same thing, here it is the microcontainer beans-xml I used:

                    <?xml version="1.0" encoding="UTF-8"?>
                    <deployment xmlns="urn:jboss:bean-deployer:2.0">
                    
                     <bean name="Mobicents.JAINSLEE.TransactionManagerMBean"
                     class="org.mobicents.slee.runtime.transaction.SleeTransactionManagerImpl">
                     <!-- jboss as tx manager bean -->
                     <constructor>
                     <parameter><inject bean="RealTransactionManager"/></parameter>
                     </constructor>
                     </bean>
                    
                     <bean name="RealTransactionManager" class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple" />
                    
                    </deployment>
                    


                    • 7. Re: Deploying TransactionManager in Microcontainer standalon
                      Eduardo Martins Apprentice

                      A little bit off-topic, probably more a JTA doubt that JBossTS, but if Transaction.commit() is used (instead of TransactionManager.commit()) and succeeds a follow up TransactionManager.begin() fails, it is impossible to start a new transaction on the same thread?

                      • 8. Re: Deploying TransactionManager in Microcontainer standalon
                        Jonathan Halliday Master

                        The JTA spec says TransactionManager.commit() not only stops the tx, it also dissociates it from the Thread. No such requirement is placed on Transaction.commit() and in the case of JBossTS it does not do the Thread dissociation bit.

                        Since nested tx are not allowed in JTA, a subsequent begin on the same Thread will therefore fail. Use TransactionManager.commit(), or if you must use Transaction.commit(), then call suspend to decouple the tx from the Thread before doing another begin()

                        • 9. Re: Deploying TransactionManager in Microcontainer standalon
                          Eduardo Martins Apprentice

                          Thanks once again, valuable info ;-)