Removed extra request channel settings in test class.

This commit is contained in:
Mark Fisher
2008-11-13 01:16:58 +00:00
parent 37e47f6510
commit 618282db91
9 changed files with 31 additions and 16 deletions

View File

@@ -57,6 +57,7 @@
<xsd:attribute name="max-concurrent-consumers" type="xsd:string"/>
<xsd:attribute name="max-messages-per-task" type="xsd:string"/>
<xsd:attribute name="idle-task-execution-limit" type="xsd:string"/>
<xsd:attribute name="auto-startup" type="xsd:string" default="true"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

View File

@@ -26,7 +26,7 @@ import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.BeanDefinitionStoreException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.channel.PollableChannel;
import org.springframework.integration.core.Message;
import org.springframework.integration.jms.JmsInboundGateway;
import org.springframework.jms.connection.JmsTransactionManager;
@@ -41,9 +41,9 @@ public class JmsInboundGatewayParserTests {
public void testGatewayWithConnectionFactoryAndDestination() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"jmsGatewayWithConnectionFactoryAndDestination.xml", this.getClass());
QueueChannel channel = new QueueChannel(1);
PollableChannel channel = (PollableChannel) context.getBean("requestChannel");
JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway");
gateway.setRequestChannel(channel);
assertEquals(JmsInboundGateway.class, gateway.getClass());
context.start();
Message<?> message = channel.receive(3000);
assertNotNull("message should not be null", message);
@@ -55,9 +55,9 @@ public class JmsInboundGatewayParserTests {
public void testGatewayWithConnectionFactoryAndDestinationName() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"jmsGatewayWithConnectionFactoryAndDestinationName.xml", this.getClass());
QueueChannel channel = new QueueChannel(1);
PollableChannel channel = (PollableChannel) context.getBean("requestChannel");
JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway");
gateway.setRequestChannel(channel);
assertEquals(JmsInboundGateway.class, gateway.getClass());
context.start();
Message<?> message = channel.receive(3000);
assertNotNull("message should not be null", message);
@@ -69,9 +69,9 @@ public class JmsInboundGatewayParserTests {
public void testGatewayWithMessageConverter() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"jmsGatewayWithMessageConverter.xml", this.getClass());
QueueChannel channel = new QueueChannel(1);
PollableChannel channel = (PollableChannel) context.getBean("requestChannel");
JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway");
gateway.setRequestChannel(channel);
assertEquals(JmsInboundGateway.class, gateway.getClass());
context.start();
Message<?> message = channel.receive(3000);
assertNotNull("message should not be null", message);
@@ -132,9 +132,9 @@ public class JmsInboundGatewayParserTests {
public void testGatewayWithDefaultConnectionFactory() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"jmsGatewayWithDefaultConnectionFactory.xml", this.getClass());
QueueChannel channel = new QueueChannel(1);
PollableChannel channel = (PollableChannel) context.getBean("requestChannel");
JmsInboundGateway gateway = (JmsInboundGateway) context.getBean("jmsGateway");
gateway.setRequestChannel(channel);
assertEquals(JmsInboundGateway.class, gateway.getClass());
context.start();
Message<?> message = channel.receive(3000);
assertNotNull("message should not be null", message);

View File

@@ -10,7 +10,9 @@
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd">
<si:channel id="requestChannel"/>
<si:channel id="requestChannel">
<si:queue/>
</si:channel>
<jms:inbound-gateway id="gatewayWithoutTransactionManager"
connection-factory="testConnectionFactory"

View File

@@ -10,7 +10,9 @@
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd">
<si:channel id="requestChannel"/>
<si:channel id="requestChannel">
<si:queue/>
</si:channel>
<jms:inbound-gateway id="jmsGateway"
connection-factory="testConnectionFactory"

View File

@@ -10,7 +10,9 @@
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd">
<si:channel id="requestChannel"/>
<si:channel id="requestChannel">
<si:queue/>
</si:channel>
<jms:inbound-gateway id="jmsGateway"
connection-factory="testConnectionFactory"

View File

@@ -10,7 +10,9 @@
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd">
<si:channel id="requestChannel"/>
<si:channel id="requestChannel">
<si:queue/>
</si:channel>
<jms:inbound-gateway id="jmsGateway"
connection-factory="testConnectionFactory"

View File

@@ -10,7 +10,9 @@
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd">
<si:channel id="requestChannel"/>
<si:channel id="requestChannel">
<si:queue/>
</si:channel>
<jms:inbound-gateway id="jmsGateway"
destination-name="testDestinationName"

View File

@@ -10,7 +10,9 @@
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd">
<si:channel id="requestChannel"/>
<si:channel id="requestChannel">
<si:queue/>
</si:channel>
<jms:inbound-gateway id="jmsGateway"
connection-factory=""

View File

@@ -10,7 +10,9 @@
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd">
<si:channel id="requestChannel"/>
<si:channel id="requestChannel">
<si:queue/>
</si:channel>
<jms:inbound-gateway id="jmsGateway"
connection-factory="testConnectionFactory"