The SQL Transaction builder allows custom transform methods to be called for a transaction step.
These custom methods have the following Java method signature:
public void customTransform(WebAppAccess webAppAccess, String builderName, String stepName, Object statement, IXml statementMetaData, boolean logSqlWarnings)
- builderName is the name of the SQL Transaction builder calling the method
- stepName is the name of the transaction step invoking the method
- statement is the java.sql.PreparedStatement that the method must execute
- statementMetaData is design-time metadata about the PreparedStatement
- logSqlWarnings indicates whether the SQL Transaction builder is configured to log any warnings generated when the PreparedStatement is executed and the results, if any, are processed.
You can perform any JDBC operations needed by the custom transform, but it probably should not commit or roll back the connection associated with the PreparedStatement when an error occurs. If the method commits or rolls-back changes on the connection, then the remaining steps in the transaction may not function correctly. A better approach to handling JDBC exceptions in the method would be to rethrow the exception and let an Error Handler builder perform the needed handling at a higher level.
Parent topic: SQL Transaction builder