7 Replies Latest reply on Jun 26, 2009 8:46 AM by Mariusz Smykula

    XARecovery: setting the provider name

    mskonda Apprentice

      In the earlier versions of JBM, I used to provide the providerName using the format shown below

      <property name="com.arjuna.ats.jta.recovery.XAResourceRecoveryMessaging" value="org.jboss.jms.recovery.JMSProviderXAResourceRecovery;ProviderName=DefaultJMSProvider"/>
      


      (Ofcourse the class is now changed to MessagingXAResourceRecovery)

      Looks like, the value tag wouldn't accept the ProviderName=* anymore.

      If I leave without any value, it would pick up DefaultJMSProvider as the ProvidreName:.
      <property name="com.arjuna.ats.jta.recovery.XAResourceRecoveryMessaging" value="org.jboss.jms.recovery.MessagingXAResourceRecovery"/>
      


      However, what if I don't have the same name (DefaultJMSProvider) as my provider' name?

      I'm sure there must be way, only I didn't find it.

      thanks
      Madhu

        • 1. Re: XARecovery: setting the provider name
          Tim Fox Master

          You should use something like:

          <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.recovery1" value="org.jboss.jms.recovery.MessagingXAResourceRecovery;ProviderName"/>
          


          Where is the provider name.

          • 2. Re: XARecovery: setting the provider name
            mskonda Apprentice

            Sorry Tim, I didn't get you there.

            How do you provide the proivder name?

            • 3. Re: XARecovery: setting the provider name
              Tim Fox Master

              Substitute "ProviderName" with whatever is your provider name.

              • 4. Re: XARecovery: setting the provider name
                mskonda Apprentice

                As RecoveryManager starts before the DefaultJMSPrvider is hooked up, we may receive name not found exceptions something like this:

                2007-03-14 16:14:26,542 INFO [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.loading] Local XARecoveryModule loading org.jboss.jms.recovery.MessagingXAResourceRecoveryDefaultJMSProvider
                2007-03-14 16:14:26,549 ERROR [org.jboss.jms.recovery.MessagingXAResourceRecovery] Failed to look up provider adaptor
                javax.naming.NameNotFoundException: DefaultJMSProvider not bound
                 at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
                 at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
                 at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
                 at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
                 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
                 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
                 at javax.naming.InitialContext.lookup(InitialContext.java:351)
                 at org.jboss.jms.recovery.MessagingXAResourceRecovery.initialise(MessagingXAResourceRecovery.java:102)
                 at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.<init>(XARecoveryModule.java:356)
                 at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.<init>(XARecoveryModule.java:76)
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                 at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                 at java.lang.Class.newInstance0(Class.java:350)
                 at java.lang.Class.newInstance(Class.java:303)
                 at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.loadModule(PeriodicRecovery.java:355)
                 at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.loadModules(PeriodicRecovery.java:324)
                 at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.<init>(PeriodicRecovery.java:85)
                 at com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple.<init>(RecoveryManagerImple.java:128)
                 at com.arjuna.ats.arjuna.recovery.RecoveryManager.<init>(RecoveryManager.java:255)
                 at com.arjuna.ats.arjuna.recovery.RecoveryManager.manager(RecoveryManager.java:121)
                 at com.arjuna.ats.arjuna.recovery.RecoveryManager.manager(RecoveryManager.java:102)
                 at com.arjuna.ats.jbossatx.jta.TransactionManagerService.startService(TransactionManagerService.java:140)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:417)
                 at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                 at $Proxy5.deploy(Unknown Source)
                 at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                 at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                 at org.jboss.Main.boot(Main.java:200)
                 at org.jboss.Main$1.run(Main.java:490)
                 at java.lang.Thread.run(Thread.java:595)
                2007-03-14 16:14:26,554 INFO [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.noxanodes] No XA recovery nodes specified. Will only recover saved states.
                2007-03-14 16:14:26,559 INFO [com.arjuna.ats.arjuna.logging.arjLogger] RecoveryManagerImple is ready on port 41897
                


                Supressing with a one-line waring message and retrying after the server is back(after few minutes) might do the cure.

                Thanks
                Madhu

                • 5. Re: XARecovery: setting the provider name
                  Tim Fox Master

                  You can add a delay in the recovery manager startup so it pauses a while before starting recovery.

                  Have a look in the JBoss TS recovert manager config for more details

                  • 6. Re: XARecovery: setting the provider name
                    mskonda Apprentice

                    I couldn't find appropriate proeprty to delay the intiial RM startup Tim.

                    <properties depends="arjuna" name="recoverymanager">
                     <!--
                     Properties used only by the RecoveryManager.
                     -->
                     <!--
                     Periodic recovery settings.
                     Time values in this section are in seconds.
                     -->
                     <!--
                     Interval in seconds between initiating the periodic recovery modules.
                     Default is 120 seconds.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.periodicRecoveryPeriod" value="120"/>
                     <!--
                     Interval in seconds between first and second pass of periodic recovery.
                     Default is 10 seconds.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.recoveryBackoffPeriod" value="10"/>
                     <!--
                     Periodic recovery modules to use. Invoked in sort-order of names.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.recoveryExtension1" value="com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"/>
                     <property
                     name="com.arjuna.ats.arjuna.recovery.recoveryExtension2" value="com.arjuna.ats.internal.txoj.recovery.TORecoveryModule"/>
                     <!--
                     Expired entry removal
                     -->
                     <!--
                     Expiry scanners to use (order of invocation is random).
                     Names must begin with "com.arjuna.ats.arjuna.recovery.expiryScanner"
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.expiryScannerTransactionStatusManager" value="com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner"/>
                     <!--
                     Interval, in hours, between running the expiry scanners.
                     This can be quite long. The absolute value determines the interval -
                     if the value is negative, the scan will NOT be run until after one
                     interval has elapsed. If positive the first scan will be immediately
                     after startup. Zero will prevent any scanning.
                     Default = 12 = run immediately, then every 12 hours.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.expiryScanInterval" value="12"/>
                     <!--
                     Age, in hours, for removal of transaction status manager item.
                     This should be longer than any ts-using process will remain running.
                     Zero = Never removed. Default is 12.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerExpiryTime" value="12"/>
                     <!--
                     Use this to fix the port on which the TransactionStatusManager listens,
                     The default behaviour is to use any free port.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerPort" value="0"/>
                     <!--
                     Properties used only by the RecoveryManager.
                     -->
                     <!--
                     Periodic recovery settings.
                     Time values in this section are in seconds.
                     -->
                     <!--
                     Interval in seconds between initiating the periodic recovery modules.
                     Default is 120 seconds.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.periodicRecoveryPeriod" value="120"/>
                     <!--
                     Interval in seconds between first and second pass of periodic recovery.
                     Default is 10 seconds.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.recoveryBackoffPeriod" value="10"/>
                     <!--
                     Periodic recovery modules to use. Invoked in sort-order of names.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.recoveryExtension1" value="com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"/>
                     <property
                     name="com.arjuna.ats.arjuna.recovery.recoveryExtension2" value="com.arjuna.ats.internal.txoj.recovery.TORecoveryModule"/>
                     <property
                     name="com.arjuna.ats.arjuna.recovery.recoveryExtension3" value="com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"/>
                     <!--
                     Expired entry removal
                     -->
                     <!--
                     Expiry scanners to use (order of invocation is random).
                     Names must begin with "com.arjuna.ats.arjuna.recovery.expiryScanner"
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.expiryScannerTransactionStatusManager" value="com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner"/>
                     <!--
                     Interval, in hours, between running the expiry scanners.
                     This can be quite long. The absolute value determines the interval -
                     if the value is negative, the scan will NOT be run until after one
                     interval has elapsed. If positive the first scan will be immediately
                     after startup. Zero will prevent any scanning.
                     Default = 12 = run immediately, then every 12 hours.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.expiryScanInterval" value="12"/>
                     <!--
                     Age, in hours, for removal of transaction status manager item.
                     This should be longer than any ts-using process will remain running.
                     Zero = Never removed. Default is 12.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerExpiryTime" value="12"/>
                     <!--
                     Use this to fix the port on which the TransactionStatusManager listens,
                     The default behaviour is to use any free port.
                     -->
                     <property
                     name="com.arjuna.ats.arjuna.recovery.transactionStatusManagerPort" value="0"/>
                     </properties>


                    • 7. Re: XARecovery: setting the provider name
                      Mariusz Smykula Newbie

                      I also cant find this, thank you timfox for your fast reply...

                      Can you create working and error less example of configuring failover for JMS?