🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
JMS Transaction COMMIT error
Hi Team,
I have seen this error in logs. Can someone explains me when this error occurs and what happens to messages?
javax.jms.JMSException: Error committing - internal error (Operation COMMIT disallowed in state COMMITTING.)
Caused by: com.solacesystems.jcsmp.InvalidOperationException: Operation COMMIT disallowed in state COMMITTING.
Comments
-
Hi @SasikumarSP,
Hmm. I haven't seen this one before. Can you share your code?
Also can you verify that your client-profile has theallow-transacted-sessions
property enabled? (It is disabled by default). Info on this docs page might also give you a hint. https://docs.solace.com/Solace-JMS-API/Using-Transacted-Sessions.htm0 -
Hey @SasikumarSP,
I got some info from our support team that should help you troubleshoot. It seems like your app is likely calling commit from multiple threads. Hopefully that will help!
The issue here is that the application is calling javax.jms.Session.commit() when an outstanding commit is already in progress. Because commit() is a blocking function that only returns after the commit operation is completed, this indicates that there must be multiple threads calling commit().
Do note that JMS sessions do not support concurrent use. This is defined in section "2.8 Multithreading" of the JMS 1.1 specification.
0 -
Hi @marc , @SasikumarSP any work around to avoid this error? Is there explicit way to commit the messages?
0 -
Hey @vshivk99,
Yes, you would commit by invokingcommit()
in the JMS API.
Using transacted sessions is explained in the Solace docs here: https://docs.solace.com/Solace-JMS-API/Using-Transacted-Sessions.htmHope that helps
0