Creating an EPI ConnectionFactory

You must first create an EPIManagedConnectionFactory and set the appropriate properties on this object. The properties are the same as the deployment parameters described in J2EE setup and configuration, in the CICS® Transaction Gateway: Administration book for your operating system. This process is similar to that for creating an ECI ConnectionFactory. The following example shows how to create a ConnectionFactory for EPI:
EPIManagedConnectionFactory epiMgdCf = new EPIManagedConnectionFactory();
epiMgdCf.setConnectionURL("local:");
epiMgdCf.setPortNumber(new Integer(0));
epiMgdCf.setServerName("tp600");
epiMgdCf.setLogWriter(new java.io.PrintWriter(System.err));
epiMgdCf.setUserName("myUser");
epiMgdCf.setPassword("myPass");
epiMgdCf.setSignonType(new Integer(0)); // sign-on capable terminal
epiMgdCf.setLogonLogoffClass("com.acme.companyApp.ourCICSLogon");
epiMgdCf.setTraceLevel(new 
              Integer(EPIManagedConnectionFactory.RAS_TRACE_ERROR_EXCEPTION));
ConnectionFactory cxf = (ConnectionFactory)epiMgdCf.createConnectionFactory();