[jbossts-issues] [JBoss JIRA] Commented: (JBTM-441) AppServerJDBCXARecovery does not cope with stale connections

John Mazzitelli (JIRA) jira-events at lists.jboss.org
Wed Dec 3 13:32:37 EST 2008

    [ https://jira.jboss.org/jira/browse/JBTM-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12440967#action_12440967 ] 

John Mazzitelli commented on JBTM-441:

code like this in that class should help (note the use of isValid() now, as opposed to just checking to see if the connection is null or not):

    private final void createConnection() throws SQLException {
            boolean isConnectionValid;
            try {
                isConnectionValid = (_connection != null && _connection.getConnection().isValid(5));
            } catch (Exception e) {
                isConnectionValid = false;
                log.error("XA connection is invalid - will recreate a new one ", e);

            if (!isConnectionValid) {
                _connection = _dataSource.getXAConnection();

> 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


More information about the jbossts-issues mailing list