1 2 3 Previous Next 35 Replies Latest reply on Oct 31, 2013 2:46 PM by karl_zhang

    Recovering non-serializable XAResource

      Hi,

      We are using JBoss 4.0.5GA with JBossTS (jta) and Sonic JCA Adapter for JBoss to connect SonicMQ JMS Server.

      We have clustered sonic server and the JCA adapter is capable to reconnect another node when connection is dropped.

      Today we made a test where we crashed Sonic server during sending and receiving messages, one message was lost, and after that JBossTS
      started to log:

      21:58:33,137 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 31, 29, 1--3f3db8c2:efb2:45d46e6d:113eb-3f3db8c2:efb2:45d46e6d:113ec >
      



      Server is still running and TS has been logging this several hours.
      I tried to google and read manuals but I did not figure out
      meaning of this warning. Could someone tell me what is going?

      Best regards,

      Juha Moisio








        • 1. Re: Recovering non-serializable XAResource
          marklittle

          Is the XAResource serializable?

          • 2. Re: Recovering non-serializable XAResource

            Hi Mark,


            Do you know if there is some way I can check it without asking from Sonic Software? Because I'm quite sure we are dealing with Sonic's XAResource...


            And if I guess right, it isn't serializable....

            -Juha-

            • 3. Re: Recovering non-serializable XAResource
              marklittle

              I suspect it isn't serializable. In which case you need to read the Failure Recovery Guide and the JTA Programmers Guide and look at what they have to say about the Recovery Manager and the XAResourceRecovery interface. Then check out http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossTSRecovery.

              • 4. Re: Recovering non-serializable XAResource



                I just noticed, it also can be MySQL XAResource... is there any tool I can use to read files in JBossTS object store?


                -Juha-

                • 5. Re: Recovering non-serializable XAResource

                  I'm just wondering if someone could provide good example
                  of RecoveryModule for non-serializable XAResource.

                  Br,

                  Juha Moisio

                  • 6. Re: Recovering non-serializable XAResource
                    marklittle

                    Have you worked through the recovery tests I pointed out?

                    • 7. Re: Recovering non-serializable XAResource

                      Sorry no... I have been very busy with other projects.
                      I will check them when I've time.

                      Br,

                      Juha Moisio

                      • 8. Re: Recovering non-serializable XAResource

                        Hi Mark,

                        I gor answer from Sonic Software. They said that Sonic's XAResource
                        is not serializable. Does that mean I have to write own RecoveryModule for it?

                        I know you told me to make those tests...
                        I still haven't had time do them :-(


                        Br,

                        Juha Moisio

                        • 9. Re: Recovering non-serializable XAResource
                          marklittle

                          Yes. Definitely look at those examples.

                          • 10. Re: Recovering non-serializable XAResource

                            Ok. It good to know that I'm on right track :)
                            Thanks for your help (again).


                            Br,

                            Juha

                            • 11. Re: Recovering non-serializable XAResource
                              lgsw_sam

                              Hi Mark!
                              S0d0 is in Paris this week at the IBM Conference so I am writing the implementation of XAResourceRecovery class. I have gone throe those examples and discussed the problem with Sonic Software. I still have some questions about jbossjta-properties.xml file.

                              Where in *properties.xml file I should insert the properties

                              com.arjuna.ats.jta.recovery.XAResourceRecoveryOracle=com.foo.barRecovery
                              and
                              com.arjuna.ats.jta.xaRecoveryNode

                              as said in jtaProgrammersGuide?

                              And what should be the value of xaRecoveryNode? How to know what kind of identifier JbossTs creates for the node?

                              Here is my jbossjta-properties.xml file. Properties in question are at the end of file.


                              <?xml version="1.0" encoding="UTF-8"?>
                              <transaction-service>
                               <properties depends="common" name="arjuna">
                               <!--
                               Transaction Reaper Timeout (default is 120000 microseconds).
                               -->
                               <property
                               name="com.arjuna.ats.arjuna.coordinator.txReaperTimeout" value="120000"/>
                               <!--
                               Transaction Reaper Mode, can be: NORMAL or DYNAMIC (default is NORMAL).
                               -->
                               <property name="com.arjuna.ats.arjuna.coordinator.txReaperMode" value="NORMAL"/>
                               <!--
                               (default is NO)
                               -->
                               <property name="com.arjuna.ats.arjuna.coordinator.asyncCommit" value="NO"/>
                               <!--
                               (default is NO)
                               -->
                               <property name="com.arjuna.ats.arjuna.coordinator.asyncPrepare" value="NO"/>
                               <!--
                               (default is YES)
                               -->
                               <!-- jmo -->
                               <property
                               name="com.arjuna.ats.arjuna.coordinator.commitOnePhase" value="YES"/>
                               <!--
                               (default is defaultStore)
                               -->
                               <property name="com.arjuna.ats.arjuna.objectstore.localOSRoot" value="defaultStore"/>
                               <!--
                               default is under user.home - must be writeable!)
                               -->
                               <property
                               name="com.arjuna.ats.arjuna.objectstore.objectStoreDir" value="/msgsrv/jboss-4.0.5.SP1-ejb3-svn/server/default/jbosstsObjectStore"/>
                               <!--
                               (default is ON)
                               -->
                               <property
                               name="com.arjuna.ats.arjuna.objectstore.objectStoreSync" value="ON"/>
                               <!--
                               (default is ShadowNoFileLockStore)
                               -->
                               <property
                               name="com.arjuna.ats.arjuna.objectstore.objectStoreType" value="ShadowNoFileLockStore"/>
                               <!--
                               (default is 255)
                               -->
                               <property
                               name="com.arjuna.ats.arjuna.objectstore.hashedDirectories" value="255"/>
                               <!--
                               (default is ON)
                               -->
                               <property
                               name="com.arjuna.ats.arjuna.objectstore.transactionSync" value="ON"/>
                               <!--
                               (Must be unique across all Arjuna instances.)
                               -->
                               <property name="com.arjuna.ats.arjuna.xa.nodeIdentifier" value="1"/>
                               <!-- property
                               name="com.arjuna.ats.arjuna.coordinator.actionStore"
                               value="HashedActionStore"
                               value="JDBCActionStore"
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.objectstore.jdbcTxDbAccess"
                               value="JDBCAccess"
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.objectstore.objectStoreType"
                               value="ShadowNoFileLockStore"
                               value="JDBCStore"
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.objectstore.jdbcUserDbAccess"
                               value="JDBCAccess"
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.objectstore.jdbcPoolSizeInitial"
                               value="1"
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.objectstore.jdbcPoolSizeMaximum"
                               value="1"
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.objectstore.jdbcPoolPutConnections"
                               value="false"
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.internal.arjuna.objectstore.cacheStore.size"
                               value=""
                               -->
                               <!-- property
                               name="com.arjuna.ats.arjuna.internal.arjuna.objectstore.cacheStore.period"
                               value=""
                               -->
                               <!--
                               The location for creating temporary files, e.g., Uids.
                               Default is under user.home.
                               IMPORTANT: make sure the directory is lockable, e.g., /tmp on Unix
                               may not be!
                               -->
                               <!--
                               <property
                               name="com.arjuna.ats.arjuna.common.varDir"
                               value="var"/>
                               -->
                               </properties>
                               <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"/>
                               <!--
                               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.ExpiredTransactionStat
                              usManagerScanner"/>
                               <!--
                               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.ExpiredTransactionStat
                              usManagerScanner"/>
                               <!--
                               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="2"/>
                               <!--
                               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>
                               <properties name="common">
                               <!-- CLF 2.0 properties -->
                               <property name="com.arjuna.common.util.logging.DebugLevel"
                               type="System" value="0x00000000"/>
                               <property name="com.arjuna.common.util.logging.FacilityLevel"
                               type="System" value="0xffffffff"/>
                               <property name="com.arjuna.common.util.logging.VisibilityLevel"
                               type="System" value="0xffffffff"/>
                               <property name="com.arjuna.common.util.logger" type="System" value="log4j"/>
                               </properties>
                               <properties depends="arjuna" name="txoj">
                               <!--
                               (default is LockStore of installation - must be writeable!)
                               -->
                               <!--
                               <property
                               name="com.arjuna.ats.txoj.lockstore.lockStoreDir"
                               value="LockStore"/>
                               -->
                               <!--
                               (default is BasicLockStore)
                               -->
                               <property name="com.arjuna.ats.txoj.lockstore.lockStoreType" value="BasicLockStore"/>
                               <!--
                               (default is NO)
                               -->
                               <property name="com.arjuna.ats.txoj.lockstore.multipleLockStore" value="NO"/>
                               <!--
                               (default is YES)
                               -->
                               <property name="com.arjuna.ats.txoj.lockstore.singleLockStore" value="YES"/>
                               <!--
                               (default is YES)
                               -->
                               <property
                               name="com.arjuna.ats.txoj.lockstore.allowNestedLocking" value="YES"/>
                               </properties>
                               <properties depends="arjuna" name="jta">
                               <!--
                               Support subtransactions in the JTA layer?
                               Default is NO.
                               -->
                               <property name="com.arjuna.ats.jta.supportSubtransactions" value="NO"/>
                               <property name="com.arjuna.ats.jta.jtaTMImplementation" value="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple"/>
                               <!--
                               com.arjuna.ats.internal.jta.transaction.jts.TransactionManagerImple
                               -->
                               <property name="com.arjuna.ats.jta.jtaUTImplementation" value="com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple"/>
                               <!--
                               com.arjuna.ats.internal.jta.transaction.jts.UserTransactionImple
                               -->
                               </properties>
                               <!-- lisatty tama propertiesblock! <sami> -->
                               <properties depends="jts" name="jta">
                               <property
                               name="com.arjuna.ats.jta.recovery.XAResourceRecovery1"
                               value="com.arjuna.demo.recovery.xaresource.NonSerializableExampleXAResourceRecovery"/>
                              
                               <property name="com.arjuna.ats.jta.xaRecoveryNode" value="*"/>
                              
                               </properties>
                               <properties depends="jta" name="jdbc">
                               <property name="com.arjuna.ats.jdbc.isolationLevel" value="TRANSACTION_READ_COMMITTED"/>
                               </properties>
                              </transaction-service>
                              


                              Br,
                              Sami Männistö

                              • 12. Re: Recovering non-serializable XAResource
                                marklittle

                                 

                                "LGSW_Sam" wrote:
                                Hi Mark!
                                I still have some questions about jbossjta-properties.xml file.

                                Where in *properties.xml file I should insert the properties

                                com.arjuna.ats.jta.recovery.XAResourceRecoveryOracle=com.foo.barRecovery
                                and
                                com.arjuna.ats.jta.xaRecoveryNode


                                As it says in the recovery examples on the wiki:

                                "You also need to add the following to the jta section of your properties file: "

                                Please check out the wiki examples before proceeding. They will help explain a lot of what is going on.


                                as said in jtaProgrammersGuide?

                                And what should be the value of xaRecoveryNode? How to know what kind of identifier JbossTs creates for the node?


                                It needs to be alphanumeric. All you need to do is make sure that the value is unique across your nodes. Some users simply start at "1" and work their way up.

                                • 13. Re: Recovering non-serializable XAResource
                                  lgsw_sam

                                  Hi Mark!

                                  It says following in the ProgrammersGuide


                                  Note: When running XA recovery it is necessary to tell JBossTS which types of Xid it can recover. Each Xid that JBossTS creates has a unique node identifier encoded within it and JBossTS will only recover transactions and states that match a specified node identifier. The node identifier to use should be provided to JBossTS via a property that starts with the name com.arjuna.ats.jta.xaRecoveryNode; multiple values may be provided. A value of ?*? will force JBossTS to recover (and possibly rollback) all transactions irrespective of their node identifier and should be used with caution.


                                  You said


                                  It needs to be alphanumeric. All you need to do is make sure that the value is unique across your nodes. Some users simply start at "1" and work their way up.


                                  As I have understand it JBossTS handles the creation of that identifier. I am only trying to implement XAResourceRecovery for non-serializable XAResource. So can I use

                                  <property name="com.arjuna.ats.jta.xaRecoveryNode" value="*"/>
                                  


                                  in jbossjta-properties.xml file even thou it says


                                  A value of ?*? will force JBossTS to recover (and possibly rollback) all transactions irrespective of their node identifier and should be used with caution.


                                  Br,

                                  Sami Männistö

                                  • 14. Re: Recovering non-serializable XAResource
                                    marklittle

                                    If you check out the JTA guides that ship with the product, you will see reference to com.arjuna.ats.arjuna.xa.nodeIdentifier. This needs to be unique for each node in your environment. xaRecoveryNode tells the recovery subsystem which nodeIdentifiers is should perform recovery on and which it should ignore. * is a wildcard.

                                    1 2 3 Previous Next