SetTransactionTimeout
Description
Sets the timeout value for subsequent transactions. The
transaction is rolled back if it does not complete before the timeout
expires.
Syntax
|
1 |
ejbtrans.SetTransactionTimeout (long seconds ) |
|
Argument |
Description |
|---|---|
|
ejbtrans |
The name of an EJBTransaction object |
|
seconds |
A long that specifies the number of seconds that |
Return value
None
Examples
This example shows the use of SetTransactionTimeout to set the
timeout period to five minutes:
|
1 2 3 4 5 6 7 8 9 10 |
// Instance variables: // EJBConnection conn // EJBTransaction trans TRY trans.SetTransactionTimeout(300) trans.begin() CATCH (exception e) MessageBox("Exception", e.getMessage()) END TRY |
Usage
The SetTransactionTimeout method specifies the number of seconds
that can elapse before a transaction is rolled back. The timeout period
applies to transactions created by subsequent invocations of Begin. If
seconds is 0, no timeout period is in effect.
See also
GetEJBTransaction
(EJBConnection class)