From 1033015ffaf18784e7e10bde5cc74e63a8605d8d Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 24 Feb 2009 00:26:37 +0000 Subject: [PATCH] deprecated support for JMS 1.0.2 providers git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@674 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../connection/CachingConnectionFactory.java | 6 +- .../jms/connection/JmsTransactionManager.java | 4 -- .../connection/JmsTransactionManager102.java | 4 +- .../connection/SingleConnectionFactory.java | 6 +- .../SingleConnectionFactory102.java | 4 +- .../springframework/jms/core/JmsTemplate.java | 55 ++++++++++--------- .../jms/core/JmsTemplate102.java | 4 +- .../jms/core/support/JmsGatewaySupport.java | 17 +++--- .../jms/core/support/package.html | 2 +- .../DefaultMessageListenerContainer.java | 4 -- .../DefaultMessageListenerContainer102.java | 8 ++- .../SimpleMessageListenerContainer.java | 4 -- .../SimpleMessageListenerContainer102.java | 4 +- .../adapter/MessageListenerAdapter.java | 5 -- .../adapter/MessageListenerAdapter102.java | 8 ++- .../converter/SimpleMessageConverter.java | 8 +-- .../converter/SimpleMessageConverter102.java | 4 +- .../jms/config/spring-jms-3.0.xsd | 3 - 18 files changed, 70 insertions(+), 80 deletions(-) diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java b/org.springframework.jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java index 657e155a2a1..1f6fcde1fb1 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.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. @@ -201,7 +201,7 @@ public class CachingConnectionFactory extends SingleConnectionFactory { * Checks for a cached Session for the given mode. */ protected Session getSession(Connection con, Integer mode) throws JMSException { - LinkedList sessionList = null; + LinkedList sessionList; synchronized (this.cachedSessions) { sessionList = this.cachedSessions.get(mode); if (sessionList == null) { @@ -429,7 +429,7 @@ public class CachingConnectionFactory extends SingleConnectionFactory { /** * Simple wrapper class around a Destination and other consumer attributes. - * Used as the key when caching consumers. + * Used as the cache key when caching MessageConsumer objects. */ private static class ConsumerCacheKey { diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java b/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java index e9aad137803..711e62ac471 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java @@ -40,10 +40,6 @@ import org.springframework.transaction.support.TransactionSynchronizationManager * Connection/Session pair from the specified ConnectionFactory to the thread, * potentially allowing for one thread-bound Session per ConnectionFactory. * - *

NOTE: This class requires a JMS 1.1+ provider because it builds on - * the domain-independent API. Use the {@link JmsTransactionManager102} subclass - * for a JMS 1.0.2 provider, e.g. when running on a J2EE 1.3 server. - * *

This local strategy is an alternative to executing JMS operations within * JTA transactions. Its advantage is that it is able to work in any environment, * for example a standalone application or a test suite, with any message broker diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java b/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java index 8efdac42073..98fa64296f5 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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. @@ -39,7 +39,9 @@ import javax.jms.TopicConnectionFactory; * @since 1.1 * @see #setConnectionFactory * @see #setPubSubDomain + * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link JmsTransactionManager} */ +@Deprecated public class JmsTransactionManager102 extends JmsTransactionManager { private boolean pubSubDomain = false; diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java b/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java index 57a5347053d..4e65ac26e4d 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.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. @@ -22,7 +22,6 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.ArrayList; import java.util.List; - import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.ExceptionListener; @@ -49,8 +48,7 @@ import org.springframework.util.Assert; * *

You can either pass in a specific JMS Connection directly or let this * factory lazily create a Connection via a given target ConnectionFactory. - * This factory generally works with JMS 1.1 as well as JMS 1.0.2; use - * {@link SingleConnectionFactory102} for strict JMS 1.0.2 only usage. + * This factory generally works with JMS 1.1 as well as the JMS 1.0.2 API. * *

Note that when using the JMS 1.0.2 API, this ConnectionFactory will switch * into queue/topic mode according to the JMS API methods used at runtime: diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java b/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java index 4fc9c54774c..e5360b54fc9 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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. @@ -36,7 +36,9 @@ import javax.jms.TopicConnectionFactory; * @since 1.1 * @see #setTargetConnectionFactory * @see #setPubSubDomain + * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link SingleConnectionFactory} */ +@Deprecated public class SingleConnectionFactory102 extends SingleConnectionFactory { private boolean pubSubDomain = false; diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate.java b/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate.java index 61cd8fb4a3b..4c82d1ac783 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate.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,14 +41,10 @@ import org.springframework.util.Assert; /** * Helper class that simplifies synchronous JMS access code. * - *

NOTE: This class requires a JMS 1.1+ provider because it builds - * on the domain-independent API. Use the {@link JmsTemplate102} subclass - * for a JMS 1.0.2 provider, e.g. when running on a J2EE 1.3 server. - * *

If you want to use dynamic destination creation, you must specify * the type of JMS destination to create, using the "pubSubDomain" property. * For other operations, this is not necessary, in contrast to when working - * with JmsTemplate102. Point-to-Point (Queues) is the default domain. + * with {@link JmsTemplate102}. Point-to-Point (Queues) is the default domain. * *

Default settings for JMS Sessions are "not transacted" and "auto-acknowledge". * As defined by the J2EE specification, the transaction and acknowledgement @@ -83,7 +79,6 @@ import org.springframework.util.Assert; * @see #setPubSubDomain * @see #setDestinationResolver * @see #setMessageConverter - * @see JmsTemplate102 * @see javax.jms.MessageProducer * @see javax.jms.MessageConsumer */ @@ -536,7 +531,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } public void send(final Destination destination, final MessageCreator messageCreator) throws JmsException { - execute(new SessionCallback() { + execute(new SessionCallback() { public Object doInJms(Session session) throws JMSException { doSend(session, destination, messageCreator); return null; @@ -545,7 +540,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } public void send(final String destinationName, final MessageCreator messageCreator) throws JmsException { - execute(new SessionCallback() { + execute(new SessionCallback() { public Object doInJms(Session session) throws JMSException { Destination destination = resolveDestinationName(session, destinationName); doSend(session, destination, messageCreator); @@ -697,16 +692,16 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } public Message receiveSelected(final Destination destination, final String messageSelector) throws JmsException { - return (Message) execute(new SessionCallback() { - public Object doInJms(Session session) throws JMSException { + return execute(new SessionCallback() { + public Message doInJms(Session session) throws JMSException { return doReceive(session, destination, messageSelector); } }, true); } public Message receiveSelected(final String destinationName, final String messageSelector) throws JmsException { - return (Message) execute(new SessionCallback() { - public Object doInJms(Session session) throws JMSException { + return execute(new SessionCallback() { + public Message doInJms(Session session) throws JMSException { Destination destination = resolveDestinationName(session, destinationName); return doReceive(session, destination, messageSelector); } @@ -730,7 +725,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations /** * Actually receive a JMS message. * @param session the JMS Session to operate on - * @param consumer the JMS MessageConsumer to send with + * @param consumer the JMS MessageConsumer to receive with * @return the JMS Message received, or null if none * @throws JMSException if thrown by JMS API methods */ @@ -743,18 +738,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations if (resourceHolder != null && resourceHolder.hasTimeout()) { timeout = resourceHolder.getTimeToLiveInMillis(); } - - Message message = null; - if (timeout == RECEIVE_TIMEOUT_NO_WAIT) { - message = consumer.receiveNoWait(); - } - else if (timeout > 0) { - message = consumer.receive(timeout); - } - else { - message = consumer.receive(); - } - + Message message = doReceive(consumer, timeout); if (session.getTransacted()) { // Commit necessary - but avoid commit call within a JTA transaction. if (isSessionLocallyTransacted(session)) { @@ -775,6 +759,25 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations } } + /** + * Actually receive a message from the given consumer. + * @param consumer the JMS MessageConsumer to receive with + * @param timeout the receive timeout + * @return the JMS Message received, or null if none + * @throws JMSException if thrown by JMS API methods + */ + private Message doReceive(MessageConsumer consumer, long timeout) throws JMSException { + if (timeout == RECEIVE_TIMEOUT_NO_WAIT) { + return consumer.receiveNoWait(); + } + else if (timeout > 0) { + return consumer.receive(timeout); + } + else { + return consumer.receive(); + } + } + //------------------------------------------------------------------------- // Convenience methods for receiving auto-converted messages diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java b/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java index 91026029614..1e6a46e6758 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/core/JmsTemplate102.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. @@ -73,7 +73,9 @@ import org.springframework.jms.support.converter.SimpleMessageConverter102; * @see javax.jms.TopicPublisher * @see javax.jms.QueueReceiver * @see javax.jms.TopicSubscriber + * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link JmsTemplate} */ +@Deprecated public class JmsTemplate102 extends JmsTemplate { /** diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java b/org.springframework.jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java index a8dcc8d547a..c3abca4acee 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java @@ -1,12 +1,12 @@ /* - * Copyright 2002-2005 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,8 +31,8 @@ import org.springframework.jms.core.JmsTemplate; *

Requires a ConnectionFactory or a JmsTemplate instance to be set. * It will create its own JmsTemplate if a ConnectionFactory is passed in. * A custom JmsTemplate instance can be created for a given ConnectionFactory - * through overriding the createJmsTemplate method. - * + * through overriding the {@link #createJmsTemplate} method. + * * @author Mark Pollack * @since 1.1.1 * @see #setConnectionFactory @@ -42,6 +42,7 @@ import org.springframework.jms.core.JmsTemplate; */ public abstract class JmsGatewaySupport implements InitializingBean { + /** Logger available to subclasses */ protected final Log logger = LogFactory.getLog(getClass()); private JmsTemplate jmsTemplate; @@ -92,12 +93,12 @@ public abstract class JmsGatewaySupport implements InitializingBean { * Return the JmsTemplate for the gateway. */ public final JmsTemplate getJmsTemplate() { - return jmsTemplate; + return this.jmsTemplate; } public final void afterPropertiesSet() throws IllegalArgumentException, BeanInitializationException { if (this.jmsTemplate == null) { - throw new IllegalArgumentException("connectionFactory or jmsTemplate is required"); + throw new IllegalArgumentException("'connectionFactory' or 'jmsTemplate' is required"); } try { initGateway(); diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/core/support/package.html b/org.springframework.jms/src/main/java/org/springframework/jms/core/support/package.html index 7863ad48e00..b55a5db09d7 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/core/support/package.html +++ b/org.springframework.jms/src/main/java/org/springframework/jms/core/support/package.html @@ -1,7 +1,7 @@ -Classes supporting the org.springframework.jms.core package. +Classes supporting the org.springframework.jms.core package. Contains a base class for JmsTemplate usage. diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java index 234a33ea3be..2b325d80279 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java @@ -43,10 +43,6 @@ import org.springframework.util.ClassUtils; * Designed to work in a native JMS environment as well as in a J2EE environment, * with only minimal differences in configuration. * - *

NOTE: This class requires a JMS 1.1+ provider, because it builds on - * the domain-independent API. Use the {@link DefaultMessageListenerContainer102} - * subclass for a JMS 1.0.2 provider, e.g. when running on a J2EE 1.3 server. - * *

This is a simple but nevertheless powerful form of message listener container. * On startup, it obtains a fixed number of JMS Sessions to invoke the listener, * and optionally allows for dynamic adaptation at runtime (up until a maximum number). diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java index 63c71f30cf1..dfcceeb5dd9 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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,9 @@ import org.springframework.jms.connection.JmsResourceHolder; * * @author Juergen Hoeller * @since 2.0 + * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link DefaultMessageListenerContainer} */ +@Deprecated public class DefaultMessageListenerContainer102 extends DefaultMessageListenerContainer { /** @@ -49,7 +51,7 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo * a QueueConnection or a TopicConnection, depending on the domain. */ protected Connection getConnection(JmsResourceHolder holder) { - return holder.getConnection(isPubSubDomain() ? (Class) TopicConnection.class : QueueConnection.class); + return holder.getConnection(isPubSubDomain() ? TopicConnection.class : QueueConnection.class); } /** @@ -57,7 +59,7 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo * a QueueSession or a TopicSession, depending on the domain. */ protected Session getSession(JmsResourceHolder holder) { - return holder.getSession(isPubSubDomain() ? (Class) TopicSession.class : QueueSession.class); + return holder.getSession(isPubSubDomain() ? TopicSession.class : QueueSession.class); } /** diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java index f6a4b926da4..4a9d1233053 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java @@ -38,10 +38,6 @@ import org.springframework.util.Assert; * MessageConsumer.setMessageListener() method to * create concurrent MessageConsumers for the specified listeners. * - *

NOTE: This class requires a JMS 1.1+ provider, because it builds on - * the domain-independent API. Use the {@link SimpleMessageListenerContainer102} - * subclass for a JMS 1.0.2 provider, e.g. when running on a J2EE 1.3 server. - * *

This is the simplest form of a message listener container. * It creates a fixed number of JMS Sessions to invoke the listener, * not allowing for dynamic adaptation to runtime demands. Its main diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java index beecd5f20ae..d93a3045f95 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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. @@ -39,7 +39,9 @@ import javax.jms.TopicSession; * * @author Juergen Hoeller * @since 2.0 + * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link SimpleMessageListenerContainer} */ +@Deprecated public class SimpleMessageListenerContainer102 extends SimpleMessageListenerContainer { /** 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 e4e4eac35a1..5125d9f0ad2 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 @@ -46,16 +46,11 @@ import org.springframework.util.ObjectUtils; * Allows listener methods to operate on message content types, completely * independent from the JMS API. * - *

NOTE: This class requires a JMS 1.1+ provider, because it builds - * on the domain-independent API. Use the {@link MessageListenerAdapter102 - * MessageListenerAdapter102} subclass for JMS 1.0.2 providers. - * *

By default, the content of incoming JMS messages gets extracted before * being passed into the target listener method, to let the target method * operate on message content types such as String or byte array instead of * the raw {@link Message}. Message type conversion is delegated to a Spring * JMS {@link MessageConverter}. By default, a {@link SimpleMessageConverter} - * {@link org.springframework.jms.support.converter.SimpleMessageConverter102 (102)} * will be used. (If you do not want such automatic message conversion taking * place, then be sure to set the {@link #setMessageConverter MessageConverter} * to null.) diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java index e7fbb922ecc..8d15d9b6401 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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,18 +41,20 @@ import org.springframework.jms.support.converter.SimpleMessageConverter102; * @author Juergen Hoeller * @author Rick Evans * @since 2.0 + * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link MessageListenerAdapter} */ +@Deprecated public class MessageListenerAdapter102 extends MessageListenerAdapter { /** - * Create a new instance of the {@link MessageListenerAdapter102} class + * Create a new instance of the MessageListenerAdapter102 class * with the default settings. */ public MessageListenerAdapter102() { } /** - * Create a new instance of the {@link MessageListenerAdapter102} class + * Create a new instance of the MessageListenerAdapter102 class * for the given delegate. * @param delegate the target object to delegate message listening to */ diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java b/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java index 411ba2c802a..6d58939730c 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.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. @@ -40,12 +40,6 @@ import org.springframework.util.ObjectUtils; * {@link javax.jms.BytesMessage}, a Map to a {@link javax.jms.MapMessage}, and * a Serializable object to a {@link javax.jms.ObjectMessage} (or vice versa). * - *

This converter implementation works for both JMS 1.1 and JMS 1.0.2, - * except when extracting a byte array from a BytesMessage. So for converting - * BytesMessages with a JMS 1.0.2 provider, use {@link SimpleMessageConverter102}. - * (As you would expect, {@link org.springframework.jms.core.JmsTemplate102} - * uses SimpleMessageConverter102 as default.) - * * @author Juergen Hoeller * @since 1.1 * @see org.springframework.jms.core.JmsTemplate#convertAndSend diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java b/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java index 8272917c8a5..9f7b887a318 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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. @@ -35,7 +35,9 @@ import javax.jms.JMSException; * @author Juergen Hoeller * @since 1.1.1 * @see javax.jms.BytesMessage#getBodyLength() + * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link SimpleMessageConverter} */ +@Deprecated public class SimpleMessageConverter102 extends SimpleMessageConverter { public static final int BUFFER_SIZE = 4096; diff --git a/org.springframework.jms/src/main/resources/org/springframework/jms/config/spring-jms-3.0.xsd b/org.springframework.jms/src/main/resources/org/springframework/jms/config/spring-jms-3.0.xsd index c619467d1f7..1649aa9512d 100644 --- a/org.springframework.jms/src/main/resources/org/springframework/jms/config/spring-jms-3.0.xsd +++ b/org.springframework.jms/src/main/resources/org/springframework/jms/config/spring-jms-3.0.xsd @@ -39,15 +39,12 @@ - -