INT-847 Upgrading to Spring 3.0 snapshot (CI-475 from 2009/11/25).

This commit is contained in:
Mark Fisher
2009-11-26 05:35:38 +00:00
parent 335f394653
commit ffc6dd556d
39 changed files with 295 additions and 251 deletions

View File

@@ -9,13 +9,13 @@
<classpathentry kind="var" path="IVY_CACHE/javax.mail/com.springsource.javax.mail/1.4.1/com.springsource.javax.mail-1.4.1.jar" sourcepath="/IVY_CACHE/javax.mail/com.springsource.javax.mail/1.4.1/com.springsource.javax.mail-sources-1.4.1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar" sourcepath="/IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-sources-1.1.1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.asm/3.0.0.RC1/org.springframework.asm-3.0.0.RC1.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.asm/3.0.0.RC1/org.springframework.asm-sources-3.0.0.RC1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RC1/org.springframework.beans-3.0.0.RC1.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RC1/org.springframework.beans-sources-3.0.0.RC1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RC1/org.springframework.context-3.0.0.RC1.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RC1/org.springframework.context-sources-3.0.0.RC1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RC1/org.springframework.context.support-3.0.0.RC1.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.RC1/org.springframework.context.support-sources-3.0.0.RC1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RC1/org.springframework.core-3.0.0.RC1.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RC1/org.springframework.core-sources-3.0.0.RC1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.expression/3.0.0.RC1/org.springframework.expression-3.0.0.RC1.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.expression/3.0.0.RC1/org.springframework.expression-sources-3.0.0.RC1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.test/3.0.0.RC1/org.springframework.test-3.0.0.RC1.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.test/3.0.0.RC1/org.springframework.test-sources-3.0.0.RC1.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.asm/3.0.0.CI-475/org.springframework.asm-3.0.0.CI-475.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.asm/3.0.0.CI-475/org.springframework.asm-sources-3.0.0.CI-475.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.CI-475/org.springframework.beans-3.0.0.CI-475.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.CI-475/org.springframework.beans-sources-3.0.0.CI-475.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.context/3.0.0.CI-475/org.springframework.context-3.0.0.CI-475.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.context/3.0.0.CI-475/org.springframework.context-sources-3.0.0.CI-475.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.CI-475/org.springframework.context.support-3.0.0.CI-475.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.context.support/3.0.0.CI-475/org.springframework.context.support-sources-3.0.0.CI-475.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.core/3.0.0.CI-475/org.springframework.core-3.0.0.CI-475.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.core/3.0.0.CI-475/org.springframework.core-sources-3.0.0.CI-475.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.expression/3.0.0.CI-475/org.springframework.expression-3.0.0.CI-475.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.expression/3.0.0.CI-475/org.springframework.expression-sources-3.0.0.CI-475.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.test/3.0.0.CI-475/org.springframework.test-3.0.0.CI-475.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.test/3.0.0.CI-475/org.springframework.test-sources-3.0.0.CI-475.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar" />
<classpathentry kind="var" path="IVY_CACHE/org.easymock/com.springsource.org.easymock.classextension/2.3.0/com.springsource.org.easymock.classextension-2.3.0.jar" sourcepath="/IVY_CACHE/org.easymock/com.springsource.org.easymock.classextension/2.3.0/com.springsource.org.easymock.classextension-sources-2.3.0.jar" />
<classpathentry kind="var" path="IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-2.1.3.jar" sourcepath="/IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-sources-2.1.3.jar" />

View File

@@ -41,8 +41,6 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport {
private final IdleTask idleTask = new IdleTask();
private volatile boolean autoStartup = true;
private volatile boolean shouldReconnectAutomatically = true;
private volatile TaskExecutor taskExecutor;
@@ -65,10 +63,6 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport {
this.shouldReconnectAutomatically = shouldReconnectAutomatically;
}
public void setAutoStartup(boolean autoStartup) {
this.autoStartup = autoStartup;
}
public void setTaskExecutor(TaskExecutor taskExecutor) {
this.taskExecutor = taskExecutor;
}
@@ -79,16 +73,6 @@ public class ImapIdleChannelAdapter extends MessageProducerSupport {
}
}
@Override
protected void onInit() {
if (this.autoStartup) {
this.setStartupMode(StartupMode.ON_CONTEXT_REFRESH);
}
else {
this.setStartupMode(StartupMode.MANUAL);
}
}
/*
* Lifecycle implementation
*/

View File

@@ -29,7 +29,6 @@ import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
import org.springframework.integration.endpoint.AbstractEndpoint.StartupMode;
import org.springframework.integration.mail.ImapMailReceiver;
import org.springframework.integration.mail.MailReceivingMessageSource;
import org.springframework.integration.mail.Pop3MailReceiver;
@@ -53,7 +52,7 @@ public class PollingMailSourceParserTests {
Object adapter = context.getBean("imapAdapter");
assertEquals(SourcePollingChannelAdapter.class, adapter.getClass());
DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapter);
assertEquals(StartupMode.MANUAL, adapterAccessor.getPropertyValue("startupMode"));
assertEquals(Boolean.FALSE, adapterAccessor.getPropertyValue("autoStartup"));
Object channel = context.getBean("channel");
assertEquals(channel, adapterAccessor.getPropertyValue("outputChannel"));
Object source = adapterAccessor.getPropertyValue("source");
@@ -72,7 +71,7 @@ public class PollingMailSourceParserTests {
Object adapter = context.getBean("pop3Adapter");
assertEquals(SourcePollingChannelAdapter.class, adapter.getClass());
DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapter);
assertEquals(StartupMode.MANUAL, adapterAccessor.getPropertyValue("startupMode"));
assertEquals(Boolean.FALSE, adapterAccessor.getPropertyValue("autoStartup"));
Object channel = context.getBean("channel");
assertEquals(channel, adapterAccessor.getPropertyValue("outputChannel"));
Object source = adapterAccessor.getPropertyValue("source");