About this task
The
connector.xml descriptor file contains the elements
connectorProvider and
connectorFactory:
- The connectorProvider element contains the name of the provider, which can include multiple interaction types. Therefore, the provider name is the same if you are creating an input connector, an output connector, and a request connector for that provider.
- The connectorFactory element identifies the fully qualified name of the provider's factory class (for example, connector.database.myConnectorFactory). This property identifies the implementation class that extends the AbstractConnectorFactory class in the Connector framework.
- The connectorFactory properties are available to the connector factory during initialization.
IBM Integration Bus associates the runtime connector with a user-defined node by using these properties. The
connectorProvider element in the
connector.xml file must match the
connectorName property on the user-defined node.
Procedure
To create the connector.xml descriptor file, complete the following steps.
- Create an XML file that is called connector.xml and specify the connectorProvider and connectorFactory elements.
Here is an example of a
connector.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<connectorProvider name="myDatabaseConnector">
<connectorFactory className="connector.database.myConnectorFactory">
<properties>
<property name="name1" value="value1"/>
</properties>
</connectorFactory>
</connectorProvider>
- Save the connector.xml file in your Java project, at the root of the src folder.
What to do next
After you create the connector factory, connectors, and connector descriptor file, package the appropriate files (see
Packaging a connector for the runtime environment.