Upgrade to JMS 2.0 and JCA 1.7
Issue: SPR-13793
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -18,6 +18,7 @@ package org.springframework.jms;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.JMSContext;
|
||||
import javax.jms.JMSException;
|
||||
|
||||
/**
|
||||
@@ -37,4 +38,24 @@ public class StubConnectionFactory implements ConnectionFactory {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JMSContext createContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JMSContext createContext(String userName, String password) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JMSContext createContext(String userName, String password, int sessionMode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JMSContext createContext(int sessionMode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ public class StubTextMessage implements TextMessage {
|
||||
|
||||
private String type;
|
||||
|
||||
private long deliveryTime;
|
||||
|
||||
private long timestamp = 0L;
|
||||
|
||||
private long expiration = 0L;
|
||||
@@ -152,6 +154,11 @@ public class StubTextMessage implements TextMessage {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getJMSDeliveryTime() throws JMSException {
|
||||
return this.deliveryTime;
|
||||
}
|
||||
|
||||
public long getLongProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Long) ? ((Long) value).longValue() : 0;
|
||||
@@ -243,6 +250,11 @@ public class StubTextMessage implements TextMessage {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSDeliveryTime(long deliveryTime) throws JMSException {
|
||||
this.deliveryTime = deliveryTime;
|
||||
}
|
||||
|
||||
public void setLongProperty(String name, long value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
@@ -259,5 +271,14 @@ public class StubTextMessage implements TextMessage {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public <T> T getBody(Class<T> c) throws JMSException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBodyAssignableTo(Class c) throws JMSException {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -43,6 +43,16 @@ public class TestConnection implements Connection {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session createSession(int sessionMode) throws JMSException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Session createSession() throws JMSException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClientID() throws JMSException {
|
||||
return null;
|
||||
@@ -91,6 +101,16 @@ public class TestConnection implements Connection {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public int getStartCount() {
|
||||
return startCount;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -19,6 +19,7 @@ package org.springframework.jms.remoting;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Enumeration;
|
||||
import javax.jms.CompletionListener;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
@@ -214,6 +215,15 @@ public class JmsInvokerTests {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeliveryDelay(long deliveryDelay) throws JMSException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDeliveryDelay() throws JMSException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Destination getDestination() throws JMSException {
|
||||
return null;
|
||||
@@ -240,6 +250,22 @@ public class JmsInvokerTests {
|
||||
@Override
|
||||
public void send(Destination destination, Message message, int i, int i1, long l) throws JMSException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Message message, CompletionListener completionListener) throws JMSException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Destination destination, Message message, CompletionListener completionListener) throws JMSException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -363,6 +389,25 @@ public class JmsInvokerTests {
|
||||
public void setJMSPriority(int i) throws JMSException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getJMSDeliveryTime() throws JMSException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSDeliveryTime(long deliveryTime) throws JMSException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getBody(Class<T> c) throws JMSException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBodyAssignableTo(Class c) throws JMSException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearProperties() throws JMSException {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user