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:connect
 
pub.db:connect
WmDB. Creates a connection to the database using the supplied JDBC URL, user name, and password. As an alternative to this service, consider using the services provided with the webMethods Adapter for JDBC.
You can also specify a JDBC driver specific to the database.
Input Parameters
You may specify the connection parameters in one of the following ways:
*$dbAlias
*$dbURL, $dbUser, $dbPass, $dbDriver
*$dbURL, $dbDriver, $dbProperties
$dbAlias
String Optional. Database alias.
$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.
$dbProperties
Document Optional. Set of connection parameters that are to be used to make the database connection. Within $dbProperties, key names represent the names of the connection parameters that are to be used to establish the connection, and the value of a key specifies the value of that particular parameter.
In most cases, you will include the keys user and password in $dbProperties to specify the user name and password parameters that are to be used to connect to the database. You may include additional parameters as needed.
The following example shows how $dbProperties would look if you wanted to set the weblogic.codeset parameter to GBK in order to extract Unicode data out of the database:
Key
Value
user
dbu
password
dbu
weblogic.codeset
GBK
Output Parameters
$dbConnection
com.wm.app.b2b.server.DBConnection Connection object.
$dbMessage
String Message indicating the success or failure of the operation.
Usage Notes
Database connections opened by pub.db:connect are associated with the current session.
Multiple attempts to connect to the same database by the same client will result in the same connection being reused. This means that if client A and client B request connections to the same database, they each get their own new connection. If client A makes another call to pub.db:connect, the previous connection is reused. Associating the database connection with the client session prevents remote clients from having to reconnect repeatedly to a target database.
Connections are not pooled or shared across sessions. Unless explicitly closed (by calling pub.db:close or pub.db:closeAll), connections associated with a session are closed when the session is flushed from memory. This happens at a regular interval, which can be configured using the Integration Server Administrator. For more information about setting the session time-out limit, see the section Setting the Session Timeout Limit in the webMethods Integration Server Administrator’s Guide.