WebLogic Messaging API Class Library

ISession.Commit�Method�

In a transacted session, this method commits all messages sent or received in this transaction and releases any locks currently held. If the commit succeeds, any messages sent during the transaction become visible to consumers, while any messages received during the transaction are deleted so as to prevent redelivery.

A transaction is completed using either its session's Commit method or its session's Rollback method. The completion of a session's current transaction automatically begins the next. The result is that a transacted session always has a current transaction within which its work is done. If a Commit call throws an ambiguous exception, then the result of the transaction is ambiguous: either all operations within the transaction succeeded, or all operations rolled back.

void�Commit();

Exceptions

Exception TypeCondition
MessageExceptionif JMS fails to Commit the transaction due to some internal error.
TransactionRolledBackExceptionif the transaction is rolled back due to some internal error during Commit.
IllegalStateExceptionif the method is not called by a transacted session.

See Also

ISession Interface | WebLogic.Messaging Namespace