Fill in the following fields in the Definition tab:

4-8 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator ■ For JDBC: These properties depend on the driver used. Please see the driver documentation for a list of available properties. It is possible in JDBC to specify here the user and password for the connection, instead of specifying there in the Definition tab. ■ For JNDI: These properties depend on the resource used. To add a connection property to a data server:

1. On the Properties tab click Add a Property.

2. Specify a Key identifying this property. This key is case-sensitive. 3. Specify a value for the property.

4. From the File menu, click Save.

Defining Data Sources On the Data Sources tab you can define JDBC data sources that will be used by Oracle Data Integrator Java EE Agents deployed on application servers to connect to this data server. Note that data sources are not applicable for standalone agents. Defining data sources is not mandatory, but allows the Java EE agent to benefit from the data sources and connection pooling features available on the application server. Connection pooling allows reusing connections across several sessions. If a data source is not declared for a given data server in a Java EE agent, this Java EE agent always connects the data server using direct JDBC connection, that is without using any of the application server data sources. Before defining the data sources in Oracle Data Integrator, please note the following: ■ Datasources for WebLogic Server should be created with the Statement Cache Size parameter set to 0 in the Connection Pool configuration. Statement caching has a minor impact on data integration performances, and may lead to unexpected results such as data truncation with some JDBC drivers. Note that this concerns only data connections to the source and target data servers, not the repository connections. ■ If using Connection Pooling with datasources, it is recommended to avoid ALTER SESSION statements in procedures and Knowledge Modules. If a connection requires ALTER SESSION statements, it is recommended to disable connection pooling in the related datasources. To define JDBC data sources for a data server:

1. On the DataSources tab of the Data Server editor click Add a DataSource

2. Select a physical Agent in the Agent field.

3. Enter the data source name in the JNDI Name field.

Note that this name must match the name of the data source in your application server.

4. Check JNDI Standard if you want to use the environment naming context ENC.

When JNDI Standard is checked, Oracle Data Integrator automatically prefixes the data source name with the string java:compenv to identify it in the application server’s JNDI directory. Note that the JNDI Standard is not supported by Oracle WebLogic Server and for global data sources.

5. From the File menu, click Save.

Setting-up the Topology 4-9 After having defined a data source for a Java EE agent, you must create it in the application server into which the Java EE agent is deployed. There are several ways to create data sources in the application server, including: ■ Configure the data sources from the application server console. For more information, refer to your application server documentation. ■ Deploying Datasources from Oracle Data Integrator in WLS for an Agent ■ Deploying an Agent in a Java EE Application Server Oracle WebLogic Server Setting Up On ConnectDisconnect Commands On the On ConnectDicsonnect tab you can define SQL commands that will be executed when a connection to a data server defined in the physical architecture is created or closed. The On Connect command is executed every time an ODI component, including ODI client components, connects to this data server. The On Disconnect command is executed every time an ODI component, including ODI client components, disconnects from this data server. These SQL commands are stored in the master repository along with the data server definition. Before setting up commands On ConnectDisconnect, please note the following: ■ The On ConnectDisconnect commands are only supported by data servers with a technology type Database JDBC. ■ The On Connect and Disconnet commands are executed even when using data sources. In this case, the commands are executedwhen taking and releasing the connection from the connection pool. ■ Substitution APIs are supported. Note that the design time tags are not supported. Only the execution time tags ? and are supported. ■ Only global variables in substitution mode GLOBAL.VAR_NAME or VAR_ NAME are supported. See Variable Scope for more information. Note that the Expression editor only displays variables that are valid for the current data server. ■ The variables that are used in On Connect and Disconnet commands are only replaced at runtime, when the session starts. A command using variables will fail when testing the data server connection or performing a View Data operation on this data server. Make sure that these variables are declared in the scenarios. ■ Oracle Data Integrator Sequences are not supported in the On Connect and Disconnet commands. The commands On ConnectDisconnect have the following usage: ■ When a session runs, it opens connections to data servers. every time a connection is opened on a data server that has a command On Connect defined, a task is created under a specific step called Command on Connect. This task is named after the data server to which the connection is established, the step and task that create the connection to this data server. It contains the code of the On Connect command. ■ When the session completes, it closes all connections to the data servers. Every time a connection is closed on a data server that has a command On Disonnect defined, a task is created under a specific step called Command on Disconnect. This task is named after the data server that is disconnected, the step and task that