Connection factories

For each connector, one connection factory is created automatically, and the connection factory type is defined. You can add and configure connection factories, and configure connection factory types.

Within an application, you can use JNDI to look up a connector’s managed connection factory instance and get a connection to an enterprise information system, as this code sample illustrates:

// Get the initial JNDI context
Context initContext = new InitialContext();

// Look up a connection factory instance
javax.resource.cci.ConnectionFactory cf =    (javax.resource.cci.ConnectionFactory)
   initCtxt.lookup(“java:comp/env/eis/MyEIS);

javax.resource.ci.Connection conn = cf.getConnection();

StepsAdding a connection factory

To add connection factories for a connector:

  1. Expand the Connector Modules folder.

  2. Select the connector to which you want to add a connection factory, right-click, and select Add.

  3. Complete the wizard to add the connection factory.

StepsConfiguring connection factory properties

  1. Expand these folders: Connector Modules | Connector | Connection Factories, where Connector is the name of the connector.

  2. Select the connection factory, and configure the properties that display on: