[jboss-jira] [JBoss JIRA] Updated: (JBAS-5502) Enabling JBossMQ XA recovery fails
Adrian Brock (JIRA)
jira-events at lists.jboss.org
Tue May 13 08:53:26 EDT 2008
[ http://jira.jboss.com/jira/browse/JBAS-5502?page=all ]
Adrian Brock updated JBAS-5502:
-------------------------------
Workaround Description: Set RecoverMessagesChunk to 0
Fix Version/s: JBossAS-4.2.3.GA
Affects Version/s: JBossAS-4.2.2.GA
(was: JBossAS-4.2.3.GA)
Workaround: [Workaround Exists]
This problem occurs when XARecovery is combined with " recover message chunking"
i.e. RecoveryMessagesChunk != 0
Setting this to 0 will avoid the problem but it could lead to OutOfMemoryError on databases
like MySQL where it loads the entire ResultSet (i.e. all the data for the queue including the
message bodies) into memory.
As suggested in the bug report, the fix is to use the correct result set:
[ejort at warjort jdbc2]$ svn diff PersistenceManager.java
Index: PersistenceManager.java
===================================================================
--- PersistenceManager.java (revision 73342)
+++ PersistenceManager.java (working copy)
@@ -646,8 +646,8 @@
message = extractMessage(rs2);
if (xaRecovery)
{
- txid = rs.getLong(3);
- txop = rs.getString(4);
+ txid = rs2.getLong(3);
+ txop = rs2.getString(4);
}
}
> Enabling JBossMQ XA recovery fails
> ----------------------------------
>
> Key: JBAS-5502
> URL: http://jira.jboss.com/jira/browse/JBAS-5502
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JMS service
> Affects Versions: JBossAS-4.2.2.GA
> Environment: Version 4.2.3_GA_SP of jbossts
> Reporter: Michael Musgrove
> Assigned To: Adrian Brock
> Priority: Optional
> Fix For: JBossAS-4.2.3.GA
>
>
> Set the XARecovery property of the JBossMQ PersistenceManager mbean to true. When the persistence manager tries to restore a queue it gets the following exception.
> Caused by: java.sql.SQLException: Column Index out of range, 3 > 1.
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
> at com.mysql.jdbc.ResultSet.checkColumnBounds(ResultSet.java:690)
> at com.mysql.jdbc.ResultSet.getLong(ResultSet.java:2854)
> at com.mysql.jdbc.ResultSet.getLong(ResultSet.java:2845)
> at org.jboss.resource.adapter.jdbc.WrappedResultSet.getLong(WrappedResultSet.java:721)
> at org.jboss.mq.pm.jdbc2.PersistenceManager.internalRestoreQueue(PersistenceManager.java:649)
> This is because it is using the wrong result set on line 648 of org.jboss.mq.pm.jdbc2.PersistenceManager
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list