I'm facing a weird problem using Bitronix Transaction Manager with Websphere MQ and an Oracle database.
My Spring application unstacks MQ messages and inject them in a database table with a XA transaction.
My test scenario is :
- Inject 1000 messages in the queue.
- Start the application.
- Kill the application when there are about 500 messages in the queue.
- Count messages left in queue and inserted in database.
- Restart the application to empty the queue.
Every time, I execute this scenario I lost a MQ message! But the strange thing about this problem is that the message that disapears from the queue reapears the next day...
In the MQ log, I found those errors:
AMQ7469: Transactions rolled back to release log space. EXPLANATION: The log space for the queue manager is becoming full. One or more long-running transactions have been rolled back to release log space so that the queue manager can continue to process requests. ACTION: Try to ensure that the duration of your transactions is not excessive. Consider increasing the size of the log to allow transactions to last longer before the log starts to become full.
AMQ7486: Transaction 0.515122 was preventing log space from being released.
A long running transaction was detected. Message AMQ7469 or AMQ7485 has been
issued indicating if the transaction was rolled back or rolled forward in the
log to allow the log space to be released. The internal transaction identifier
is 0.515122 which can be correlated with 'dspmqtrn -a' output. The transaction
started at 18.28.19 2013-08-01 and first wrote to the queue manager recovery
log at 18.28.19 2013-08-01 . The following transaction context may be useful
in identifying the application causing this behaviour: TRANNUM(0.515122) . This
message can be correllated with the previous AMQ7469 or AMQ7485 message in the
queue manager error logs.
Identify the application responsible for the long running unit of work and
ensure this application is creating and completing transactions in a timely
manner. If the application is working as expected it may be appropriate to
increase the size of the queue manager recovery log.
Websphere MQ does not seem to rollback the transaction when I kill the application. The queue manager keeps it in its recovery log and actually rollback the transaction when the log file is full. At this moment, the message reappears in the queue.
Has someone already encountered this problem?
MQ configuration may be able to shed light on it.
Nothing comes to mind off the top of my head. You might try enabling debug levelfrom the log messages you presented it seems like someone knowledgeable in
logging in BTM to see if you can correlate transactions between AMQ, the
application and BTM. I would also suggest asking this over in the MQ forums, as
On Tue, Aug 6, 2013 at 9:25 PM, khaliloo <[hidden email]> wrote:
I found the cause of my problem : My Apache Camel configuration was wrong. It created a transaction for each used resource. Coherence between JMS and database is now ok.
I still have a problem, I got this error when I restart the application after a crash :
[ERROR] 2013-08-08 11:19:30,707 [MPH-DEV] [CAMEL] [main] [RecoveryHelper] : unable to rollback aborted in-doubt branch on resource mphHistoryDataSource - error=XAER_RMERR, extra error=ORA-1031.
Caused by: java.sql.SQLSyntaxErrorException: ORA-01031: privilèges insuffisants
... 28 more
It says that my database user does not have the privilege to rollback a transaction.
I set privileges to my user like its written here : http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisOraclethrowingaXAExceptionduringinitializationofmydatasource
But I still have the exception...
This may or may not be related but when creating the transactions by a different user than the one performing recovery and not setting the appropriate "FORCE ANY TRANSACTION" privilege you can get this ORA-01031 error.See http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_xa.htm for reference on that subject.
On Thu, Aug 8, 2013 at 11:47 AM, khaliloo <[hidden email]> wrote:
I found the cause of my problem : My Apache Camel configuration was wrong. It
|Free forum by Nabble||Edit this page|