Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Complete
-
Affects Version/s: 4.3.10
-
Fix Version/s: 5.0 M5
-
Component/s: DSL, JMS Support
-
Labels:None
-
Environment:Java 8, ActiveMQ
Description
When trying to set a property of the JMS message listener via configureListenerContainer i.e.:
@Bean public IntegrationFlow inboundJmsGatewayFlow(ConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.inboundGateway(connectionFactory) .destination("jms-test") .defaultReplyQueueName("jms-test-reply") .configureListenerContainer(c -> c.sessionTransacted(false)) ) .channel("inboundFlow.input") .get(); }
the following exception is thrown:
java.lang.ClassCastException: org.springframework.integration.dsl.jms.JmsListenerContainerSpec cannot be cast to org.springframework.integration.dsl.jms.JmsDefaultListenerContainerSpec
A workaround is to use .get() like so: .configureListenerContainer(c -> c.get().setSessionTransacted(false))