[jboss-jira] [JBoss JIRA] Commented: (JBAS-1341) XA Recovery

Adrian Brock (JIRA) jira-events at lists.jboss.org
Tue Feb 17 05:06:54 EST 2009


    [ https://jira.jboss.org/jira/browse/JBAS-1341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12452906#action_12452906 ] 

Adrian Brock commented on JBAS-1341:
------------------------------------

To enable this experimental feature within JBossMQ change the jdbc2 persistence to
To use this feature, you need a recovering transaction manager.

1) Set XARecovery=true
2) Add the alternate queries that will then be used to perform the recovery.

  <mbean code="org.jboss.mq.pm.jdbc2.PersistenceManager"
name="jboss.mq.recovery:service=PersistenceManager">
...
    <attribute name="XARecovery">true</attribute>
    <attribute name="SqlProperties">
...
      INSERT_TX_XARECOVERY = INSERT INTO JMS_TRANSACTIONS (TXID, XID) VALUES(?, ?)
      DELETE_ALL_TX_XARECOVERY = DELETE FROM JMS_TRANSACTIONS WHERE XID IS NULL
      SELECT_ALL_TX_XARECOVERY = SELECT TXID, XID FROM JMS_TRANSACTIONS
      SELECT_MESSAGES_IN_DEST_XARECOVERY = SELECT MESSAGEID, MESSAGEBLOB, TXID, TXOP FROM JMS_MESSAGES WHERE DESTINATION=?
      SELECT_MESSAGE_XARECOVERY = SELECT MESSAGEID, MESSAGEBLOB, TXID, TXOP FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
      UPDATE_MARKED_MESSAGES_XARECOVERY = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID NOT IN (SELECT TXID FROM JMS_TRANSACTIONS WHERE XID IS NOT NULL)
      DELETE_MARKED_MESSAGES_WITH_TX_XARECOVERY = DELETE FROM JMS_MESSAGES WHERE TXOP=? AND JMS_MESSAGES.TXID IN (SELECT TXID FROM JMS_TRANSACTIONS WHERE XID IS NULL)
      CREATE_TX_TABLE_XARECOVERY = CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER, XID OBJECT, PRIMARY KEY (TXID) )
      CREATE_TABLES_ON_STARTUP = TRUE
    </attribute>

Notes.
1) Change the type OBJECT for the XID to be whatever is the blob type for the database (see MESSAGEBLOB on the JMS_MESSAGES table)
2) If you already started JBoss once, you'll need to drop table JMS_TRANSACTIONS or "alter table"
it to add the new column.

> XA Recovery
> -----------
>
>                 Key: JBAS-1341
>                 URL: https://jira.jboss.org/jira/browse/JBAS-1341
>             Project: JBoss Application Server
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>          Components: JMS (JBossMQ)
>    Affects Versions: JBossAS-3.2.7 Final, JBossAS-4.0.1 Final
>            Reporter: Adrian Brock
>            Assignee: Adrian Brock
>             Fix For: JBossAS-4.0.5.CR1, JBossAS-5.0.0.Beta1
>
>
> XARecovery needs to completed by implementing XAResource.recover().
> To make this work, the persistence manager will need to remember the Xids and return
> the list in response to the above request.
> The current implementation which heuristically rollsback incomplete transactions at recovery
> will need to be disabled when recovery is required.

-- 
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 jboss-jira mailing list