Skip to end of metadata
Go to start of metadata

Apart from deploying the VDB, the user is also responsible for providing all the necessary dependent libraries, configuration for creating the data sources that are needed by the models (schemas) defined in "META-INF/vdb.xml" file inside your VDB. For example, if you are trying to integrate data from Oracle RDBMS and File sources in your VDB, then you are responsible for providing the JDBC driver for the Oracle source and any necessary documents and configuration that are needed by the File Translator.

Data source instances may be used by single VDB, or may be shared with as other VDBs or other applications. Consider sharing connections to data sources that have heavy-weight and resource constrained.

With the exception of JDBC sources, other supported data sources have a corresponding JCA connector (.rar) files in "<jboss-install>/standalone/deployments"" directory. Either directly edit the standalone-teiid.xml or use CLI to create the required data sources by the VDB. Example configurations are provided for all the sources in "<jboss-install>/docs/teiid/datasources" directory. Note that in the Domain mode, you must use CLI or admin-console or AdminShell to configure the data sources.

Some data sources may contain passwords or other sensitive information. See the WIKI article EncryptingDataSourcePasswords to not store passwords in plain text. [This needs to verified on AS 7.1]

Once the VDB and its dependencies are deployed, then client applications can connect using the JDBC API. If there are any errors in the deployment, a connection attempt will not be successful and a message will be logged. You can use the admin-console tool or check the log files for errors and correct them before proceeding. Check Client Developer's Guide on how to use JDBC to connect to your VDB.

JDBC Data Sources

The following is an example highlighting configuring an Oracle data source. The process is nearly identical regardless of the database vendor. Typically the JDBC jar and the configuration like connection URL and user credentials change.

There are configuration templates for all the data sources in the "<jboss-install>/docs/teiid/datasources" directory. A complete description how a data source can be added into JBoss AS7.x is also described here. The below we present two different ways to create a datasource.

Deploying the JDBC Jar File

First step in configuring the data source is deploying the required JDBC jar file. For example, if you are trying to create a Oracle data source, first you need to deploy the "ojdbc6.jar" file first. Execute following command using CLI once you connected to the Server.

Developer's Tip
If the JBoss AS 7.x is running in standalone mode, you can also manually copy this 'ojdbc6.jar" to the "<jboss-install>/standalone/deployments" directory, to automatically deploy without using the CLI tool.

Create Data Source

Now that you have the Oracle JDBC driver deployed, it is time to create a data source using this driver. There are many ways to create the datasource using CLI, AdminShell, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.

Execute following command using CLI once you connected to the Server. Make sure you provide the correct URL and user credentials and edit the JNDI name to match the JNDI name you used in VDB.

Developer's Tip
If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/oracle" directory under "datasources" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.

File Data Sources

File data sources use a Teiid specific JCA connector "teiid-connector-file.rar", which is deployed into the AS7.x during installation. There are many ways to create the file data source, using CLI, AdminShell, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.

Execute following command using CLI once you connected to the Server. Make sure you provide the correct directory name and other properties below. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.

To find out all the properties that are supported by this File Connector execute the following command in the CLI.
As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.1 Final.
Developer's Tip
If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/file" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.

Web Service Data Sources

Web service data sources use a Teiid specific JCA connector "teiid-connector-ws.rar", which is deployed into the AS7.x during installation. There are many ways to create the file data source, using CLI, AdminShell, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.

Execute following command using CLI once you connected to the Server. Make sure you provide the correct endpoint and other properties below. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.

To find out all the properties that are supported by this Web Service Connector execute the following command in the CLI.
As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.1 Final.
Developer's Tip
If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/web-service" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.

CXF Configuration

Each web service data source may choose a particular CXF config file and port configuration. The ConfigFile config property specifies the Spring XML configuration file for the CXF Bus and port configuration to be used by connections. If no config file is specified then the system default configuration will be used.

Only 1 port configuration can be used by this data source. You may explicitly set the local name of the port QName to use via the ConfigName property. The namespace URI for the QName in your config file should be http://teiid.org. See the sections on WS-Security, Logging, etc. for examples of using the CXF configuration file.

Sample Spring XML Configuration To Set Timeouts

In the conduit name {http://teiid.org}configName.http-conduit, the namespace, http://teiid.org, is not configurable. The local name is followed by .http-conduit. It will be based upon the configName setting, with a default value of teiid.

See the CXF documentation for all possible configuration options.

The CXF configuration is currently only applicable to non-binary web service calls.

WS-Security

To enable the use of WS-Security, the SecurityType should be set to WSSecurity. At this time Teiid does not expect a WSDL to describe the service being used. Thus a Spring XML configuration file is not only required, it must instead contain all of the relevant policy configuration. And just as with the general configuration, each data source is limited to specifying only a single port configuration to use.

Corresponding xxx-jbossws-cxf.xml file that adds a timestamp to the SOAP header

Example WS-Security enabled data source

Note that the client port configuration is matched to the data source instance by the QName {http://teiid.org}port_x. The configuration may contain other port configurations with different local names.

For more information on configuring CXF interceptors, please consult the CXF documentation or the JBossWS-CXF documentation.

Logging

The CXF config property may also be used to control the logging of requests and responses for specific or all ports. Logging, when enabled, will be performed at an INFO level to the org.apache.cxf.interceptor context.

Example logging data source

Corresponding xxx-jbossws-cxf.xml

Example logging data source

Transport Settings

The CXF config property may also be used to control low level aspects of the HTTP transport. See the CXF documentation for all possible options.

Example Disabling Hostname Verification

Salesforce Data Sources

Salesforce data sources use a Teiid specific JCA connector "teiid-connector-salesforce.rar", which is deployed into the AS7.x during installation. There are many ways to create the salesforce data source, using CLI, AdminShell, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.

Execute following command using CLI once you connected to the Server. Make sure you provide the correct URL and user credentials. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.

To find out all the properties that are supported by this Salesforce Connector execute the following command in the CLI.
As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.1 Final.
Developer's Tip
If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/salesforce" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.

CXF Configuration

Salesforce service data source may choose a particular CXF config file and port configuration. The ConfigFile config property specifies the Spring XML configuration file for the CXF Bus and port configuration to be used by connections. If no config file is specified then the system default configuration will be used.

Only 1 port configuration can be used by this data source. The namespace URI for the QName in your config file should be "urn:partner.soap.sforce.com", with configuration name "Soap". For sample cxf configuration file and details on configuration see [Web Service Data Sources]

See the CXF documentation for all possible configuration options.

The CXF configuration in Salesforce data source is only used for http bus configuration not for purposes of ws-security, Salesforce has its own security authentication.

LDAP Data Sources

LDAP data sources use a Teiid specific JCA connector "teiid-connector-ldap.rar", which is deployed into the AS7.x during installation. There are many ways to create the ldap data source, using CLI, AdminShell, admin-console etc. The example shown below uses the CLI tool, as this works in both Standalone and Domain modes.

Execute following command using CLI once you connected to the Server. Make sure you provide the correct URL and user credentials. Add any additional properties required by the connector by duplicating the "connection-definitions" command below. Edit the JNDI name to match the JNDI name you used in VDB.

To find out all the properties that are supported by this Salesforce Connector execute the following command in the CLI.
As of AS 7.1 CR1b release the above does not work without restarting the Server. This issue will be fixed before 7.1 Final.
Developer's Tip
If the JBoss AS 7.x is running in standalone mode, you can also manually edit the "<jboss-install>/standalone/configuration/standalone-teiid.xml" file and add the XML configuration defined in "<jboss-install>/docs/teiid/datasources/ldap" directory under "resource-adapters" subsystem. Shutdown the server before you edit this file, and restart after the modifications are done.
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.