Package com.knowgate.jdc

Examples of com.knowgate.jdc.JDCConnection.commit()


      oStmt.close();
      oStmt=null;

      if (DebugFile.trace) DebugFile.writeln("JDCConnection.commit()");

      oConn.commit();
    }
    catch (SQLException sqle) {

      if (DebugFile.trace) {
        DebugFile.writeln("MessagingException "+sqle.getMessage());
View Full Code Here


            oStmt.setString(2, oProd.getString(DB.gu_product));
            oStmt.executeUpdate();
            oStmt.close();
            oStmt = null;

            oConn.commit();
          }
        }
        catch (SQLException sqle) {
          if (DebugFile.trace) {
            DebugFile.writeln("SQLException " + sqle.getMessage());
View Full Code Here

        }
        oUpdt.close();
        oPart.close();
        oAddr.close();
      }
      oConn.commit();
    } catch (SQLException sqle) {
      try { if (oMBox!=null) oMBox.close(); } catch (Exception e) {}
      try { if (oStmt!=null) oStmt.close(); } catch (Exception e) {}
      try { if (oCall!=null) oCall.close(); } catch (Exception e) {}
      try { if (oConn!=null) oConn.rollback(); } catch (Exception e) {}
View Full Code Here

                 if (null==sGuJob) {
                   AtomFeeder oAfd = new AtomFeeder();
                   oAfd.loadAtoms (oCon, oSnd.getString(DB.gu_job), Atom.STATUS_RUNNING);        
                 }

                 oCon.commit();
        
                 oSnd.setPending(DBCommand.queryInt(oCon,"SELECT COUNT(*) FROM "+DB.k_job_atoms+" WHERE "+DB.gu_job+"='"+oSnd.getString(DB.gu_job)+"' AND "+DB.id_status+"="+String.valueOf(Atom.STATUS_RUNNING)));

                 System.out.println("Queue loaded with "+String.valueOf(oSnd.pending())+" mails to be sent");

View Full Code Here

                   Atom oAtm = new Atom(oRst, oMdt);
                   oAtm.replace(DB.id_format,sType);
                   try {                    
                     oSnd.process(oAtm);
                     oAtm.archive(oCon);                    
                     oCon.commit();
                     nSent++;
                     System.out.println("Mail number "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+oAtm.getString(DB.tx_email)+" sent OK");
                   } catch (SQLException sqle) {
                     nErrs++;
                     System.out.println("Mail number "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+oAtm.getString(DB.tx_email)+" failed with SQLException "+sqle.getMessage());
View Full Code Here

                     System.out.println("Mail number "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+oAtm.getString(DB.tx_email)+" sent OK");
                   } catch (SQLException sqle) {
                     nErrs++;
                     System.out.println("Mail number "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+oAtm.getString(DB.tx_email)+" failed with SQLException "+sqle.getMessage());
                     if (DebugFile.trace) DebugFile.writeln("SQLException at atom "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+sqle.getMessage()+" "+StackTraceUtil.getStackTrace(sqle));
                     try { oCon.rollback(); oAtm.setStatus(oCon, Atom.STATUS_INTERRUPTED, "SQLException "+sqle.getMessage()); oCon.commit(); } catch (SQLException ignore) { }
                     oRst.close(); oRst=null;
                    oStm.close(); oStm=null;
                     break;
                   } catch (NullPointerException npe) {
                     nErrs++;
View Full Code Here

                     break;
                   } catch (NullPointerException npe) {
                     nErrs++;
                     System.out.println("Mail number "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+oAtm.getString(DB.tx_email)+" failed with NullPointerException "+npe.getMessage());
                     if (DebugFile.trace) DebugFile.writeln("NullPointerException at atom "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+npe.getMessage()+" "+StackTraceUtil.getStackTrace(npe));
                     try { oCon.rollback(); oAtm.setStatus(oCon, Atom.STATUS_INTERRUPTED, "NullPointerException "+npe.getMessage()); oCon.commit(); } catch (SQLException ignore) { }
                     oRst.close(); oRst=null;
                    oStm.close(); oStm=null;
                     break;
                   } catch (MessagingException msge) {
                     nErrs++;
View Full Code Here

                     break;
                   } catch (MessagingException msge) {
                     nErrs++;
                     System.out.println("Mail number "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+oAtm.getString(DB.tx_email)+" failed with MessagingException "+msge.getMessage());
                     if (DebugFile.trace) DebugFile.writeln(msge.getClass().getName()+" at atom "+String.valueOf(oAtm.getInt(DB.pg_atom))+" "+msge.getMessage()+" "+StackTraceUtil.getStackTrace(msge));
                     try { oCon.rollback(); oAtm.setStatus(oCon, Atom.STATUS_INTERRUPTED, "MessagingException "+msge.getMessage()); oCon.commit(); } catch (SQLException ignore) { }
                   } finally {
                     bHasNext = oRst.next();
                   }
                 } //wend
                 if (null!=oRst) oRst.close();
View Full Code Here

          oUpdt = oConn.prepareStatement(sSQL);
          oUpdt.setString(1, getMessageGuid());
          oUpdt.executeUpdate();
          oUpdt.close();
          oUpdt=null;
          oConn.commit();
          oConn=null;
        }
      }
      catch (SQLException e) {
        if (null!=oConn) { try { oConn.rollback(); } catch (Exception ignore) {} }
View Full Code Here

    Flags oFlgs = getFlags();

    if (oFolder instanceof DBFolder) {
      JDCConnection oConn = null;
      try {
        oConn.commit();
        oConn=null;
      }
      catch (SQLException e) {
        if (null!=oConn) { try { oConn.rollback(); } catch (Exception ignore) {} }
        if (DebugFile.trace) DebugFile.decIdent();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.