mirror of https://github.com/apache/activemq.git
Prepare for the move to Proton 0.8. Use the 1.0-SNAPSHOT builds to start testing against the changes coming in Proton 0.8
This commit is contained in:
parent
0b5231ada5
commit
644b96a68a
|
@ -58,7 +58,7 @@ import org.apache.activemq.selector.SelectorParser;
|
||||||
import org.apache.activemq.util.IOExceptionSupport;
|
import org.apache.activemq.util.IOExceptionSupport;
|
||||||
import org.apache.activemq.util.IdGenerator;
|
import org.apache.activemq.util.IdGenerator;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.qpid.proton.ProtonFactoryLoader;
|
import org.apache.qpid.proton.Proton;
|
||||||
import org.apache.qpid.proton.amqp.Binary;
|
import org.apache.qpid.proton.amqp.Binary;
|
||||||
import org.apache.qpid.proton.amqp.DescribedType;
|
import org.apache.qpid.proton.amqp.DescribedType;
|
||||||
import org.apache.qpid.proton.amqp.Symbol;
|
import org.apache.qpid.proton.amqp.Symbol;
|
||||||
|
@ -82,8 +82,8 @@ import org.apache.qpid.proton.engine.Collector;
|
||||||
import org.apache.qpid.proton.engine.Connection;
|
import org.apache.qpid.proton.engine.Connection;
|
||||||
import org.apache.qpid.proton.engine.Delivery;
|
import org.apache.qpid.proton.engine.Delivery;
|
||||||
import org.apache.qpid.proton.engine.EndpointState;
|
import org.apache.qpid.proton.engine.EndpointState;
|
||||||
import org.apache.qpid.proton.engine.EngineFactory;
|
|
||||||
import org.apache.qpid.proton.engine.Event;
|
import org.apache.qpid.proton.engine.Event;
|
||||||
|
import org.apache.qpid.proton.engine.Event.Type.*;
|
||||||
import org.apache.qpid.proton.engine.Link;
|
import org.apache.qpid.proton.engine.Link;
|
||||||
import org.apache.qpid.proton.engine.Receiver;
|
import org.apache.qpid.proton.engine.Receiver;
|
||||||
import org.apache.qpid.proton.engine.Sasl;
|
import org.apache.qpid.proton.engine.Sasl;
|
||||||
|
@ -91,7 +91,6 @@ import org.apache.qpid.proton.engine.Sender;
|
||||||
import org.apache.qpid.proton.engine.Session;
|
import org.apache.qpid.proton.engine.Session;
|
||||||
import org.apache.qpid.proton.engine.Transport;
|
import org.apache.qpid.proton.engine.Transport;
|
||||||
import org.apache.qpid.proton.engine.impl.CollectorImpl;
|
import org.apache.qpid.proton.engine.impl.CollectorImpl;
|
||||||
import org.apache.qpid.proton.engine.impl.EngineFactoryImpl;
|
|
||||||
import org.apache.qpid.proton.engine.impl.ProtocolTracer;
|
import org.apache.qpid.proton.engine.impl.ProtocolTracer;
|
||||||
import org.apache.qpid.proton.engine.impl.TransportImpl;
|
import org.apache.qpid.proton.engine.impl.TransportImpl;
|
||||||
import org.apache.qpid.proton.framing.TransportFrame;
|
import org.apache.qpid.proton.framing.TransportFrame;
|
||||||
|
@ -103,7 +102,6 @@ import org.apache.qpid.proton.jms.InboundTransformer;
|
||||||
import org.apache.qpid.proton.jms.JMSMappingInboundTransformer;
|
import org.apache.qpid.proton.jms.JMSMappingInboundTransformer;
|
||||||
import org.apache.qpid.proton.jms.OutboundTransformer;
|
import org.apache.qpid.proton.jms.OutboundTransformer;
|
||||||
import org.apache.qpid.proton.message.Message;
|
import org.apache.qpid.proton.message.Message;
|
||||||
import org.apache.qpid.proton.message.MessageFactory;
|
|
||||||
import org.fusesource.hawtbuf.Buffer;
|
import org.fusesource.hawtbuf.Buffer;
|
||||||
import org.fusesource.hawtbuf.ByteArrayOutputStream;
|
import org.fusesource.hawtbuf.ByteArrayOutputStream;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -120,13 +118,9 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
|
||||||
private static final Symbol NO_LOCAL = Symbol.valueOf("no-local");
|
private static final Symbol NO_LOCAL = Symbol.valueOf("no-local");
|
||||||
private static final Symbol DURABLE_SUBSCRIPTION_ENDED = Symbol.getSymbol("DURABLE_SUBSCRIPTION_ENDED");
|
private static final Symbol DURABLE_SUBSCRIPTION_ENDED = Symbol.getSymbol("DURABLE_SUBSCRIPTION_ENDED");
|
||||||
|
|
||||||
private static final ProtonFactoryLoader<MessageFactory> messageFactoryLoader = new ProtonFactoryLoader<MessageFactory>(MessageFactory.class);
|
|
||||||
|
|
||||||
protected int prefetch = 100;
|
protected int prefetch = 100;
|
||||||
protected EngineFactory engineFactory = new EngineFactoryImpl();
|
protected Transport protonTransport = Proton.transport();
|
||||||
protected Transport protonTransport = engineFactory.createTransport();
|
protected Connection protonConnection = Proton.connection();
|
||||||
protected Connection protonConnection = engineFactory.createConnection();
|
|
||||||
protected MessageFactory messageFactory = messageFactoryLoader.loadFactory();
|
|
||||||
protected Collector eventCollector = new CollectorImpl();
|
protected Collector eventCollector = new CollectorImpl();
|
||||||
|
|
||||||
public AmqpProtocolConverter(AmqpTransport transport) {
|
public AmqpProtocolConverter(AmqpTransport transport) {
|
||||||
|
@ -266,13 +260,16 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
|
||||||
Event event = null;
|
Event event = null;
|
||||||
while ((event = eventCollector.peek()) != null) {
|
while ((event = eventCollector.peek()) != null) {
|
||||||
switch (event.getType()) {
|
switch (event.getType()) {
|
||||||
case CONNECTION_REMOTE_STATE:
|
case CONNECTION_REMOTE_OPEN:
|
||||||
|
case CONNECTION_REMOTE_CLOSE:
|
||||||
processConnectionEvent(event.getConnection());
|
processConnectionEvent(event.getConnection());
|
||||||
break;
|
break;
|
||||||
case SESSION_REMOTE_STATE:
|
case SESSION_REMOTE_OPEN:
|
||||||
|
case SESSION_REMOTE_CLOSE:
|
||||||
processSessionEvent(event.getSession());
|
processSessionEvent(event.getSession());
|
||||||
break;
|
break;
|
||||||
case LINK_REMOTE_STATE:
|
case LINK_REMOTE_OPEN:
|
||||||
|
case LINK_REMOTE_CLOSE:
|
||||||
processLinkEvent(event.getLink());
|
processLinkEvent(event.getLink());
|
||||||
break;
|
break;
|
||||||
case LINK_FLOW:
|
case LINK_FLOW:
|
||||||
|
@ -697,7 +694,7 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
|
||||||
@Override
|
@Override
|
||||||
protected void onMessage(Receiver receiver, final Delivery delivery, Buffer buffer) throws Exception {
|
protected void onMessage(Receiver receiver, final Delivery delivery, Buffer buffer) throws Exception {
|
||||||
|
|
||||||
Message msg = messageFactory.createMessage();
|
Message msg = Proton.message();
|
||||||
int offset = buffer.offset;
|
int offset = buffer.offset;
|
||||||
int len = buffer.length;
|
int len = buffer.length;
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
|
|
|
@ -46,7 +46,6 @@ import org.junit.rules.TestName;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@Ignore("Until https://issues.apache.org/jira/browse/PROTON-588 and https://issues.apache.org/jira/browse/QPID-5792 are fixed")
|
|
||||||
public class JmsClientRequestResponseTest extends AmqpTestSupport implements MessageListener {
|
public class JmsClientRequestResponseTest extends AmqpTestSupport implements MessageListener {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(JmsClientRequestResponseTest.class);
|
private static final Logger LOG = LoggerFactory.getLogger(JmsClientRequestResponseTest.class);
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -100,7 +100,7 @@
|
||||||
<paho-version>0.4.0</paho-version>
|
<paho-version>0.4.0</paho-version>
|
||||||
<linkedin-zookeeper-version>1.4.0</linkedin-zookeeper-version>
|
<linkedin-zookeeper-version>1.4.0</linkedin-zookeeper-version>
|
||||||
<zookeeper-version>3.4.5</zookeeper-version>
|
<zookeeper-version>3.4.5</zookeeper-version>
|
||||||
<qpid-proton-version>0.7</qpid-proton-version>
|
<qpid-proton-version>1.0-SNAPSHOT</qpid-proton-version>
|
||||||
<qpid-jms-version>0.26</qpid-jms-version>
|
<qpid-jms-version>0.26</qpid-jms-version>
|
||||||
<regexp-version>1.3</regexp-version>
|
<regexp-version>1.3</regexp-version>
|
||||||
<rome-version>1.0</rome-version>
|
<rome-version>1.0</rome-version>
|
||||||
|
|
Loading…
Reference in New Issue