Connection to a CICS server using the ECI resource adapter
Use the ConnectionFactory and Connection interfaces to establish a connection with a CICS® server. The ECI resource adapter provides implementations of the connection interfaces, but you do not work directly with the ECI implementations. Use the ECIConnectionSpec class directly to define the properties of the connection.
The ECIConnectionSpec class allows
the JEE component to override the user ID and password set at deployment
time. Here is an example of how to code to obtain a connection using
this class:
ConnectionFactory cf = <Lookup from JNDI namespace>
ECIConnectionSpec cs = new ECIConnectionSpec();
cs.setUserName("myuser");
cs.setPassword("mypass");
Connection conn = cf.getConnection(cs);