Apama Documentation : Release Notes : What's New in Apama 5.0 : New ADBC adapter features
New ADBC adapter features
In Apama 5.0, the ADBC adapter has been enhanced in a variety of areas.
Some of these improvements change the signatures and/or behaviors of several actions. Applications that are being migrated from Apama 4.3 will need to be modified to use the new signatures, which are fully described in Using the Apama Database Connector. In addition, to migrate Apama 4.x projects that use the ADBC Common bundle, you need to manually update the Apama 4.x projects.
General API improvements
In earlier releases, the settings for _ADBCTable when storing events or data and _ADBCTime when storing events were specified in an action's extraParams parameter. With release 5.0 you now use the tableName parameter when storing events and data and the timeColumn parameter when storing events to specify this information. This change affects the following ADBC actions:
*Connection.storeEvent
*Connection.storeEventWithAck
*Connection.storeData
*Connection.storeDataWithAck
*Connection.storeDataWithAckId
In earlier releases, the settings for _ADBCType and _ADBCTime when running playback queries were specified in the extraParams parameter. With release 5.0, you use the following setter actions to specify this information:
*Query.setEventType
*Query.setTimeColumn
Note:  
The setter actions are not necessary when using the ADBC Sim adapter for playback.
The seldom used uniqueConnection parameter is now specified in the extraParams in the following action:
*Connection.openDatabaseFull
The following actions now return an integer id. This makes them consistent with the commitRequest actions.
*Connection.rollbackRequest
*Connection.rollbackRequestFull
Token parameter added
In release 5.0, a new string token parameter has been added to selected actions and callbacks to permit matching in the callback. This allows the callback to perform different operations depending on the token value. This eliminates the need to create different callbacks. The following actions use the token parameter.
*Connection.storeEventWithAck
*Connection.storeDataWithAck
*Connection.storeDataWithAckId
*Connection.commitRequestFull
*Connection.runCommand
*Connection.runCommandFull
*Query.setBatchDoneCallback
*Query.setResultEventCallback
A SQL statement can be specified for store actions
With ADBC store operations, you can now use either a provided SQL statement or the generated statement. The SQL statement provided can perform an insert or update and the use of a stored procedure is supported.
*Connection.storeEvent
*Connection.storeEventWithAck
*Connection.storeData
*Connection.storeDataWithAck
*Connection.storeDataWithAckId
The following actions have been added to create and delete storeStatements used with the above actions
*Connection.createStoreStatement
*Connection.deleteStoreStatement
New FixedSizeInsertBuffers property
The FixedSizeInsertBuffers is a new property that allows you to change the default buffer size used when the StoreData and StoreEvent actions perform batch inserts. The property is specific to ODBC. Apama uses the FixedSizeInsertBuffers property to specify the size of the buffers for the columns. The default "true" uses a fixed buffer size of 10K bytes for each column. If the value is changed to "false", the size of the column buffers is determined dynamically by examining the database table into which the data will be inserted. Allowing the buffer size to be set dynamically can significantly reduce memory usage when performing batch inserts to database tables that contain hundreds of columns or when using a very large StoreBatchSize.
Database connections can be opened in read-only mode
A parameter has been added to specify that a database connection should be opened in read-only mode. When a connection is opened in read-only mode an error will be reported for any API action that requires writes (Store, Commit, or Rollback). Most databases do not prevent writes from a connection in read-only mode so it is still possible to perform writes using the Command actions. The adapter will log a message to this effect for connections opened in read-only mode.
The open actions that use the readOnly parameter are:
*com.apama.database.Connection.openFull
*com.apama.database.Connection.openShared
*com.apama.database.DBUtil.open
*com.apama.database.DBUtil.openShared
New open "shared" actions
Both the ADBC Event API and the ADBCHelper API have new open "shared" actions that will use an already open connection if one is found; if the action does not find a matching open connection, it opens a new one. The actions are:
*com.apama.database.DBUtil.openShared is part of the ADBCHelper API
*com.apama.database.Connection.openDatabaseShared is part of the ADBC Event API
New reconnection capability
Apama applications can automatically reconnect if a disconnection error is encountered. The reconnection capability is optional and the default is to not reconnect when a disconnection error occurs. The following reconnection actions are available to control the reconnection behavior.
*action setReconnectPolicy()
*action setReconnectTimeout()
Need to manually add the ADBC Common bundle to a project
Existing Apama 4.x projects that use the ADBC adapter require manual updating when used with Apama 5.x. This is necessary in order to update bundles that contain static files. To perform this update, you need to perform the following:
*In the Project Explorer, right-click the project and select Apama Build Path > Configure Build Path.
*In the Properties window select the Bundles tab.
*Select the Add button, then the "ADBC Adapter Common" bundle listed under the Adapter bundles, then OK.
*Select the OK button on the Properties window.
The ADBC adapter static files will now be updated to the 5.x version.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback