In the Java connector library, the terminate() method for a Java connector is defined in the CWConnectorAgent class. Typical return codes used in terminate() are SUCCEED and FAIL. Figure 63 shows a sample terminate() method for a Java connector.
public int terminate(){ CWConnectorUtil.traceWrite(CWConnectorLogAndTrace.LEVEL4, "Entering Connector terminate()"); // disconnect from application boolean logoutSuccessful = userConnect.logout(); // free any resources, logoff any cache sessions if connection // pool is used. CWConnectorUtil.traceWrite(CWConnectorLogAndTrace.LEVEL4, return CWConnectorConstant.SUCCEED; }