Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Integration Server Built-In Services | Db Folder | Summary of Elements in this Folder | pub.db:startTransaction
 
pub.db:startTransaction
WmDB. Begins a transaction on a database connection. As an alternative to this service, consider using the services provided with the webMethods Adapter for JDBC.
Input Parameters
You may specify the connection parameters in one of the following ways:
*$dbAlias
*$dbURL, $dbUser, $dbPass, $dbDriver
*$dbConnection
$dbAlias
String Optional. Alias of the database for which you want to start the transaction. This information is passed automatically.
$dbURL
String Optional. JDBC URL that identifies the database resource.
$dbUser
String Optional. User name to use to log into the database.
$dbPass
String Optional. Password for the user.
$dbDriver
String Optional. Name of the JDBC driver to use.
$dbConnection
com.wm.app.b2b.server.DBConnection Optional. Connection object returned by pub.db:connect.
Output Parameters
$dbMessage
String Message indicating the success or failure of the operation.
Usage Notes
By default, all database connections are opened in "auto commit" mode, meaning the results of a operation are automatically committed to the database when that operation succeeds. To use a connection in a transactional context, you must first call pub.db:startTransaction to take that connection out of "auto commit" mode.
This service returns an exception if an error occurs when starting the new transaction. Common reasons for an error when starting a new transaction are:
*A transaction is already in progress (see pub.db:commit, pub.db:rollback, or pub.db:clearTransaction).
*The target database does not support transactions.
After a transaction has been started, it must be terminated with a call to either pub.db:commit (to save all changes to the database) or pub.db:rollback (to discard changes).