[
https://jira.jboss.org/jira/browse/JBTM-441?page=com.atlassian.jira.plugi...
]
John Mazzitelli commented on JBTM-441:
--------------------------------------
Better catch Throwable in here, not just Exception. I just ran a test and my postgres jdbc
driver dumped the following to STDERR - notice the java.lang.AbstractMethodError:
2008-12-03 13:38:01,062 ERROR [STDERR] Exception in thread "Thread-5"
2008-12-03 13:38:01,062 ERROR [STDERR] java.lang.AbstractMethodError:
org.postgresql.jdbc3.Jdbc3Connection.isValid(I)Z
2008-12-03 13:38:01,062 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2008-12-03 13:38:01,062 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2008-12-03 13:38:01,062 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2008-12-03 13:38:01,062 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:597)
2008-12-03 13:38:01,062 ERROR [STDERR] at
org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$ConnectionHandler.invoke(AbstractJdbc23PooledConnection.java:363)
2008-12-03 13:38:01,062 ERROR [STDERR] at $Proxy47.isValid(Unknown Source)
2008-12-03 13:38:01,062 ERROR [STDERR] at
org.rhq.jbossatx.jta.recovery.AppServerJDBCXARecovery.createConnection(AppServerJDBCXARecovery.java:205)
2008-12-03 13:38:01,062 ERROR [STDERR] at
org.rhq.jbossatx.jta.recovery.AppServerJDBCXARecovery.getXAResource(AppServerJDBCXARecovery.java:109)
2008-12-03 13:38:01,062 ERROR [STDERR] at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecovery(XARecoveryModule.java:683)
2008-12-03 13:38:01,062 ERROR [STDERR] at
com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:179)
2008-12-03 13:38:01,062 ERROR [STDERR] at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWork(PeriodicRecovery.java:237)
2008-12-03 13:38:01,062 ERROR [STDERR] at
com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:163)
We need to guard against the driver not supporting that API (it also looks like that API
is JDK6 only? Might have to do some java reflection here in case this code runs inside JDK
1.5).
AppServerJDBCXARecovery does not cope with stale connections
------------------------------------------------------------
Key: JBTM-441
URL:
https://jira.jboss.org/jira/browse/JBTM-441
Project: JBoss Transaction Manager
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Application Server Integration
Affects Versions: 4.2.3.SP7, 4.2.3.CP02
Reporter: Jonathan Halliday
Assignee: Jonathan Halliday
Fix For: 4.2.3.SP8, 4.2.3.CP03
If the db bounces whilst the app server stays up, the AppServerJDBCXARecovery is left
holding an invalid connection, which causes XAResource on it to throw spurious errors. It
should refresh the connection on every call, or at least check it for validity before
handing out an XAResource based on it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira