Revert "Merge branch 'SPR-10130' into cleanup-master"
This reverts commit45fa50821a, reversing changes made toa312d900f8.
This commit is contained in:
@@ -80,7 +80,6 @@ public abstract class JmsException extends NestedRuntimeException {
|
||||
* if there is one.
|
||||
* @see javax.jms.JMSException#getLinkedException()
|
||||
*/
|
||||
@Override
|
||||
public String getMessage() {
|
||||
String message = super.getMessage();
|
||||
Throwable cause = getCause();
|
||||
|
||||
@@ -88,7 +88,6 @@ abstract class AbstractListenerContainerParser implements BeanDefinitionParser {
|
||||
protected static final String PREFETCH_ATTRIBUTE = "prefetch";
|
||||
|
||||
|
||||
@Override
|
||||
public BeanDefinition parse(Element element, ParserContext parserContext) {
|
||||
CompositeComponentDefinition compositeDef =
|
||||
new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element));
|
||||
|
||||
@@ -37,7 +37,6 @@ class JcaListenerContainerParser extends AbstractListenerContainerParser {
|
||||
private static final String ACTIVATION_SPEC_FACTORY_ATTRIBUTE = "activation-spec-factory";
|
||||
|
||||
|
||||
@Override
|
||||
protected BeanDefinition parseContainer(Element listenerEle, Element containerEle, ParserContext parserContext) {
|
||||
RootBeanDefinition containerDef = new RootBeanDefinition();
|
||||
containerDef.setSource(parserContext.extractSource(containerEle));
|
||||
|
||||
@@ -50,7 +50,6 @@ class JmsListenerContainerParser extends AbstractListenerContainerParser {
|
||||
private static final String RECEIVE_TIMEOUT_ATTRIBUTE = "receive-timeout";
|
||||
|
||||
|
||||
@Override
|
||||
protected BeanDefinition parseContainer(Element listenerEle, Element containerEle, ParserContext parserContext) {
|
||||
RootBeanDefinition containerDef = new RootBeanDefinition();
|
||||
containerDef.setSource(parserContext.extractSource(containerEle));
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
*/
|
||||
public class JmsNamespaceHandler extends NamespaceHandlerSupport {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
registerBeanDefinitionParser("listener-container", new JmsListenerContainerParser());
|
||||
registerBeanDefinitionParser("jca-listener-container", new JcaListenerContainerParser());
|
||||
|
||||
@@ -42,52 +42,42 @@ class CachedMessageConsumer implements MessageConsumer, QueueReceiver, TopicSubs
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getMessageSelector() throws JMSException {
|
||||
return this.target.getMessageSelector();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Queue getQueue() throws JMSException {
|
||||
return (this.target instanceof QueueReceiver ? ((QueueReceiver) this.target).getQueue() : null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Topic getTopic() throws JMSException {
|
||||
return (this.target instanceof TopicSubscriber ? ((TopicSubscriber) this.target).getTopic() : null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getNoLocal() throws JMSException {
|
||||
return (this.target instanceof TopicSubscriber && ((TopicSubscriber) this.target).getNoLocal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessageListener getMessageListener() throws JMSException {
|
||||
return this.target.getMessageListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMessageListener(MessageListener messageListener) throws JMSException {
|
||||
this.target.setMessageListener(messageListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receive() throws JMSException {
|
||||
return this.target.receive();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receive(long timeout) throws JMSException {
|
||||
return this.target.receive(timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receiveNoWait() throws JMSException {
|
||||
return this.target.receiveNoWait();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws JMSException {
|
||||
// It's a cached MessageConsumer...
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setDisableMessageID(boolean disableMessageID) throws JMSException {
|
||||
if (this.originalDisableMessageID == null) {
|
||||
this.originalDisableMessageID = Boolean.valueOf(this.target.getDisableMessageID());
|
||||
@@ -63,12 +62,10 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis
|
||||
this.target.setDisableMessageID(disableMessageID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getDisableMessageID() throws JMSException {
|
||||
return this.target.getDisableMessageID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisableMessageTimestamp(boolean disableMessageTimestamp) throws JMSException {
|
||||
if (this.originalDisableMessageTimestamp == null) {
|
||||
this.originalDisableMessageTimestamp = Boolean.valueOf(this.target.getDisableMessageTimestamp());
|
||||
@@ -76,107 +73,86 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis
|
||||
this.target.setDisableMessageTimestamp(disableMessageTimestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getDisableMessageTimestamp() throws JMSException {
|
||||
return this.target.getDisableMessageTimestamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeliveryMode(int deliveryMode) {
|
||||
this.deliveryMode = deliveryMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDeliveryMode() {
|
||||
return this.deliveryMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPriority(int priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return this.priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTimeToLive(long timeToLive) {
|
||||
this.timeToLive = timeToLive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTimeToLive() {
|
||||
return this.timeToLive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Destination getDestination() throws JMSException {
|
||||
return this.target.getDestination();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Queue getQueue() throws JMSException {
|
||||
return (Queue) this.target.getDestination();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Topic getTopic() throws JMSException {
|
||||
return (Topic) this.target.getDestination();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Message message) throws JMSException {
|
||||
this.target.send(message, this.deliveryMode, this.priority, this.timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
|
||||
this.target.send(message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Destination destination, Message message) throws JMSException {
|
||||
this.target.send(destination, message, this.deliveryMode, this.priority, this.timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
|
||||
this.target.send(destination, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Queue queue, Message message) throws JMSException {
|
||||
this.target.send(queue, message, this.deliveryMode, this.priority, this.timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
|
||||
this.target.send(queue, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(Message message) throws JMSException {
|
||||
this.target.send(message, this.deliveryMode, this.priority, this.timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
|
||||
this.target.send(message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(Topic topic, Message message) throws JMSException {
|
||||
this.target.send(topic, message, this.deliveryMode, this.priority, this.timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
|
||||
this.target.send(topic, message, deliveryMode, priority, timeToLive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws JMSException {
|
||||
// It's a cached MessageProducer... reset properties only.
|
||||
if (this.originalDisableMessageID != null) {
|
||||
|
||||
@@ -176,7 +176,6 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
|
||||
/**
|
||||
* Resets the Session cache as well.
|
||||
*/
|
||||
@Override
|
||||
public void resetConnection() {
|
||||
this.active = false;
|
||||
synchronized (this.cachedSessions) {
|
||||
@@ -203,7 +202,6 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
|
||||
/**
|
||||
* Checks for a cached Session for the given mode.
|
||||
*/
|
||||
@Override
|
||||
protected Session getSession(Connection con, Integer mode) throws JMSException {
|
||||
LinkedList<Session> sessionList;
|
||||
synchronized (this.cachedSessions) {
|
||||
@@ -281,7 +279,6 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
|
||||
this.sessionList = sessionList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
String methodName = method.getName();
|
||||
if (methodName.equals("equals")) {
|
||||
|
||||
@@ -52,7 +52,6 @@ public class ChainedExceptionListener implements ExceptionListener {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onException(JMSException ex) {
|
||||
for (ExceptionListener listener : this.delegates) {
|
||||
listener.onException(ex);
|
||||
|
||||
@@ -136,23 +136,18 @@ public abstract class ConnectionFactoryUtils {
|
||||
throws JMSException {
|
||||
|
||||
return doGetTransactionalSession(cf, new ResourceFactory() {
|
||||
@Override
|
||||
public Session getSession(JmsResourceHolder holder) {
|
||||
return holder.getSession(Session.class, existingCon);
|
||||
}
|
||||
@Override
|
||||
public Connection getConnection(JmsResourceHolder holder) {
|
||||
return (existingCon != null ? existingCon : holder.getConnection());
|
||||
}
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
return cf.createConnection();
|
||||
}
|
||||
@Override
|
||||
public Session createSession(Connection con) throws JMSException {
|
||||
return con.createSession(synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE);
|
||||
}
|
||||
@Override
|
||||
public boolean isSynchedLocalTransactionAllowed() {
|
||||
return synchedLocalTransactionAllowed;
|
||||
}
|
||||
@@ -178,23 +173,18 @@ public abstract class ConnectionFactoryUtils {
|
||||
throws JMSException {
|
||||
|
||||
return (QueueSession) doGetTransactionalSession(cf, new ResourceFactory() {
|
||||
@Override
|
||||
public Session getSession(JmsResourceHolder holder) {
|
||||
return holder.getSession(QueueSession.class, existingCon);
|
||||
}
|
||||
@Override
|
||||
public Connection getConnection(JmsResourceHolder holder) {
|
||||
return (existingCon != null ? existingCon : holder.getConnection(QueueConnection.class));
|
||||
}
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
return cf.createQueueConnection();
|
||||
}
|
||||
@Override
|
||||
public Session createSession(Connection con) throws JMSException {
|
||||
return ((QueueConnection) con).createQueueSession(synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE);
|
||||
}
|
||||
@Override
|
||||
public boolean isSynchedLocalTransactionAllowed() {
|
||||
return synchedLocalTransactionAllowed;
|
||||
}
|
||||
@@ -220,23 +210,18 @@ public abstract class ConnectionFactoryUtils {
|
||||
throws JMSException {
|
||||
|
||||
return (TopicSession) doGetTransactionalSession(cf, new ResourceFactory() {
|
||||
@Override
|
||||
public Session getSession(JmsResourceHolder holder) {
|
||||
return holder.getSession(TopicSession.class, existingCon);
|
||||
}
|
||||
@Override
|
||||
public Connection getConnection(JmsResourceHolder holder) {
|
||||
return (existingCon != null ? existingCon : holder.getConnection(TopicConnection.class));
|
||||
}
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
return cf.createTopicConnection();
|
||||
}
|
||||
@Override
|
||||
public Session createSession(Connection con) throws JMSException {
|
||||
return ((TopicConnection) con).createTopicSession(synchedLocalTransactionAllowed, Session.AUTO_ACKNOWLEDGE);
|
||||
}
|
||||
@Override
|
||||
public boolean isSynchedLocalTransactionAllowed() {
|
||||
return synchedLocalTransactionAllowed;
|
||||
}
|
||||
@@ -410,12 +395,10 @@ public abstract class ConnectionFactoryUtils {
|
||||
this.transacted = transacted;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldReleaseBeforeCompletion() {
|
||||
return !this.transacted;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processResourceAfterCommit(JmsResourceHolder resourceHolder) {
|
||||
try {
|
||||
resourceHolder.commitAll();
|
||||
@@ -425,7 +408,6 @@ public abstract class ConnectionFactoryUtils {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void releaseResource(JmsResourceHolder resourceHolder, Object resourceKey) {
|
||||
resourceHolder.closeAll();
|
||||
}
|
||||
|
||||
@@ -85,7 +85,6 @@ public class DelegatingConnectionFactory
|
||||
this.shouldStopConnections = shouldStopConnections;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
if (getTargetConnectionFactory() == null) {
|
||||
throw new IllegalArgumentException("'targetConnectionFactory' is required");
|
||||
@@ -93,17 +92,14 @@ public class DelegatingConnectionFactory
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
return getTargetConnectionFactory().createConnection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection createConnection(String username, String password) throws JMSException {
|
||||
return getTargetConnectionFactory().createConnection(username, password);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueueConnection createQueueConnection() throws JMSException {
|
||||
ConnectionFactory cf = getTargetConnectionFactory();
|
||||
if (cf instanceof QueueConnectionFactory) {
|
||||
@@ -118,7 +114,6 @@ public class DelegatingConnectionFactory
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueueConnection createQueueConnection(String username, String password) throws JMSException {
|
||||
ConnectionFactory cf = getTargetConnectionFactory();
|
||||
if (cf instanceof QueueConnectionFactory) {
|
||||
@@ -133,7 +128,6 @@ public class DelegatingConnectionFactory
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicConnection createTopicConnection() throws JMSException {
|
||||
ConnectionFactory cf = getTargetConnectionFactory();
|
||||
if (cf instanceof TopicConnectionFactory) {
|
||||
@@ -148,7 +142,6 @@ public class DelegatingConnectionFactory
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicConnection createTopicConnection(String username, String password) throws JMSException {
|
||||
ConnectionFactory cf = getTargetConnectionFactory();
|
||||
if (cf instanceof TopicConnectionFactory) {
|
||||
@@ -163,7 +156,6 @@ public class DelegatingConnectionFactory
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldStop(Connection con) {
|
||||
return this.shouldStopConnections;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,6 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager
|
||||
/**
|
||||
* Make sure the ConnectionFactory has been set.
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
if (getConnectionFactory() == null) {
|
||||
throw new IllegalArgumentException("Property 'connectionFactory' is required");
|
||||
@@ -154,12 +153,10 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getResourceFactory() {
|
||||
return getConnectionFactory();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object doGetTransaction() {
|
||||
JmsTransactionObject txObject = new JmsTransactionObject();
|
||||
txObject.setResourceHolder(
|
||||
@@ -167,13 +164,11 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager
|
||||
return txObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isExistingTransaction(Object transaction) {
|
||||
JmsTransactionObject txObject = (JmsTransactionObject) transaction;
|
||||
return (txObject.getResourceHolder() != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doBegin(Object transaction, TransactionDefinition definition) {
|
||||
if (definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) {
|
||||
throw new InvalidIsolationLevelException("JMS does not support an isolation level concept");
|
||||
@@ -209,20 +204,17 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object doSuspend(Object transaction) {
|
||||
JmsTransactionObject txObject = (JmsTransactionObject) transaction;
|
||||
txObject.setResourceHolder(null);
|
||||
return TransactionSynchronizationManager.unbindResource(getConnectionFactory());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doResume(Object transaction, Object suspendedResources) {
|
||||
JmsResourceHolder conHolder = (JmsResourceHolder) suspendedResources;
|
||||
TransactionSynchronizationManager.bindResource(getConnectionFactory(), conHolder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doCommit(DefaultTransactionStatus status) {
|
||||
JmsTransactionObject txObject = (JmsTransactionObject) status.getTransaction();
|
||||
Session session = txObject.getResourceHolder().getSession();
|
||||
@@ -240,7 +232,6 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doRollback(DefaultTransactionStatus status) {
|
||||
JmsTransactionObject txObject = (JmsTransactionObject) status.getTransaction();
|
||||
Session session = txObject.getResourceHolder().getSession();
|
||||
@@ -255,13 +246,11 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doSetRollbackOnly(DefaultTransactionStatus status) {
|
||||
JmsTransactionObject txObject = (JmsTransactionObject) status.getTransaction();
|
||||
txObject.getResourceHolder().setRollbackOnly();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doCleanupAfterCompletion(Object transaction) {
|
||||
JmsTransactionObject txObject = (JmsTransactionObject) transaction;
|
||||
TransactionSynchronizationManager.unbindResource(getConnectionFactory());
|
||||
@@ -313,12 +302,10 @@ public class JmsTransactionManager extends AbstractPlatformTransactionManager
|
||||
return this.resourceHolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRollbackOnly() {
|
||||
return this.resourceHolder.isRollbackOnly();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
// no-op
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ public class JmsTransactionManager102 extends JmsTransactionManager {
|
||||
* the specified destination type: QueueConnectionFactory for queues,
|
||||
* and TopicConnectionFactory for topics.
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
super.afterPropertiesSet();
|
||||
|
||||
@@ -128,7 +127,6 @@ public class JmsTransactionManager102 extends JmsTransactionManager {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Connection createConnection() throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection();
|
||||
@@ -141,7 +139,6 @@ public class JmsTransactionManager102 extends JmsTransactionManager {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Session createSession(Connection con) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnection) con).createTopicSession(true, Session.AUTO_ACKNOWLEDGE);
|
||||
|
||||
@@ -212,7 +212,6 @@ public class SingleConnectionFactory
|
||||
/**
|
||||
* Make sure a Connection or ConnectionFactory has been set.
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
if (this.connection == null && getTargetConnectionFactory() == null) {
|
||||
throw new IllegalArgumentException("Connection or 'targetConnectionFactory' is required");
|
||||
@@ -220,7 +219,6 @@ public class SingleConnectionFactory
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
synchronized (this.connectionMonitor) {
|
||||
if (this.connection == null) {
|
||||
@@ -230,13 +228,11 @@ public class SingleConnectionFactory
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection createConnection(String username, String password) throws JMSException {
|
||||
throw new javax.jms.IllegalStateException(
|
||||
"SingleConnectionFactory does not support custom username and password");
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueueConnection createQueueConnection() throws JMSException {
|
||||
Connection con;
|
||||
synchronized (this.connectionMonitor) {
|
||||
@@ -250,13 +246,11 @@ public class SingleConnectionFactory
|
||||
return ((QueueConnection) con);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueueConnection createQueueConnection(String username, String password) throws JMSException {
|
||||
throw new javax.jms.IllegalStateException(
|
||||
"SingleConnectionFactory does not support custom username and password");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicConnection createTopicConnection() throws JMSException {
|
||||
Connection con;
|
||||
synchronized (this.connectionMonitor) {
|
||||
@@ -270,7 +264,6 @@ public class SingleConnectionFactory
|
||||
return ((TopicConnection) con);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicConnection createTopicConnection(String username, String password) throws JMSException {
|
||||
throw new javax.jms.IllegalStateException(
|
||||
"SingleConnectionFactory does not support custom username and password");
|
||||
@@ -304,7 +297,6 @@ public class SingleConnectionFactory
|
||||
/**
|
||||
* Exception listener callback that renews the underlying single Connection.
|
||||
*/
|
||||
@Override
|
||||
public void onException(JMSException ex) {
|
||||
logger.warn("Encountered a JMSException - resetting the underlying JMS Connection", ex);
|
||||
resetConnection();
|
||||
@@ -316,7 +308,6 @@ public class SingleConnectionFactory
|
||||
* <p>As this bean implements DisposableBean, a bean factory will
|
||||
* automatically invoke this on destruction of its cached singletons.
|
||||
*/
|
||||
@Override
|
||||
public void destroy() {
|
||||
resetConnection();
|
||||
}
|
||||
@@ -478,7 +469,6 @@ public class SingleConnectionFactory
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
if (method.getName().equals("equals")) {
|
||||
// Only consider equal when proxies are identical.
|
||||
|
||||
@@ -93,7 +93,6 @@ public class SingleConnectionFactory102 extends SingleConnectionFactory {
|
||||
* the specified destination type: QueueConnectionFactory for queues,
|
||||
* TopicConnectionFactory for topics.
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
super.afterPropertiesSet();
|
||||
|
||||
@@ -120,7 +119,6 @@ public class SingleConnectionFactory102 extends SingleConnectionFactory {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Connection doCreateConnection() throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnectionFactory) getTargetConnectionFactory()).createTopicConnection();
|
||||
|
||||
@@ -136,19 +136,16 @@ public class TransactionAwareConnectionFactoryProxy
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
Connection targetConnection = this.targetConnectionFactory.createConnection();
|
||||
return getTransactionAwareConnectionProxy(targetConnection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection createConnection(String username, String password) throws JMSException {
|
||||
Connection targetConnection = this.targetConnectionFactory.createConnection(username, password);
|
||||
return getTransactionAwareConnectionProxy(targetConnection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueueConnection createQueueConnection() throws JMSException {
|
||||
if (!(this.targetConnectionFactory instanceof QueueConnectionFactory)) {
|
||||
throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no QueueConnectionFactory");
|
||||
@@ -158,7 +155,6 @@ public class TransactionAwareConnectionFactoryProxy
|
||||
return (QueueConnection) getTransactionAwareConnectionProxy(targetConnection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueueConnection createQueueConnection(String username, String password) throws JMSException {
|
||||
if (!(this.targetConnectionFactory instanceof QueueConnectionFactory)) {
|
||||
throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no QueueConnectionFactory");
|
||||
@@ -168,7 +164,6 @@ public class TransactionAwareConnectionFactoryProxy
|
||||
return (QueueConnection) getTransactionAwareConnectionProxy(targetConnection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicConnection createTopicConnection() throws JMSException {
|
||||
if (!(this.targetConnectionFactory instanceof TopicConnectionFactory)) {
|
||||
throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no TopicConnectionFactory");
|
||||
@@ -178,7 +173,6 @@ public class TransactionAwareConnectionFactoryProxy
|
||||
return (TopicConnection) getTransactionAwareConnectionProxy(targetConnection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopicConnection createTopicConnection(String username, String password) throws JMSException {
|
||||
if (!(this.targetConnectionFactory instanceof TopicConnectionFactory)) {
|
||||
throw new javax.jms.IllegalStateException("'targetConnectionFactory' is no TopicConnectionFactory");
|
||||
@@ -222,7 +216,6 @@ public class TransactionAwareConnectionFactoryProxy
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
// Invocation on ConnectionProxy interface coming in...
|
||||
|
||||
@@ -295,7 +288,6 @@ public class TransactionAwareConnectionFactoryProxy
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
// Invocation on SessionProxy interface coming in...
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@ public class UserCredentialsConnectionFactoryAdapter
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
if (this.targetConnectionFactory == null) {
|
||||
throw new IllegalArgumentException("Property 'targetConnectionFactory' is required");
|
||||
@@ -142,7 +141,6 @@ public class UserCredentialsConnectionFactoryAdapter
|
||||
* username and password (i.e. values of the bean properties) else.
|
||||
* @see #doCreateConnection
|
||||
*/
|
||||
@Override
|
||||
public final Connection createConnection() throws JMSException {
|
||||
JmsUserCredentials threadCredentials = this.threadBoundCredentials.get();
|
||||
if (threadCredentials != null) {
|
||||
@@ -156,7 +154,6 @@ public class UserCredentialsConnectionFactoryAdapter
|
||||
/**
|
||||
* Delegate the call straight to the target ConnectionFactory.
|
||||
*/
|
||||
@Override
|
||||
public Connection createConnection(String username, String password) throws JMSException {
|
||||
return doCreateConnection(username, password);
|
||||
}
|
||||
@@ -189,7 +186,6 @@ public class UserCredentialsConnectionFactoryAdapter
|
||||
* username and password (i.e. values of the bean properties) else.
|
||||
* @see #doCreateQueueConnection
|
||||
*/
|
||||
@Override
|
||||
public final QueueConnection createQueueConnection() throws JMSException {
|
||||
JmsUserCredentials threadCredentials = this.threadBoundCredentials.get();
|
||||
if (threadCredentials != null) {
|
||||
@@ -203,7 +199,6 @@ public class UserCredentialsConnectionFactoryAdapter
|
||||
/**
|
||||
* Delegate the call straight to the target QueueConnectionFactory.
|
||||
*/
|
||||
@Override
|
||||
public QueueConnection createQueueConnection(String username, String password) throws JMSException {
|
||||
return doCreateQueueConnection(username, password);
|
||||
}
|
||||
@@ -240,7 +235,6 @@ public class UserCredentialsConnectionFactoryAdapter
|
||||
* username and password (i.e. values of the bean properties) else.
|
||||
* @see #doCreateTopicConnection
|
||||
*/
|
||||
@Override
|
||||
public final TopicConnection createTopicConnection() throws JMSException {
|
||||
JmsUserCredentials threadCredentials = this.threadBoundCredentials.get();
|
||||
if (threadCredentials != null) {
|
||||
@@ -254,7 +248,6 @@ public class UserCredentialsConnectionFactoryAdapter
|
||||
/**
|
||||
* Delegate the call straight to the target TopicConnectionFactory.
|
||||
*/
|
||||
@Override
|
||||
public TopicConnection createTopicConnection(String username, String password) throws JMSException {
|
||||
return doCreateTopicConnection(username, password);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
// JmsOperations execute methods
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public <T> T execute(SessionCallback<T> action) throws JmsException {
|
||||
return execute(action, false);
|
||||
}
|
||||
@@ -475,7 +474,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T execute(ProducerCallback<T> action) throws JmsException {
|
||||
String defaultDestinationName = getDefaultDestinationName();
|
||||
if (defaultDestinationName != null) {
|
||||
@@ -486,11 +484,9 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T execute(final Destination destination, final ProducerCallback<T> action) throws JmsException {
|
||||
Assert.notNull(action, "Callback object must not be null");
|
||||
return execute(new SessionCallback<T>() {
|
||||
@Override
|
||||
public T doInJms(Session session) throws JMSException {
|
||||
MessageProducer producer = createProducer(session, destination);
|
||||
try {
|
||||
@@ -503,11 +499,9 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T execute(final String destinationName, final ProducerCallback<T> action) throws JmsException {
|
||||
Assert.notNull(action, "Callback object must not be null");
|
||||
return execute(new SessionCallback<T>() {
|
||||
@Override
|
||||
public T doInJms(Session session) throws JMSException {
|
||||
Destination destination = resolveDestinationName(session, destinationName);
|
||||
MessageProducer producer = createProducer(session, destination);
|
||||
@@ -526,7 +520,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
// Convenience methods for sending messages
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public void send(MessageCreator messageCreator) throws JmsException {
|
||||
Destination defaultDestination = getDefaultDestination();
|
||||
if (defaultDestination != null) {
|
||||
@@ -537,10 +530,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(final Destination destination, final MessageCreator messageCreator) throws JmsException {
|
||||
execute(new SessionCallback<Object>() {
|
||||
@Override
|
||||
public Object doInJms(Session session) throws JMSException {
|
||||
doSend(session, destination, messageCreator);
|
||||
return null;
|
||||
@@ -548,10 +539,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(final String destinationName, final MessageCreator messageCreator) throws JmsException {
|
||||
execute(new SessionCallback<Object>() {
|
||||
@Override
|
||||
public Object doInJms(Session session) throws JMSException {
|
||||
Destination destination = resolveDestinationName(session, destinationName);
|
||||
doSend(session, destination, messageCreator);
|
||||
@@ -609,7 +598,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
// Convenience methods for sending auto-converted messages
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public void convertAndSend(Object message) throws JmsException {
|
||||
Destination defaultDestination = getDefaultDestination();
|
||||
if (defaultDestination != null) {
|
||||
@@ -620,27 +608,22 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertAndSend(Destination destination, final Object message) throws JmsException {
|
||||
send(destination, new MessageCreator() {
|
||||
@Override
|
||||
public Message createMessage(Session session) throws JMSException {
|
||||
return getRequiredMessageConverter().toMessage(message, session);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertAndSend(String destinationName, final Object message) throws JmsException {
|
||||
send(destinationName, new MessageCreator() {
|
||||
@Override
|
||||
public Message createMessage(Session session) throws JMSException {
|
||||
return getRequiredMessageConverter().toMessage(message, session);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertAndSend(Object message, MessagePostProcessor postProcessor) throws JmsException {
|
||||
Destination defaultDestination = getDefaultDestination();
|
||||
if (defaultDestination != null) {
|
||||
@@ -651,13 +634,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertAndSend(
|
||||
Destination destination, final Object message, final MessagePostProcessor postProcessor)
|
||||
throws JmsException {
|
||||
|
||||
send(destination, new MessageCreator() {
|
||||
@Override
|
||||
public Message createMessage(Session session) throws JMSException {
|
||||
Message msg = getRequiredMessageConverter().toMessage(message, session);
|
||||
return postProcessor.postProcessMessage(msg);
|
||||
@@ -665,13 +646,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertAndSend(
|
||||
String destinationName, final Object message, final MessagePostProcessor postProcessor)
|
||||
throws JmsException {
|
||||
|
||||
send(destinationName, new MessageCreator() {
|
||||
@Override
|
||||
public Message createMessage(Session session) throws JMSException {
|
||||
Message msg = getRequiredMessageConverter().toMessage(message, session);
|
||||
return postProcessor.postProcessMessage(msg);
|
||||
@@ -684,7 +663,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
// Convenience methods for receiving messages
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Message receive() throws JmsException {
|
||||
Destination defaultDestination = getDefaultDestination();
|
||||
if (defaultDestination != null) {
|
||||
@@ -695,17 +673,14 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receive(Destination destination) throws JmsException {
|
||||
return receiveSelected(destination, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receive(String destinationName) throws JmsException {
|
||||
return receiveSelected(destinationName, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receiveSelected(String messageSelector) throws JmsException {
|
||||
Destination defaultDestination = getDefaultDestination();
|
||||
if (defaultDestination != null) {
|
||||
@@ -716,20 +691,16 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receiveSelected(final Destination destination, final String messageSelector) throws JmsException {
|
||||
return execute(new SessionCallback<Message>() {
|
||||
@Override
|
||||
public Message doInJms(Session session) throws JMSException {
|
||||
return doReceive(session, destination, messageSelector);
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message receiveSelected(final String destinationName, final String messageSelector) throws JmsException {
|
||||
return execute(new SessionCallback<Message>() {
|
||||
@Override
|
||||
public Message doInJms(Session session) throws JMSException {
|
||||
Destination destination = resolveDestinationName(session, destinationName);
|
||||
return doReceive(session, destination, messageSelector);
|
||||
@@ -812,32 +783,26 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
// Convenience methods for receiving auto-converted messages
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Object receiveAndConvert() throws JmsException {
|
||||
return doConvertFromMessage(receive());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object receiveAndConvert(Destination destination) throws JmsException {
|
||||
return doConvertFromMessage(receive(destination));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object receiveAndConvert(String destinationName) throws JmsException {
|
||||
return doConvertFromMessage(receive(destinationName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object receiveSelectedAndConvert(String messageSelector) throws JmsException {
|
||||
return doConvertFromMessage(receiveSelected(messageSelector));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException {
|
||||
return doConvertFromMessage(receiveSelected(destination, messageSelector));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException {
|
||||
return doConvertFromMessage(receiveSelected(destinationName, messageSelector));
|
||||
}
|
||||
@@ -864,7 +829,6 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
// Convenience methods for browsing messages
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public <T> T browse(BrowserCallback<T> action) throws JmsException {
|
||||
Queue defaultQueue = getDefaultQueue();
|
||||
if (defaultQueue != null) {
|
||||
@@ -875,17 +839,14 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T browse(Queue queue, BrowserCallback<T> action) throws JmsException {
|
||||
return browseSelected(queue, null, action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T browse(String queueName, BrowserCallback<T> action) throws JmsException {
|
||||
return browseSelected(queueName, null, action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T browseSelected(String messageSelector, BrowserCallback<T> action) throws JmsException {
|
||||
Queue defaultQueue = getDefaultQueue();
|
||||
if (defaultQueue != null) {
|
||||
@@ -896,13 +857,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T browseSelected(final Queue queue, final String messageSelector, final BrowserCallback<T> action)
|
||||
throws JmsException {
|
||||
|
||||
Assert.notNull(action, "Callback object must not be null");
|
||||
return execute(new SessionCallback<T>() {
|
||||
@Override
|
||||
public T doInJms(Session session) throws JMSException {
|
||||
QueueBrowser browser = createBrowser(session, queue, messageSelector);
|
||||
try {
|
||||
@@ -915,13 +874,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
}, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T browseSelected(final String queueName, final String messageSelector, final BrowserCallback<T> action)
|
||||
throws JmsException {
|
||||
|
||||
Assert.notNull(action, "Callback object must not be null");
|
||||
return execute(new SessionCallback<T>() {
|
||||
@Override
|
||||
public T doInJms(Session session) throws JMSException {
|
||||
Queue queue = (Queue) getDestinationResolver().resolveDestinationName(session, queueName, false);
|
||||
QueueBrowser browser = createBrowser(session, queue, messageSelector);
|
||||
@@ -1062,27 +1019,22 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
|
||||
*/
|
||||
private class JmsTemplateResourceFactory implements ConnectionFactoryUtils.ResourceFactory {
|
||||
|
||||
@Override
|
||||
public Connection getConnection(JmsResourceHolder holder) {
|
||||
return JmsTemplate.this.getConnection(holder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session getSession(JmsResourceHolder holder) {
|
||||
return JmsTemplate.this.getSession(holder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
return JmsTemplate.this.createConnection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session createSession(Connection con) throws JMSException {
|
||||
return JmsTemplate.this.createSession(con);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSynchedLocalTransactionAllowed() {
|
||||
return JmsTemplate.this.isSessionTransacted();
|
||||
}
|
||||
|
||||
@@ -111,7 +111,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
* @see org.springframework.jms.support.destination.DynamicDestinationResolver
|
||||
* @see org.springframework.jms.support.converter.SimpleMessageConverter102
|
||||
*/
|
||||
@Override
|
||||
protected void initDefaultStrategies() {
|
||||
setMessageConverter(new SimpleMessageConverter102());
|
||||
}
|
||||
@@ -122,7 +121,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
* the specified destination type: QueueConnectionFactory for queues,
|
||||
* and TopicConnectionFactory for topics.
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
super.afterPropertiesSet();
|
||||
|
||||
@@ -151,7 +149,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
* This implementation overrides the superclass method to accept either
|
||||
* a QueueConnection or a TopicConnection, depending on the domain.
|
||||
*/
|
||||
@Override
|
||||
protected Connection getConnection(JmsResourceHolder holder) {
|
||||
return holder.getConnection(isPubSubDomain() ? (Class) TopicConnection.class : QueueConnection.class);
|
||||
}
|
||||
@@ -160,7 +157,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
* This implementation overrides the superclass method to accept either
|
||||
* a QueueSession or a TopicSession, depending on the domain.
|
||||
*/
|
||||
@Override
|
||||
protected Session getSession(JmsResourceHolder holder) {
|
||||
return holder.getSession(isPubSubDomain() ? (Class) TopicSession.class : QueueSession.class);
|
||||
}
|
||||
@@ -168,7 +164,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Connection createConnection() throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection();
|
||||
@@ -181,7 +176,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Session createSession(Connection con) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnection) con).createTopicSession(isSessionTransacted(), getSessionAcknowledgeMode());
|
||||
@@ -194,7 +188,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected MessageProducer doCreateProducer(Session session, Destination destination) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicSession) session).createPublisher((Topic) destination);
|
||||
@@ -207,7 +200,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected MessageConsumer createConsumer(Session session, Destination destination, String messageSelector)
|
||||
throws JMSException {
|
||||
|
||||
@@ -219,7 +211,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected QueueBrowser createBrowser(Session session, Queue queue, String messageSelector)
|
||||
throws JMSException {
|
||||
|
||||
@@ -234,7 +225,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected void doSend(MessageProducer producer, Message message) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
if (isExplicitQosEnabled()) {
|
||||
@@ -260,7 +250,6 @@ public class JmsTemplate102 extends JmsTemplate {
|
||||
* The best we can do here is to check the setting on the template.
|
||||
* @see #getSessionAcknowledgeMode()
|
||||
*/
|
||||
@Override
|
||||
protected boolean isClientAcknowledge(Session session) throws JMSException {
|
||||
return (getSessionAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,6 @@ public abstract class JmsGatewaySupport implements InitializingBean {
|
||||
return this.jmsTemplate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void afterPropertiesSet() throws IllegalArgumentException, BeanInitializationException {
|
||||
if (this.jmsTemplate == null) {
|
||||
throw new IllegalArgumentException("'connectionFactory' or 'jmsTemplate' is required");
|
||||
|
||||
@@ -113,7 +113,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
|
||||
this.autoStartup = autoStartup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return this.autoStartup;
|
||||
}
|
||||
@@ -132,12 +131,10 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
|
||||
/**
|
||||
* Return the phase in which this container will be started and stopped.
|
||||
*/
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return this.phase;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
@@ -172,7 +169,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
|
||||
* Calls {@link #shutdown()} when the BeanFactory destroys the container instance.
|
||||
* @see #shutdown()
|
||||
*/
|
||||
@Override
|
||||
public void destroy() {
|
||||
shutdown();
|
||||
}
|
||||
@@ -264,7 +260,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
|
||||
* @throws JmsException if starting failed
|
||||
* @see #doStart
|
||||
*/
|
||||
@Override
|
||||
public void start() throws JmsException {
|
||||
try {
|
||||
doStart();
|
||||
@@ -303,7 +298,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
|
||||
* @throws JmsException if stopping failed
|
||||
* @see #doStop
|
||||
*/
|
||||
@Override
|
||||
public void stop() throws JmsException {
|
||||
try {
|
||||
doStop();
|
||||
@@ -313,7 +307,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Runnable callback) {
|
||||
this.stop();
|
||||
callback.run();
|
||||
@@ -342,7 +335,6 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
|
||||
* @see #stop()
|
||||
* @see #runningAllowed()
|
||||
*/
|
||||
@Override
|
||||
public final boolean isRunning() {
|
||||
synchronized (this.lifecycleMonitor) {
|
||||
return (this.running && runningAllowed());
|
||||
|
||||
@@ -509,17 +509,14 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
|
||||
*/
|
||||
private class MessageListenerContainerResourceFactory implements ConnectionFactoryUtils.ResourceFactory {
|
||||
|
||||
@Override
|
||||
public Connection getConnection(JmsResourceHolder holder) {
|
||||
return AbstractPollingMessageListenerContainer.this.getConnection(holder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session getSession(JmsResourceHolder holder) {
|
||||
return AbstractPollingMessageListenerContainer.this.getSession(holder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection createConnection() throws JMSException {
|
||||
if (AbstractPollingMessageListenerContainer.this.sharedConnectionEnabled()) {
|
||||
Connection sharedCon = AbstractPollingMessageListenerContainer.this.getSharedConnection();
|
||||
@@ -530,12 +527,10 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session createSession(Connection con) throws JMSException {
|
||||
return AbstractPollingMessageListenerContainer.this.createSession(con);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSynchedLocalTransactionAllowed() {
|
||||
return AbstractPollingMessageListenerContainer.this.isSessionTransacted();
|
||||
}
|
||||
|
||||
@@ -947,7 +947,6 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
|
||||
|
||||
private volatile boolean idle = true;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (lifecycleMonitor) {
|
||||
activeInvokerCount++;
|
||||
@@ -1124,7 +1123,6 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
|
||||
this.session = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLongLived() {
|
||||
return (maxMessagesPerTask < 0);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
|
||||
* This implementation overrides the superclass method to accept either
|
||||
* a QueueConnection or a TopicConnection, depending on the domain.
|
||||
*/
|
||||
@Override
|
||||
protected Connection getConnection(JmsResourceHolder holder) {
|
||||
return holder.getConnection(isPubSubDomain() ? TopicConnection.class : QueueConnection.class);
|
||||
}
|
||||
@@ -59,7 +58,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
|
||||
* This implementation overrides the superclass method to accept either
|
||||
* a QueueSession or a TopicSession, depending on the domain.
|
||||
*/
|
||||
@Override
|
||||
protected Session getSession(JmsResourceHolder holder) {
|
||||
return holder.getSession(isPubSubDomain() ? TopicSession.class : QueueSession.class);
|
||||
}
|
||||
@@ -67,7 +65,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Connection createConnection() throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection();
|
||||
@@ -80,7 +77,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Session createSession(Connection con) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnection) con).createTopicSession(isSessionTransacted(), getSessionAcknowledgeMode());
|
||||
@@ -93,7 +89,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected MessageConsumer createConsumer(Session session, Destination destination) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
if (isSubscriptionDurable()) {
|
||||
@@ -115,7 +110,6 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
|
||||
* JMS 1.1's Session {@code getAcknowledgeMode()} method.
|
||||
* The best we can do here is to check the setting on the listener container.
|
||||
*/
|
||||
@Override
|
||||
protected boolean isClientAcknowledge(Session session) throws JMSException {
|
||||
return (getSessionAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE);
|
||||
}
|
||||
|
||||
@@ -240,7 +240,6 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
|
||||
* shared connection and its sessions and consumers.
|
||||
* @param ex the reported connection exception
|
||||
*/
|
||||
@Override
|
||||
public void onException(JMSException ex) {
|
||||
// First invoke the user-specific ExceptionListener, if any.
|
||||
invokeExceptionListener(ex);
|
||||
@@ -302,10 +301,8 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
|
||||
|
||||
if (this.taskExecutor != null) {
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(final Message message) {
|
||||
taskExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
processMessage(message, session);
|
||||
}
|
||||
@@ -315,7 +312,6 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
|
||||
}
|
||||
else {
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(Message message) {
|
||||
processMessage(message, session);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Connection createConnection() throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnectionFactory) getConnectionFactory()).createTopicConnection();
|
||||
@@ -60,7 +59,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected Session createSession(Connection con) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
return ((TopicConnection) con).createTopicSession(isSessionTransacted(), getSessionAcknowledgeMode());
|
||||
@@ -73,7 +71,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont
|
||||
/**
|
||||
* This implementation overrides the superclass method to use JMS 1.0.2 API.
|
||||
*/
|
||||
@Override
|
||||
protected MessageConsumer createConsumer(Session session, Destination destination) throws JMSException {
|
||||
if (isPubSubDomain()) {
|
||||
if (isSubscriptionDurable()) {
|
||||
@@ -95,7 +92,6 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont
|
||||
* JMS 1.1's Session {@code getAcknowledgeMode()} method.
|
||||
* The best we can do here is to check the setting on the listener container.
|
||||
*/
|
||||
@Override
|
||||
protected boolean isClientAcknowledge(Session session) throws JMSException {
|
||||
return (getSessionAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE);
|
||||
}
|
||||
|
||||
@@ -301,7 +301,6 @@ public class MessageListenerAdapter
|
||||
* @see #handleListenerException
|
||||
* @see #onMessage(javax.jms.Message, javax.jms.Session)
|
||||
*/
|
||||
@Override
|
||||
public void onMessage(Message message) {
|
||||
try {
|
||||
onMessage(message, null);
|
||||
@@ -320,7 +319,6 @@ public class MessageListenerAdapter
|
||||
* @param session the JMS session to operate on
|
||||
* @throws JMSException if thrown by JMS API methods
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void onMessage(Message message, Session session) throws JMSException {
|
||||
// Check whether the delegate is a MessageListener impl itself.
|
||||
@@ -363,7 +361,6 @@ public class MessageListenerAdapter
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubscriptionName() {
|
||||
Object delegate = getDelegate();
|
||||
if (delegate != this && delegate instanceof SubscriptionNameProvider) {
|
||||
|
||||
@@ -69,7 +69,6 @@ public class MessageListenerAdapter102 extends MessageListenerAdapter {
|
||||
* @see #setMessageConverter
|
||||
* @see org.springframework.jms.support.converter.SimpleMessageConverter102
|
||||
*/
|
||||
@Override
|
||||
protected void initDefaultStrategies() {
|
||||
setMessageConverter(new SimpleMessageConverter102());
|
||||
}
|
||||
@@ -79,7 +78,6 @@ public class MessageListenerAdapter102 extends MessageListenerAdapter {
|
||||
* <p>Uses the JMS pub-sub API if the given destination is a topic,
|
||||
* else uses the JMS queue API.
|
||||
*/
|
||||
@Override
|
||||
protected void sendResponse(Session session, Destination destination, Message response) throws JMSException {
|
||||
MessageProducer producer = null;
|
||||
try {
|
||||
|
||||
@@ -72,7 +72,6 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa
|
||||
* "ActiveMQActivationSpec" in the same package, or a class named
|
||||
* "ActivationSpecImpl" in the same package as the ResourceAdapter class.
|
||||
*/
|
||||
@Override
|
||||
protected Class determineActivationSpecClass(ResourceAdapter adapter) {
|
||||
String adapterClassName = adapter.getClass().getName();
|
||||
|
||||
@@ -132,7 +131,6 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa
|
||||
* "maxMessagesPerSessions"/"maxMessages", respectively
|
||||
* (following ActiveMQ's and JORAM's naming conventions).
|
||||
*/
|
||||
@Override
|
||||
protected void populateActivationSpecProperties(BeanWrapper bw, JmsActivationSpecConfig config) {
|
||||
super.populateActivationSpecProperties(bw, config);
|
||||
if (config.getMaxConcurrency() > 0) {
|
||||
@@ -170,7 +168,6 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa
|
||||
* ActivationSpec property named "useRAManagedTransaction", if available
|
||||
* (following ActiveMQ's naming conventions).
|
||||
*/
|
||||
@Override
|
||||
protected void applyAcknowledgeMode(BeanWrapper bw, int ackMode) {
|
||||
if (ackMode == Session.SESSION_TRANSACTED && bw.isWritableProperty("useRAManagedTransaction")) {
|
||||
// ActiveMQ
|
||||
|
||||
@@ -59,7 +59,6 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory {
|
||||
/**
|
||||
* Creates a concrete JMS message endpoint, internal to this factory.
|
||||
*/
|
||||
@Override
|
||||
protected AbstractMessageEndpoint createEndpointInternal() throws UnavailableException {
|
||||
return new JmsMessageEndpoint();
|
||||
}
|
||||
@@ -70,7 +69,6 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory {
|
||||
*/
|
||||
private class JmsMessageEndpoint extends AbstractMessageEndpoint implements MessageListener {
|
||||
|
||||
@Override
|
||||
public void onMessage(Message message) {
|
||||
boolean applyDeliveryCalls = !hasBeforeDeliveryBeenCalled();
|
||||
if (applyDeliveryCalls) {
|
||||
@@ -104,7 +102,6 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClassLoader getEndpointClassLoader() {
|
||||
return messageListener.getClass().getClassLoader();
|
||||
}
|
||||
|
||||
@@ -128,7 +128,6 @@ public class JmsMessageEndpointManager extends GenericMessageEndpointManager {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws ResourceException {
|
||||
if (this.messageListenerSet) {
|
||||
setMessageEndpointFactory(this.endpointFactory);
|
||||
|
||||
@@ -91,7 +91,6 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ActivationSpec createActivationSpec(ResourceAdapter adapter, JmsActivationSpecConfig config) {
|
||||
Class activationSpecClassToUse = this.activationSpecClass;
|
||||
if (activationSpecClassToUse == null) {
|
||||
|
||||
@@ -180,7 +180,6 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
if (getConnectionFactory() == null) {
|
||||
throw new IllegalArgumentException("Property 'connectionFactory' is required");
|
||||
@@ -191,7 +190,6 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
|
||||
if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
|
||||
return "JMS invoker proxy for queue [" + this.queue + "]";
|
||||
|
||||
@@ -64,12 +64,10 @@ public class JmsInvokerProxyFactoryBean extends JmsInvokerClientInterceptor
|
||||
this.serviceInterface = serviceInterface;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBeanClassLoader(ClassLoader classLoader) {
|
||||
this.beanClassLoader = classLoader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
super.afterPropertiesSet();
|
||||
if (this.serviceInterface == null) {
|
||||
@@ -79,17 +77,14 @@ public class JmsInvokerProxyFactoryBean extends JmsInvokerClientInterceptor
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getObject() {
|
||||
return this.serviceProxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
return this.serviceInterface;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSingleton() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -89,13 +89,11 @@ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter
|
||||
this.ignoreInvalidRequests = ignoreInvalidRequests;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
this.proxy = getProxyForService();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onMessage(Message requestMessage, Session session) throws JMSException {
|
||||
RemoteInvocation invocation = readRemoteInvocation(requestMessage);
|
||||
if (invocation != null) {
|
||||
|
||||
@@ -147,7 +147,6 @@ public abstract class JmsAccessor implements InitializingBean {
|
||||
return this.sessionAcknowledgeMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
if (getConnectionFactory() == null) {
|
||||
throw new IllegalArgumentException("Property 'connectionFactory' is required");
|
||||
|
||||
@@ -146,7 +146,6 @@ public class MappingJacksonMessageConverter implements MessageConverter {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
|
||||
Message message;
|
||||
try {
|
||||
@@ -168,7 +167,6 @@ public class MappingJacksonMessageConverter implements MessageConverter {
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
|
||||
try {
|
||||
JavaType targetJavaType = getJavaTypeForMessage(message);
|
||||
|
||||
@@ -132,7 +132,6 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
|
||||
this.targetType = targetType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(this.marshaller, "Property 'marshaller' is required");
|
||||
Assert.notNull(this.unmarshaller, "Property 'unmarshaller' is required");
|
||||
@@ -146,7 +145,6 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
|
||||
* @see #marshalToTextMessage
|
||||
* @see #marshalToBytesMessage
|
||||
*/
|
||||
@Override
|
||||
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
|
||||
try {
|
||||
switch (this.targetType) {
|
||||
@@ -171,7 +169,6 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
|
||||
* @see #unmarshalFromTextMessage
|
||||
* @see #unmarshalFromBytesMessage
|
||||
*/
|
||||
@Override
|
||||
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
|
||||
try {
|
||||
if (message instanceof TextMessage) {
|
||||
|
||||
@@ -56,7 +56,6 @@ public class SimpleMessageConverter implements MessageConverter {
|
||||
* @see #createMessageForMap
|
||||
* @see #createMessageForSerializable
|
||||
*/
|
||||
@Override
|
||||
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
|
||||
if (object instanceof Message) {
|
||||
return (Message) object;
|
||||
@@ -90,7 +89,6 @@ public class SimpleMessageConverter implements MessageConverter {
|
||||
* @see #extractMapFromMessage
|
||||
* @see #extractSerializableFromMessage
|
||||
*/
|
||||
@Override
|
||||
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
|
||||
if (message instanceof TextMessage) {
|
||||
return extractStringFromMessage((TextMessage) message);
|
||||
|
||||
@@ -50,7 +50,6 @@ public class SimpleMessageConverter102 extends SimpleMessageConverter {
|
||||
* JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.
|
||||
* @see javax.jms.BytesMessage#getBodyLength()
|
||||
*/
|
||||
@Override
|
||||
protected byte[] extractByteArrayFromMessage(BytesMessage message) throws JMSException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream(BUFFER_SIZE);
|
||||
byte[] buffer = new byte[BUFFER_SIZE];
|
||||
|
||||
@@ -63,13 +63,11 @@ public class BeanFactoryDestinationResolver implements DestinationResolver, Bean
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setBeanFactory(BeanFactory beanFactory) {
|
||||
this.beanFactory = beanFactory;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
|
||||
throws JMSException {
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ public class DynamicDestinationResolver implements DestinationResolver {
|
||||
* @see #resolveTopic(javax.jms.Session, String)
|
||||
* @see #resolveQueue(javax.jms.Session, String)
|
||||
*/
|
||||
@Override
|
||||
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
|
||||
throws JMSException {
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ public class JndiDestinationResolver extends JndiLocatorSupport implements Cachi
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
|
||||
throws JMSException {
|
||||
|
||||
@@ -151,12 +150,10 @@ public class JndiDestinationResolver extends JndiLocatorSupport implements Cachi
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void removeFromCache(String destinationName) {
|
||||
this.destinationCache.remove(destinationName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearCache() {
|
||||
this.destinationCache.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user