OK, so I keep coming back to this project every six months. I'm trying to update to spring integration 2.0.0.M4 from spring integration 1.0.0.M6.
We have an applications where we want to dynamically provision messaging. I've managed to write some code that can dynamically write to a JMS queue, but the code to read from one is not working.
Any idea what class/es I should be using?
For the sender:
For the receiver this doesn't work:Code:public static SubscribableChannel createChannel(String destinationName, ConnectionFactory connectionFactory) { JmsDestinationBackedMessageChannel channel = new JmsDestinationBackedMessageChannel( connectionFactory, destinationName, false); try { channel.afterPropertiesSet(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return channel; } ... channel.send(message);
Code:channel = createChannel(queue, connectionFactory); channel.subscribe(this); EventDrivenConsumer consumer = new EventDrivenConsumer(channel, this); consumer.start();


Reply With Quote