Please help me out I am new 开发者_如何学Goto JMS. What happens to message if a JMS transaction is neither Committed nor Rollbacked?
The exact behavior depends on the broker. I specialize in WebSphere MQ so I'll explain it in those terms. If you let us know which flavor of broker you are using, perhaps someone versed in that specific broker will respond.
With WMQ the limiting factors are the transaction log and the life of the application. If the application dies with a transaction outstanding, it is rolled back. Other than that, the transaction lives in the logs until log space is exhausted, at which time the transaction is rolled back and the application gets a reason code to indicate the nature of the error. If there are no other applications writing to the transaction log, the transaction can live indefinitely. If the QMgr is busy, uncommitted transactions might last only a few seconds depending on log extents and size.
There is no memory leak type of effect with WMQ. There are tunables such as a cap on the number of uncommitted messages that prevent memory, handles and other resources from growing out of control.
After transaction timeout time has elapsed, your jms transaction would be rollbacked. Therefore , no transaction stays on hold position.
精彩评论