james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject cvs commit: jakarta-james/proposals/noparse-mimemessage/java/org/apache/james/mailrepository JDBCSpoolRepository.java JDBCMailRepository.java
Date Fri, 03 Aug 2001 13:10:53 GMT
serge       01/08/03 06:10:53

  Modified:    proposals/noparse-mimemessage/java/org/apache/james/mailrepository
                        JDBCSpoolRepository.java JDBCMailRepository.java
  Log:
  Changed to use java.sql.Timestamp, not java.sql.Date.
  
  Revision  Changes    Path
  1.4       +1 -1      jakarta-james/proposals/noparse-mimemessage/java/org/apache/james/mailrepository/JDBCSpoolRepository.java
  
  Index: JDBCSpoolRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/noparse-mimemessage/java/org/apache/james/mailrepository/JDBCSpoolRepository.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JDBCSpoolRepository.java	2001/08/01 03:49:23	1.3
  +++ JDBCSpoolRepository.java	2001/08/03 13:10:52	1.4
  @@ -110,7 +110,7 @@
                       boolean process = false;
                       if (state.equals(Mail.ERROR)) {
                           //Test the time
  -                        long timeToProcess = delay + rsListMessages.getDate(3).getTime();
  +                        long timeToProcess = delay + rsListMessages.getTimestamp(3).getTime();
                           if (System.currentTimeMillis() > timeToProcess) {
                               process = true;
                           } else {
  
  
  
  1.4       +3 -6      jakarta-james/proposals/noparse-mimemessage/java/org/apache/james/mailrepository/JDBCMailRepository.java
  
  Index: JDBCMailRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/noparse-mimemessage/java/org/apache/james/mailrepository/JDBCMailRepository.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JDBCMailRepository.java	2001/08/01 03:49:23	1.3
  +++ JDBCMailRepository.java	2001/08/03 13:10:52	1.4
  @@ -69,8 +69,6 @@
       extends AbstractLoggable
       implements MailRepository, Component, Configurable, Composable {
   
  -    //private SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy MMM dd h:mm:ss a");
  -
       protected Lock lock;
       protected String destination;
       protected String tableName;
  @@ -203,7 +201,7 @@
                   updateMessage.setString(4, recipients.toString());
                   updateMessage.setString(5, mc.getRemoteHost());
                   updateMessage.setString(6, mc.getRemoteAddr());
  -                updateMessage.setDate(7, new java.sql.Date(mc.getLastUpdated().getTime()));
  +                updateMessage.setTimestamp(7, new java.sql.Timestamp(mc.getLastUpdated().getTime()));
                   updateMessage.setString(8, mc.getName());
                   updateMessage.setString(9, repositoryName);
                   updateMessage.execute();
  @@ -262,8 +260,7 @@
                   insertMessage.setString(6, recipients.toString());
                   insertMessage.setString(7, mc.getRemoteHost());
                   insertMessage.setString(8, mc.getRemoteAddr());
  -                java.sql.Date lastUpdated = new java.sql.Date(mc.getLastUpdated().getTime());
  -                insertMessage.setDate(9, lastUpdated);
  +                insertMessage.setTimestamp(9, new java.sql.Timestamp(mc.getLastUpdated().getTime()));
                   MimeMessage messageBody = mc.getMessage();
   
                   ByteArrayOutputStream headerOut = new ByteArrayOutputStream();
  @@ -325,7 +322,7 @@
               mc.setRecipients(recipients);
               mc.setRemoteHost(rsMessage.getString(5));
               mc.setRemoteAddr(rsMessage.getString(6));
  -            mc.setLastUpdated(new java.util.Date(rsMessage.getDate(7).getTime()));
  +            mc.setLastUpdated(rsMessage.getTimestamp(7));
   
               MimeMessageJDBCSource source = new MimeMessageJDBCSource(this, key, sr);
               MimeMessageWrapper message = new MimeMessageWrapper(source);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message