Oracle Agile Engineering Data Management Enterprise Integration Platform Administration Guide Release e6.2.0.0 E52568-02 |
|
![]() Previous |
![]() Next |
This chapter describes all other connectors that are not covered by the previous connector chapters.
The JDBC connector is a generic connector that can be used to perform SQL statements against a JDBC-compliant database. The respective section in the eai_ini.xml file for setting up the JDBC connector is described here:
<connector name="jdbc" version="2.2.0" active="false" class="com.eigner.eai.connector.db.JdbcConnector"> … <transformation direction="out" name="${eai.conf}/plm_jdbc.xsl"/> ... <connection name="default" active="true"> <driver>driver</driver> <url>url</url> <user>user</user> <password>password</password> </connection> ...</connector>
Details of the XML tags:
Tag | Description | Hint |
---|---|---|
transformation | transformation file (optional) | Transformation |
connection | Connection configuration | Only one connection must be active |
Details of the tag connection:
Tag | Description |
---|---|
driver | Name of JDBC driver |
url | A database URL of the form jdbc:subprotocol:subname |
user | User name |
password | Password in encrypted form (via cryptographer) |
Details of the XML tag transformation:
Attribute | Description | Hint |
---|---|---|
direction | Direction for mapping | If the connector is a source connector, direction "in" must be used.
If the connector is a target connector, direction "out" must be used. |
name | name of the transformation file (optional) | If the attribute is not given or empty, the JDBC connector uses the SQL element below the data element. If given, a structure similar to the XML message shown below should be the result of the transformation. |
<connector name="jdbc-oracle" version="2.2.0" active="false" class="com.eigner.eai.connector.db.JdbcConnector"> … <connection name="default" active="true"> <driver>oracle.jdbc.driver.OracleDriver</driver> <url>jdbc:oracle:oci:@localhost:1526:sid</url> <user>scott</user> <password>pw name=</password> </connection> ... </connector>
<connector name="jdbc-oracle" version="2.2.0" active="false" class="com.eigner.eai.connector.db.JdbcConnector"> … <connection name="default" active="true"> <driver>oracle.jdbc.driver.OracleDriver</driver> <url> jdbc:oracle:oci@>(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=[racnode1])(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=[racnode2])(PORT=1521))(LOAD_BALANCE = yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=[sid])))</url> <user>scott</user> <password>pw name=</password> </connection> ... </connector>
The XML message sent to the JDBC connector could look as follows:
<dataarea> <record type="ITEM" verb="CREATE"> <key>45-1</key> <params/> <data> <sql>select "TEST"."PARTS"."ID", "TEST"."PARTS"."DESCRIPTION" from "TEST"."PARTS" where "TEST"."PARTS"."ID" = 123</sql> </data> </record> </dataarea>
Details of the XML tags:
Tag | Description |
---|---|
sql | SQL statement (any of select, insert, update, delete)
The fields and tables used in the SQL code need to have a syntax that is accepted by the used database. In the Oracle example above, it is recommended to prefix the table and field by the schema name. It is also recommended to surround the individual parts by quotes, in case there are names with spaces. |