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();
To add connection factories for a connector:
Expand the Connector Modules folder.
Select the connector to which you want to add a connection factory, right-click, and select Add.
Complete the wizard to add the connection factory.
Configuring connection
factory properties
Expand these folders: Connector Modules | Connector | Connection Factories, where Connector is the name of the connector.
Select the connection factory, and configure the properties that display on: