You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ch...@apache.org on 2001/05/01 18:43:39 UTC

cvs commit: jakarta-james/src/org/apache/james/transport LinearProcessor.java

charlesb    01/05/01 09:43:39

  Modified:    conf     james-config.xml
               src/org/apache/james/mailrepository
                        AvalonMailRepository.java
                        AvalonSpoolRepository.java
               src/org/apache/james/transport LinearProcessor.java
  Log:
  Corrected config file and added emergency logging.
  
  Revision  Changes    Path
  1.6       +1 -1      jakarta-james/conf/james-config.xml
  
  Index: james-config.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-james/conf/james-config.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- james-config.xml	2001/04/29 10:19:40	1.5
  +++ james-config.xml	2001/05/01 16:43:32	1.6
  @@ -105,7 +105,7 @@
   	The Spoool Manager and James Block must point to the same repository
   	to add and process same messages. -->
         <spoolRepository>
  -        <repository destinationURL="file://../../../store/mail/spool/"
  +        <repository destinationURL="file://var/mail/spool/"
                       type="SPOOL"
                       model="SYNCHRONOUS">
           </repository>
  
  
  
  1.18      +2 -1      jakarta-james/src/org/apache/james/mailrepository/AvalonMailRepository.java
  
  Index: AvalonMailRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/mailrepository/AvalonMailRepository.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- AvalonMailRepository.java	2001/05/01 11:52:06	1.17
  +++ AvalonMailRepository.java	2001/05/01 16:43:35	1.18
  @@ -46,13 +46,14 @@
       implements MailRepository, Component, Configurable, Composable {
   
       protected Lock lock;
  +    protected static boolean DEEP_DEBUG = true;
       private static final String TYPE = "MAIL";
       private Store store;
       private StreamRepository sr;
       private ObjectRepository or;
       private MailStore mailstore;
       private String destination;
  -    private static boolean DEEP_DEBUG = true;
  +
   
       public void configure(Configuration conf) throws ConfigurationException {
           destination = conf.getAttribute("destinationURL");
  
  
  
  1.7       +10 -2     jakarta-james/src/org/apache/james/mailrepository/AvalonSpoolRepository.java
  
  Index: AvalonSpoolRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/mailrepository/AvalonSpoolRepository.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AvalonSpoolRepository.java	2001/05/01 11:52:06	1.6
  +++ AvalonSpoolRepository.java	2001/05/01 16:43:36	1.7
  @@ -33,13 +33,16 @@
       implements SpoolRepository {
   
       public synchronized String accept() {
  -
  +	if (DEEP_DEBUG) getLogger().debug("Method accept() called");
           while (true) {
               for(Iterator it = list(); it.hasNext(); ) {
                   
                   String s = it.next().toString();
  +		if (DEEP_DEBUG) getLogger().debug("Found item " + s
  +                                                  + " in spool.");
                   if (lock.lock(s)) {
  -		    getLogger().debug("accept() has locked: " + s);
  +		    if (DEEP_DEBUG) getLogger().debug("accept() has locked: "
  +                                                      + s);
                       return s;
                   }
                   //  Object o = it.next();
  @@ -55,11 +58,16 @@
       }
   
       public synchronized String accept(long delay) {
  +	if (DEEP_DEBUG) getLogger().debug("Method accept(delay) called");
           while (true) {
               long youngest = 0;
               for (Iterator it = list(); it.hasNext(); ) {
                   String s = it.next().toString();
  +		if (DEEP_DEBUG) getLogger().debug("Found item " + s
  +                                                  + " in spool.");
                   if (lock.lock(s)) {
  +		    if (DEEP_DEBUG) getLogger().debug("accept(delay) has"
  +                                                      + " locked: "  + s);
                       //We have a lock on this object... let's grab the message
                       //  and see if it's a valid time.
                       MailImpl mail = retrieve(s);
  
  
  
  1.20      +3 -3      jakarta-james/src/org/apache/james/transport/LinearProcessor.java
  
  Index: LinearProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/transport/LinearProcessor.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- LinearProcessor.java	2001/05/01 11:52:06	1.19
  +++ LinearProcessor.java	2001/05/01 16:43:37	1.20
  @@ -162,7 +162,7 @@
   
               //See if the state was changed by the mailet
               if (!mail.getState().equals(originalState)) {
  -                logger.debug("State changed by: " + mailet.getMailetInfo());
  +                getLogger().debug("State changed by: " + mailet.getMailetInfo());
                   //If this message was ghosted, we just want to let it die
                   if (mail.getState().equals(mail.GHOST)) {
                       //let this instance die...
  @@ -181,7 +181,7 @@
               } else {
                   //Ok, we made it through with the same state... move it to the next
                   //  spot in the array
  -                logger.debug("State not changed by: " + mailet.getMailetInfo());
  +                getLogger().debug("State not changed by: " + mailet.getMailetInfo());
                   unprocessed[i + 1].add(mail);
               }
   
  @@ -223,7 +223,7 @@
               }
           }
           mail.setErrorMessage(sout.toString());
  -        logger.error(sout.toString());
  +        getLogger().error(sout.toString());
           throw me;
       }
   }
  
  
  

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