Review changes to the IBM Tivoli Directory Integrator AssemblyLine Components for version 7.1.
The IBM TDI server is an application that performs services for connected clients as part of a client-server architecture. Server applications are programs that accept connections so that they can answer service requests by sending back responses. Processes of the internal server run in the process of the IBM TDI server. Processes of the external server are separate programs running on a remote server.
A process in the server usually takes the form of an AssemblyLine. AssemblyLines consist of the AssemblyLine framework, and AssemblyLine components: Connectors, Parsers, Scripts and Function Components.
Enhancements to AssemblyLine Components in Tivoli Directory Integrator V7.1 are:
As an example let's use a simple SELECT statement to illustrate the problem with building a complete SQL statement:
SELECT * FROM TABLE_NAME WHERE modified_date > 03/04/09This statement contains a where clause filtering on modifed_date being greater than a given date. This example shows the problematic nature of SQL statements: Is the date march 3rd 2009 or april 4th 2009? There are other cases where building a complete SQL statement becomes even more problematic.
With the new option, the user can use a slightly modified SQL prepared statement. A SQL prepared statement in JDBC terms is a complete SQL statement with placeholders for values. The placeholder is the question mark and is replaced with a value at runtime.
SELECT * FROM TABLE_NAME WHERE modified_date > ?However, the JDBC connector needs to know which value to provide for each placeholder. To make the prepared statement as syntactically correct as possible while also providing the ability to specify which values are provided at runtime, the prepared statement syntax is slightly modified:
SELECT * FROM TABLE_NAME WHERE modified_date > {expression}This is not a valid prepared statement syntax, but the JDBC connector will parse this string and replace {expression} with a single question mark before executing the statement. The “{expression}” is a Tivoli Directory Integrator expression that provides the value for the prepared statement placeholder. The text field editors for the custom SQL statements provide additional functionality to aid the user in building the statement.
When custom prepared statements are used, the user must also provide the WHERE clause where applicable.
public PreparedStatement setPreparedModifyStatement(String preparedSql)
public PreparedStatement setPreparedDeleteStatement(String preparedSql)
public PreparedStatement setPreparedInsertStatement(String preparedSql)
public PreparedStatement setPreparedFindStatement(String preparedSql)
public PreparedStatement setPreparedSelectStatement(String preparedSql)
With
these methods, the user can have code like this to do a special select, for example:
ps = thisConnector.connector.setPreparedSelectStatement ("Select * from tableName where fieldName = ? and field2= ?") ps.setInteger(1, someValue) ps.setObject(2, someObject)The Javadocs for the methods give more examples.
Parent topic: Overview of IBM TDI version 7.1