-
15. Re: Recovering non-serializable XAResource
lgsw_sam Mar 5, 2007 8:48 AM (in response to s0d0)Hi!
I have implemented XAResourceRecovery.classpackage fi.logiasoftware.sonicxaresourcerecovery; import java.sql.SQLException; import javax.jms.JMSException; import org.apache.log4j.Logger; import progress.message.jclient.xa.XAConnection; import progress.message.jclient.xa.XAConnectionFactory; import progress.message.jclient.xa.XASession; import progress.message.jimpl.xa.XAResource; import com.arjuna.ats.jta.recovery.XAResourceRecovery; public class SonicXAResourceRecovery implements XAResourceRecovery { private static Logger logger = Logger .getLogger("fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery"); private XAResource xaResource = null; private String[] brokers; private String username; private String password; private int counter = 0; private int b_count = 0; public SonicXAResourceRecovery() { logger.debug(" SonicXAResourceRecovery(Constructor)"); } public boolean initialise(String p) throws SQLException { brokers = p.split(","); b_count = brokers.length - 3; this.username = brokers[b_count + 1]; this.password = brokers[b_count + 2]; logger.debug("initialise"); return true; } public boolean hasMoreResources() { logger.debug("hasMoreResources[]counter:" + counter + " b_count:" + b_count); // Check if the resource has been recovered yet boolean toReturn = false; if (counter <= b_count) { toReturn = true; } else { counter = 0; } logger.debug("hasMoreResources: " + toReturn); return toReturn; } public XAResource getXAResource() throws SQLException { logger.debug("getXAResource: " + brokers[counter] + " counter:" + counter); // If the non serializable resource has not been recovered yet //if (hasMoreResources()) { try { XAConnectionFactory cf = new XAConnectionFactory( brokers[counter]); XAConnection conn = (XAConnection) cf.createXAConnection( username, password); XASession sess = (XASession) conn.createXASession(); xaResource = (XAResource) sess.getXAResource(); logger.debug("XAResource: " + xaResource.hashCode()); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } //} counter++; //logger.debug("XAResource: " + xaResource.toString()); // Return the non serializable XAResource return xaResource; } }
And added this to jta block of jbossjta-properties.xml file<property name="com.arjuna.ats.jta.recovery.XAResourceRecovery1" value="fi.logiasoftware.sonicxaresourcerecovery.SonicXAResourceRecovery;tcp://localhost:5711,tcp://localhost:5710,username,password"/> <property name="com.arjuna.ats.jta.xaRecoveryNode" value="*"/>
But still getting those15:23:04,249 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 >
errors and no recovery...
Have I missed something??
My implemented class is called as it is supposed...
Br,
Sami Männistö -
16. Re: Recovering non-serializable XAResource
lgsw_sam Mar 5, 2007 8:49 AM (in response to s0d0)Here is part of my log
2007-03-05 15:42:17,983 DEBUG [Sonic Resource Adapter for JCA] New connection, reference count is: 1 2007-03-05 15:42:18,093 DEBUG [Sonic Resource Adapter for JCA] Reference Count is now: 2 2007-03-05 15:42:18,097 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper CTOR, managed connection=com.sonicsw.sonicmq.j2ee.jmsra.impl.JMSSessionManagedConnection@3eb23eb2 2007-03-05 15:42:18,098 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.start: GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42,TMNOFLAGS 2007-03-05 15:42:18,098 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.enterTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42 2007-03-05 15:42:18,739 DEBUG [fi.logiasoftware.messageserver.services.backend.MessageSenderBase] Closing JMS connection 2007-03-05 15:42:18,740 DEBUG [Sonic Resource Adapter for JCA] Connection Closed event generated 2007-03-05 15:42:18,740 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42,TMSUSPEND 2007-03-05 15:42:18,742 DEBUG [Sonic Resource Adapter for JCA] Cleaning up session 2007-03-05 15:42:18,742 DEBUG [Sonic Resource Adapter for JCA] Reference count is now: 1 After free 2007-03-05 15:42:18,744 ERROR [STDERR] Mon Mar 05 15:42:18 EET 2007 DEBUG: Executing XA statement: XA END 0x312d2d33663364623863323a646535633a343565633165313 53a3237,0x2d33663364623863323a646535633a34356563316531353a3363,0x20003 2007-03-05 15:42:18,745 ERROR [STDERR] Mon Mar 05 15:42:18 EET 2007 DEBUG: Executing XA statement: XA PREPARE 0x312d2d33663364623863323a646535633a34356563316 531353a3237,0x2d33663364623863323a646535633a34356563316531353a3363,0x20003 2007-03-05 15:42:18,745 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42,TMSUCCESS 2007-03-05 15:42:18,746 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.prepare: GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42 2007-03-05 15:42:18,748 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 prepare result = TMNOFLAGS GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42 2007-03-05 15:42:18,808 ERROR [STDERR] Mon Mar 05 15:42:18 EET 2007 DEBUG: Executing XA statement: XA COMMIT 0x312d2d33663364623863323a646535633a343565633165 31353a3237,0x2d33663364623863323a646535633a34356563316531353a3363,0x20003 2007-03-05 15:42:18,808 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.commit: GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42,false 2007-03-05 15:42:18,818 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.leaveTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:27, BranchQual=-3f3db8c2:de5c:45ec1e15:42 2007-03-05 15:42:27,938 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.interna l.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 31, 29, 1--3f3db8c2:efb2:4 5d46e6d:113eb-3f3db8c2:efb2:45d46e6d:113ec > 2007-03-05 15:42:27,950 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources[]counter:0 b_count:1 2007-03-05 15:42:27,950 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources: true 2007-03-05 15:42:27,950 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] getXAResource: tcp://localhost:5711 counter:0 2007-03-05 15:42:28,140 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] XAResource: 1596219172 2007-03-05 15:42:28,215 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources[]counter:1 b_count:1 2007-03-05 15:42:28,215 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources: true 2007-03-05 15:42:28,215 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] getXAResource: tcp://localhost:5710 counter:1 2007-03-05 15:42:28,364 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] XAResource: 834679232 2007-03-05 15:42:28,419 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources[]counter:2 b_count:1 2007-03-05 15:42:28,419 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources: false 2007-03-05 15:43:17,735 ERROR [STDERR] Mon Mar 05 15:43:17 EET 2007 DEBUG: Executing XA statement: XA START 0x312d2d33663364623863323a646535633a3435656331653 1353a316437,0x2d33663364623863323a646535633a34356563316531353a316533,0x20003 2007-03-05 15:43:17,737 DEBUG [Sonic Resource Adapter for JCA] Reference Count is now: 2 2007-03-05 15:43:17,737 DEBUG [Sonic Resource Adapter for JCA] Added reference: 2 2007-03-05 15:43:17,737 DEBUG [Sonic Resource Adapter for JCA] FOUND MATCHING SESSION 2007-03-05 15:43:17,738 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.start: GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7, BranchQual=-3f3db8c2:de5c:45ec1e15:1e6,TMNOFLAGS 2007-03-05 15:43:17,738 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.enterTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7, BranchQual=-3f3db8c2:de5c:45ec1e15:1e6 2007-03-05 15:43:17,739 DEBUG [fi.logiasoftware.messageserver.services.backend.MessageSenderBase] Closing JMS connection 2007-03-05 15:43:17,739 DEBUG [Sonic Resource Adapter for JCA] Connection Closed event generated 2007-03-05 15:43:17,739 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7, BranchQual=-3f3db8c2:de5c:45ec1e15:1e6,TMSUSPEND 2007-03-05 15:43:17,739 DEBUG [Sonic Resource Adapter for JCA] Cleaning up session 2007-03-05 15:43:17,739 DEBUG [Sonic Resource Adapter for JCA] Reference count is now: 1 After free 2007-03-05 15:43:17,740 ERROR [STDERR] Mon Mar 05 15:43:17 EET 2007 DEBUG: Executing XA statement: XA END 0x312d2d33663364623863323a646535633a343565633165313 53a316437,0x2d33663364623863323a646535633a34356563316531353a316533,0x20003 2007-03-05 15:43:17,741 ERROR [STDERR] Mon Mar 05 15:43:17 EET 2007 DEBUG: Executing XA statement: XA PREPARE 0x312d2d33663364623863323a646535633a34356563316 531353a316437,0x2d33663364623863323a646535633a34356563316531353a316533,0x20003 2007-03-05 15:43:17,748 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7, BranchQual=-3f3db8c2:de5c:45ec1e15:1e6,TMSUCCESS 2007-03-05 15:43:17,749 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.prepare: GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7, BranchQual=-3f3db8c2:de5c:45ec1e15:1e6 2007-03-05 15:43:17,751 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 prepare result = TMNOFLAGS GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7 , BranchQual=-3f3db8c2:de5c:45ec1e15:1e6 2007-03-05 15:43:17,783 ERROR [STDERR] Mon Mar 05 15:43:17 EET 2007 DEBUG: Executing XA statement: XA COMMIT 0x312d2d33663364623863323a646535633a343565633165 31353a316437,0x2d33663364623863323a646535633a34356563316531353a316533,0x20003 2007-03-05 15:43:17,783 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.commit: GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7, BranchQual=-3f3db8c2:de5c:45ec1e15:1e6,false 2007-03-05 15:43:17,786 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.leaveTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:1d7, BranchQual=-3f3db8c2:de5c:45ec1e15:1e6 2007-03-05 15:44:17,736 ERROR [STDERR] Mon Mar 05 15:44:17 EET 2007 DEBUG: Executing XA statement: XA START 0x312d2d33663364623863323a646535633a3435656331653 1353a333739,0x2d33663364623863323a646535633a34356563316531353a333835,0x20003 2007-03-05 15:44:17,738 DEBUG [Sonic Resource Adapter for JCA] Reference Count is now: 2 2007-03-05 15:44:17,738 DEBUG [Sonic Resource Adapter for JCA] Added reference: 2 2007-03-05 15:44:17,738 DEBUG [Sonic Resource Adapter for JCA] FOUND MATCHING SESSION 2007-03-05 15:44:17,738 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.start: GlobalId=1--3f3db8c2:de5c:45ec1e15:379, BranchQual=-3f3db8c2:de5c:45ec1e15:388,TMNOFLAGS 2007-03-05 15:44:17,738 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.enterTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:379, BranchQual=-3f3db8c2:de5c:45ec1e15:388 2007-03-05 15:44:17,739 DEBUG [fi.logiasoftware.messageserver.services.backend.MessageSenderBase] Closing JMS connection 2007-03-05 15:44:17,739 DEBUG [Sonic Resource Adapter for JCA] Connection Closed event generated 2007-03-05 15:44:17,739 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:379, BranchQual=-3f3db8c2:de5c:45ec1e15:388,TMSUSPEND 2007-03-05 15:44:17,740 DEBUG [Sonic Resource Adapter for JCA] Cleaning up session 2007-03-05 15:44:17,740 DEBUG [Sonic Resource Adapter for JCA] Reference count is now: 1 After free 2007-03-05 15:44:17,741 ERROR [STDERR] Mon Mar 05 15:44:17 EET 2007 DEBUG: Executing XA statement: XA END 0x312d2d33663364623863323a646535633a343565633165313 53a333739,0x2d33663364623863323a646535633a34356563316531353a333835,0x20003 2007-03-05 15:44:17,741 ERROR [STDERR] Mon Mar 05 15:44:17 EET 2007 DEBUG: Executing XA statement: XA PREPARE 0x312d2d33663364623863323a646535633a34356563316 531353a333739,0x2d33663364623863323a646535633a34356563316531353a333835,0x20003 2007-03-05 15:44:17,742 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:379, BranchQual=-3f3db8c2:de5c:45ec1e15:388,TMSUCCESS 2007-03-05 15:44:17,742 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.prepare: GlobalId=1--3f3db8c2:de5c:45ec1e15:379, BranchQual=-3f3db8c2:de5c:45ec1e15:388 2007-03-05 15:44:17,744 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 prepare result = TMNOFLAGS GlobalId=1--3f3db8c2:de5c:45ec1e15:379 , BranchQual=-3f3db8c2:de5c:45ec1e15:388 2007-03-05 15:44:17,784 ERROR [STDERR] Mon Mar 05 15:44:17 EET 2007 DEBUG: Executing XA statement: XA COMMIT 0x312d2d33663364623863323a646535633a343565633165 31353a333739,0x2d33663364623863323a646535633a34356563316531353a333835,0x20003 2007-03-05 15:44:17,784 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.commit: GlobalId=1--3f3db8c2:de5c:45ec1e15:379, BranchQual=-3f3db8c2:de5c:45ec1e15:388,false 2007-03-05 15:44:17,787 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.leaveTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:379, BranchQual=-3f3db8c2:de5c:45ec1e15:388 2007-03-05 15:44:38,478 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.interna l.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 31, 29, 1--3f3db8c2:efb2:4 5d46e6d:113eb-3f3db8c2:efb2:45d46e6d:113ec > 2007-03-05 15:44:38,484 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources[]counter:0 b_count:1 2007-03-05 15:44:38,484 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources: true 2007-03-05 15:44:38,484 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] getXAResource: tcp://localhost:5711 counter:0 2007-03-05 15:44:38,753 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] XAResource: 1931506464 2007-03-05 15:44:38,776 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources[]counter:1 b_count:1 2007-03-05 15:44:38,776 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources: true 2007-03-05 15:44:38,776 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] getXAResource: tcp://localhost:5710 counter:1 2007-03-05 15:44:38,918 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] XAResource: 1117930146 2007-03-05 15:44:38,963 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources[]counter:2 b_count:1 2007-03-05 15:44:38,963 DEBUG [fi.logiasoftware.messageserver.services.backend.SonicXAResourceRecovery] hasMoreResources: false 2007-03-05 15:45:17,735 ERROR [STDERR] Mon Mar 05 15:45:17 EET 2007 DEBUG: Executing XA statement: XA START 0x312d2d33663364623863323a646535633a3435656331653 1353a353230,0x2d33663364623863323a646535633a34356563316531353a353263,0x20003 2007-03-05 15:45:17,737 DEBUG [Sonic Resource Adapter for JCA] Reference Count is now: 2 2007-03-05 15:45:17,737 DEBUG [Sonic Resource Adapter for JCA] Added reference: 2 2007-03-05 15:45:17,737 DEBUG [Sonic Resource Adapter for JCA] FOUND MATCHING SESSION 2007-03-05 15:45:17,737 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.start: GlobalId=1--3f3db8c2:de5c:45ec1e15:520, BranchQual=-3f3db8c2:de5c:45ec1e15:52f,TMNOFLAGS 2007-03-05 15:45:17,737 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.enterTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:520, BranchQual=-3f3db8c2:de5c:45ec1e15:52f 2007-03-05 15:45:17,748 DEBUG [fi.logiasoftware.messageserver.services.backend.MessageSenderBase] Closing JMS connection 2007-03-05 15:45:17,748 DEBUG [Sonic Resource Adapter for JCA] Connection Closed event generated 2007-03-05 15:45:17,748 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:520, BranchQual=-3f3db8c2:de5c:45ec1e15:52f,TMSUSPEND 2007-03-05 15:45:17,750 DEBUG [Sonic Resource Adapter for JCA] Cleaning up session 2007-03-05 15:45:17,750 DEBUG [Sonic Resource Adapter for JCA] Reference count is now: 1 After free 2007-03-05 15:45:17,750 ERROR [STDERR] Mon Mar 05 15:45:17 EET 2007 DEBUG: Executing XA statement: XA END 0x312d2d33663364623863323a646535633a343565633165313 53a353230,0x2d33663364623863323a646535633a34356563316531353a353263,0x20003 2007-03-05 15:45:17,751 ERROR [STDERR] Mon Mar 05 15:45:17 EET 2007 DEBUG: Executing XA statement: XA PREPARE 0x312d2d33663364623863323a646535633a34356563316 531353a353230,0x2d33663364623863323a646535633a34356563316531353a353263,0x20003 2007-03-05 15:45:17,751 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.end: GlobalId=1--3f3db8c2:de5c:45ec1e15:520, BranchQual=-3f3db8c2:de5c:45ec1e15:52f,TMSUCCESS 2007-03-05 15:45:17,752 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.prepare: GlobalId=1--3f3db8c2:de5c:45ec1e15:520, BranchQual=-3f3db8c2:de5c:45ec1e15:52f 2007-03-05 15:45:17,765 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 prepare result = TMNOFLAGS GlobalId=1--3f3db8c2:de5c:45ec1e15:520 , BranchQual=-3f3db8c2:de5c:45ec1e15:52f 2007-03-05 15:45:17,791 ERROR [STDERR] Mon Mar 05 15:45:17 EET 2007 DEBUG: Executing XA statement: XA COMMIT 0x312d2d33663364623863323a646535633a343565633165 31353a353230,0x2d33663364623863323a646535633a34356563316531353a353263,0x20003 2007-03-05 15:45:17,791 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.commit: GlobalId=1--3f3db8c2:de5c:45ec1e15:520, BranchQual=-3f3db8c2:de5c:45ec1e15:52f,false 2007-03-05 15:45:17,794 DEBUG [Sonic Resource Adapter for JCA] Timer-13 XAResource=61998002 XAResourceWrapper.leaveTransaction: GlobalId=1--3f3db8c2:de5c:45ec1e15:520, BranchQual=-3f3db8c2:de5c:45ec1e15:52f
Any hints for right direction would be appreciated.
Br,
Sami Männistö -
17. Re: Recovering non-serializable XAResource
marklittle Mar 5, 2007 9:15 AM (in response to s0d0)Is the XAResource returned by your implementation able to manage the Xid recovery required? Recovery will call recover on the instance and check the list of Xids that are returned. If they don't match the one(s) being recovered, then recovery can't do anything with them. That's why you are seeing:
15:23:04,249 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 >
One thing to try would be to call recover yourself on the XAResource you get back before returning it to JBossTS and see what Xids it thinks are to be recovered. -
18. Re: Recovering non-serializable XAResource
lgsw_sam Mar 6, 2007 1:54 AM (in response to s0d0)Hi Mark!
Here's my log that shows what Xids are returned from returning xaResource.08:17:13,977 DEBUG [SonicXAResourceRecovery] SonicXAResourceRecovery(Constructor) 08:17:13,980 DEBUG [SonicXAResourceRecovery] SonicXAResourceRecovery(Constructor) 08:17:13,980 DEBUG [SonicXAResourceRecovery] initialise 08:17:48,217 DEBUG [MessageSenderBase] Closing JMS connection 08:17:57,746 DEBUG [SonicXAResourceRecovery] hasMoreResources[]counter:0 b_count:1 08:17:57,746 DEBUG [SonicXAResourceRecovery] hasMoreResources: true 08:17:57,746 DEBUG [SonicXAResourceRecovery] getXAResource: tcp://localhost:5711 counter:0 08:17:58,021 DEBUG [SonicXAResourceRecovery] x[]: 1 08:17:58,021 DEBUG [SonicXAResourceRecovery] Xid:131075 : {Xid: formatID=131075, gtrid[27]=1-afd0239:80a:459967cc:3dc5, brid[25]=afd0239:80a:459967cc:3dcd} 08:17:58,021 DEBUG [SonicXAResourceRecovery] XAResource: 85984544 08:17:58,034 DEBUG [SonicXAResourceRecovery] hasMoreResources[]counter:1 b_count:1 08:17:58,034 DEBUG [SonicXAResourceRecovery] hasMoreResources: true 08:17:58,034 DEBUG [SonicXAResourceRecovery] getXAResource: tcp://localhost:5710 counter:1 08:17:58,487 DEBUG [SonicXAResourceRecovery] x[]: 5 08:17:58,487 DEBUG [SonicXAResourceRecovery] Xid:131075 : {Xid: formatID=131075, gtrid[27]=1-afd0239:e69:4581a308:1c6f, brid[25]=afd0239:e69:4581a308:1c70} 08:17:58,487 DEBUG [SonicXAResourceRecovery] Xid:131075 : {Xid: formatID=131075, gtrid[28]=1-afd0239:10cf:4582366c:6a8c, brid[26]=afd0239:10cf:4582366c:6a8d} 08:17:58,488 DEBUG [SonicXAResourceRecovery] Xid:131075 : {Xid: formatID=131075, gtrid[27]=1-afd0239:66b:45826402:5191, brid[25]=afd0239:66b:45826402:5192} 08:17:58,488 DEBUG [SonicXAResourceRecovery] Xid:131075 : {Xid: formatID=131075, gtrid[30]=1--3f3db8c2:ff78:45ab8aeb:12b4, brid[28]=-3f3db8c2:ff78:45ab8aeb:1 2b5} 08:17:58,488 DEBUG [SonicXAResourceRecovery] Xid:131075 : {Xid: formatID=131075, gtrid[31]=1--3f3db8c2:e5fd:45d2b3b0:d89bd, brid[29]=-3f3db8c2:e5fd:45d2b3b0: d89be} 08:17:58,488 DEBUG [SonicXAResourceRecovery] XAResource: 1409963018 08:17:58,496 DEBUG [SonicXAResourceRecovery] hasMoreResources[]counter:2 b_count:1 08:17:58,496 DEBUG [SonicXAResourceRecovery] hasMoreResources: false
I have set the xaRecoveryNode value in jbossjta-properties.xml to wildcard so it should try to recover any Xid.<property name="com.arjuna.ats.jta.xaRecoveryNode" value="*"/>
So it seems that the Xids returned don't match Xids recovered?
Any ideas?
Br,
Sami Männistö -
19. Re: Recovering non-serializable XAResource
marklittle Mar 6, 2007 6:45 AM (in response to s0d0)How and when does your failure happen? By "failure" I mean the one that subsequently requires crash recovery to run and attempt to recover things?
-
20. Re: Recovering non-serializable XAResource
lgsw_sam Mar 6, 2007 7:39 AM (in response to s0d0)Hi Mark!
We were doing exception testing, and we shutdown SonicMQ while sending messages to queue. Since then JBossTS have been throwing warning about XAResource it could not recover. It has been trying to recovery this transaction about two weeks now :)
Br,
Sami Männistö -
21. Re: Recovering non-serializable XAResource
marklittle Mar 6, 2007 7:46 AM (in response to s0d0)OK, so what will probably have happened is that at the Sonic side it has autonmously rolled back or committed the transaction without informing the transaction manager. That's not a good thing because it can lead to heuristics.
-
22. Re: Recovering non-serializable XAResource
s0d0 Mar 6, 2007 8:00 AM (in response to s0d0)Hi,
I would say it has rolled back transaction because one message is missing.
If it would have committed it, message would have been available in queue for MDB. We need to ask this from Sonic Software.
Br,
Juha Moisio -
23. Re: Recovering non-serializable XAResource
s0d0 May 11, 2007 4:16 AM (in response to s0d0)Hi,
We have implemented xa resource recovery modules for both
SonicMQ and MySQL.
SonicMQ module is written from scratch and mysql module
is modified from OracleXARecovery.
Some times we still getCould not find new XAResource to use for recovering non-serializable XAResource
warnings after shutting down sonic when message are being sent and received.
I don't have any idea what I should do next....
Could someone give me new angle to approach this problem?
-Juha- -
24. Re: Recovering non-serializable XAResource
doktora Jan 23, 2008 5:46 AM (in response to s0d0)To get rid of old messages delete
{jboss-dir}/server/{config}/data/tx-object-store -
25. Re: Recovering non-serializable XAResource
marklittle Jan 23, 2008 6:51 AM (in response to s0d0)NOT recommended. If you have transactions in flight and you get this error, then you need to fix it correctly: otherwise what is the point of using transactions. What you are suggesting is for people to simply remove the transaction logs. Hardly safe.
-
26. Re: Recovering non-serializable XAResource
doktora Feb 24, 2008 3:22 PM (in response to s0d0)"mark.little@jboss.com" wrote:
NOT recommended. If you have transactions in flight and you get this error, then you need to fix it correctly: otherwise what is the point of using transactions. What you are suggesting is for people to simply remove the transaction logs. Hardly safe.
Quite right, for a production environment. On a development one, it's quite a good fix, until you figure out what causes it in the first place so that you can prevent it in your production environment. -
27. Re: Recovering non-serializable XAResource
marklittle Feb 26, 2008 3:28 AM (in response to s0d0)"doktora" wrote:
On a development one, it's quite a good fix, until you figure out what causes it in the first place so that you can prevent it in your production environment.
Not recommended. -
28. Re: Recovering non-serializable XAResource
kself May 15, 2009 11:46 PM (in response to s0d0)Nothing wrong with doing this. Since JBoss is reporting a non-existance problem.
-
29. Re: Recovering non-serializable XAResource
marklittle May 18, 2009 7:24 AM (in response to s0d0)If you are doing this during development then fine. But not during production. Even during development you really should try to figure out what the problem is.