I use the MessageListenerAdapter using the following interface as it's Delegate:
When I send a MapMessage via the convertAndSend method of the JmsTemplate the MethodInvoker tries to find the right Method of the Delegate, in order to receive the payload of the Message (== at runtime a Object of type HashMap). The MethodInvoker selectes the following methodCode:import java.io.Serializable; import java.util.Map; public interface MessageDelegate { void handleMessage(String aMessage); @SuppressWarnings("rawtypes") void handleMessage(Map aMessage); void handleMessage(byte[] aMessage); void handleMessage(Serializable aMessage); }.Code:void handleMessage(Serializable aMessage)
only if I change the method signature oftoCode:void handleMessage(Map aMessage);the Map receiving method gets called upon reception of the MapMessage. Why do all examples of the MessageListener adapter show the handleMessage Method with an argument of type Map instead of HashMap if it never get's called, OR what am I doing wrong?Code:void handleMessage(HashMap aMessage);
Thanks for any help!


Reply With Quote
