[jboss-cvs] JBossAS SVN: r62054 - trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 3 17:36:32 EDT 2007
Author: petemuir
Date: 2007-04-03 17:36:32 -0400 (Tue, 03 Apr 2007)
New Revision: 62054
Modified:
trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/NewMsgsWorker.java
Log:
JBAS-4157
Modified: trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/NewMsgsWorker.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/NewMsgsWorker.java 2007-04-03 21:05:33 UTC (rev 62053)
+++ trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/NewMsgsWorker.java 2007-04-03 21:36:32 UTC (rev 62054)
@@ -73,8 +73,6 @@
try
{
MailActivation ma = (MailActivation) pollQueue.take();
- if( ma.isReleased() )
- continue;
// Wait until its time to check for new msgs
long now = System.currentTimeMillis();
long nextTime = ma.getNextNewMsgCheckTime();
@@ -82,7 +80,9 @@
Thread.sleep(sleepMS);
if( released )
break;
-
+ // This has to go after the sleep otherwise we can get into an inconsistent state
+ if( ma.isReleased() )
+ continue;
// Now schedule excecution of the new msg check
mgr.scheduleWork(ma, WorkManager.INDEFINITE, null, this);
}
More information about the jboss-cvs-commits
mailing list