diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java index 1b9e8f3a80..1ebd320c1d 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ import javax.jms.Session; * @see org.springframework.jms.listener.endpoint.JmsMessageEndpointManager * @see javax.jms.MessageListener */ -public interface SessionAwareMessageListener { +public interface SessionAwareMessageListener { /** * Callback for processing a received JMS message. @@ -51,6 +51,6 @@ public interface SessionAwareMessageListener { * @param session the underlying JMS Session (never null) * @throws JMSException if thrown by JMS methods */ - void onMessage(Message message, Session session) throws JMSException; + void onMessage(M message, Session session) throws JMSException; } diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java index 5125d9f0ad..9f070eb9f4 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java @@ -128,7 +128,8 @@ import org.springframework.util.ObjectUtils; * @see org.springframework.jms.listener.SessionAwareMessageListener * @see org.springframework.jms.listener.AbstractMessageListenerContainer#setMessageListener */ -public class MessageListenerAdapter implements MessageListener, SessionAwareMessageListener, SubscriptionNameProvider { +public class MessageListenerAdapter + implements MessageListener, SessionAwareMessageListener, SubscriptionNameProvider { /** * Out-of-the-box value for the default listener method: "handleMessage". @@ -318,6 +319,7 @@ public class MessageListenerAdapter implements MessageListener, SessionAwareMess * @param session the JMS session to operate on * @throws JMSException if thrown by JMS API methods */ + @SuppressWarnings("unchecked") public void onMessage(Message message, Session session) throws JMSException { // Check whether the delegate is a MessageListener impl itself. // In that case, the adapter will simply act as a pass-through. diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java b/org.springframework.jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java index d73ca8ced3..dd42794609 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ import org.springframework.remoting.support.RemoteInvocationResult; * @see JmsInvokerProxyFactoryBean */ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter - implements SessionAwareMessageListener, InitializingBean { + implements SessionAwareMessageListener, InitializingBean { private MessageConverter messageConverter = new SimpleMessageConverter();