/** * @author gdulski * @param _con * @return nothing * <p>call the closeConnection() of WebAppConnection class */ protected void closeConnection() throws OptInCustomerException { try { WebAppConnection.getWebAppConnection().closeConnection(); } catch (Exception _e) { AppLog.writeErrorLog("Closing dB Connection Failure. Skip remaining job " + _e.getMessage()); System.out.println("Closing dB Connection Failure. Skip remaining job " + _e.getMessage()); throw new OptInCustomerException( "Close dB Connection Failure. Skip remaining job " + _e.getMessage()); } }
OptInCustomerLAPDataRefreshObject(MaintainLog appLog) throws OptInCustomerException { try { _appLog = appLog; _webAppConn = WebAppConnection.getWebAppConnection().getConnection(); _ifxConn = InfmxConnection.getInfmxConnection().getConnection(); _ifxConn.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED); } catch (Exception ex) { throw new OptInCustomerException(ex); } }
public void addNewLAPAUInfo() throws OptInCustomerException { PreparedStatement psNewLAPAUContact = null; ResultSet rsNewLAPAUContact = null; try { _appLog.writeAuditLog("Part -- II: Adding new LAP-AU address and Contact information.."); String newLAPAUs = "Select au.au_abe_u, p.reference_u, a.long_busn_name1, r.abe_relation_u, " + " trim(a2.first_name_n), trim(a2.middle_init_n), trim(a2.abe_name_n), " + " c.email_t, a.long_busn_name2, a2.credentials_t " + " from lpt_au_abe au, ptt_abe_reference p, ptt_abe a, ptt_abe_relation r, ptt_abe a2, outer cpt_poc_email c " + " where au.au_abe_u = p.abe_u and " + " au.au_abe_u = a.abe_u and " + " au.au_abe_u = r.abe_u and " + " r.abe_relation_u = a2.abe_u and " + " r.abe_relation_u = c.abe_u and " + " au.accred_s = 'A' and " + " p.assigning_abe_u = 1000061 and " + " p.reference_type_c = 'I' and " + " r.relation_type_c = 'I' and " + " c.email_type_c = 'PRIM' and " + " p.reference_u NOT IN ( SELECT CAPNumber FROM tmp_CAPNumber ) and " + " current between p.effective_dt and p.termination_dt and " + " current between r.effective_dt and r.termination_dt and " + " current between c.effective_dt and c.termination_dt "; System.out.println("***** Started New LAP-AU refresh process.."); psNewLAPAUContact = _ifxConn.prepareStatement(newLAPAUs); rsNewLAPAUContact = psNewLAPAUContact.executeQuery(); this.updateCustomerInfo(rsNewLAPAUContact, "New"); System.out.println("***** Finished New LAP-AU refresh process.."); } catch (SQLException e) { throw new OptInCustomerException(e); } finally { // Close database Connections try { InfmxConnection.getInfmxConnection().closeConnection(); WebAppConnection.getWebAppConnection().closeConnection(); } catch (Exception ex) { throw new OptInCustomerException(ex); } } }
protected void init() { try { _con = WebAppConnection.getWebAppConnection().getConnection(); } catch (OptInCustomerException ex) { AppLog.writeAuditLog( "OptIN Driver OptInCustomerException: no connection to dB " + ex.getMessage()); System.out.println( "OptIN Driver OptInCustomerException: no connection to dB " + ex.getMessage()); System.exit(1); } catch (Exception exe) { AppLog.writeAuditLog("OptIN Driver Exception: " + exe.getMessage()); System.out.println("OptIn Driver Exception : " + exe.getMessage()); System.exit(1); } }