Author: lektran
Date: Sat Jun 30 14:46:22 2007
New Revision: 552216

URL: http://svn.apache.org/viewvc?view=rev&rev=552216
Log:
Fixed a bug where an additional listener is attached to the mail store on every 
call to checkMessages, OFBIZ-124

Modified:
    
ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java

Modified: 
ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java?view=diff&rev=552216&r1=552215&r2=552216
==============================================================================
--- 
ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java 
(original)
+++ 
ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java 
Sat Jun 30 14:46:22 2007
@@ -118,6 +118,7 @@
             Store store = this.getStore(session);
             if (store != null) {
                 stores.put(store, session);
+                store.addStoreListener(new LoggingStoreListener());
             }
         }
 
@@ -270,7 +271,6 @@
         }
 
         protected void checkMessages(Store store, Session session) throws 
MessagingException, GeneralException {
-            store.addStoreListener(new LoggingStoreListener());
             store.connect();
 
             // open the default folder


Reply via email to