Adding browser support.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1403690 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2012-10-30 13:31:15 +00:00
parent 3b0b1fa7da
commit 8835535a94
2 changed files with 10 additions and 6 deletions

View File

@ -57,6 +57,7 @@ class AmqpProtocolConverter {
private static final Logger LOG = LoggerFactory.getLogger(AmqpProtocolConverter.class);
static final public byte[] EMPTY_BYTE_ARRAY = new byte[]{};
private final AmqpTransport amqpTransport;
private static final Symbol COPY = Symbol.getSymbol("copy");
public AmqpProtocolConverter(AmqpTransport amqpTransport, BrokerContext brokerContext) {
this.amqpTransport = amqpTransport;
@ -883,7 +884,10 @@ class AmqpProtocolConverter {
consumerInfo.setDestination(dest);
consumerInfo.setPrefetchSize(100);
consumerInfo.setDispatchAsync(true);
Map filter = ((org.apache.qpid.proton.type.messaging.Source)remoteSource).getFilter();
if( source.getDistributionMode() == COPY) {
consumerInfo.setBrowser(true);
}
Map filter = ((org.apache.qpid.proton.type.messaging.Source)source).getFilter();
if (filter != null) {
DescribedType type = (DescribedType)filter.get(Symbol.valueOf("jms-selector"));
consumerInfo.setSelector(type.getDescribed().toString());

View File

@ -47,6 +47,7 @@ public class JoramJmsTest extends TestCase {
TestSuite suite = new TestSuite();
// Passing tests
suite.addTestSuite(TemporaryQueueTest.class);
suite.addTestSuite(ConnectionTest.class);
suite.addTestSuite(SessionTest.class);
suite.addTestSuite(JMSXPropertyTest.class);
@ -57,21 +58,20 @@ public class JoramJmsTest extends TestCase {
if (false ) {
// TODO: Fails due to temp destinations not being supported yet.
suite.addTestSuite(MessageHeaderTest.class);
suite.addTestSuite(TemporaryQueueTest.class);
suite.addTestSuite(TemporaryTopicTest.class);
// TODO: Fails due to selectors not being implemented yet.
suite.addTestSuite(SelectorSyntaxTest.class);
suite.addTestSuite(SelectorTest.class);
suite.addTestSuite(QueueSessionTest.class);
// TODO: Browsers not yet supported.
// TODO: Fails due to https://issues.apache.org/jira/browse/PROTON-110 and DestinationImpl vs QueueImpl mapping issues
suite.addTestSuite(MessageHeaderTest.class);
// TODO: Fails due to JMS client setup browser before getEnumeration() gets called.
suite.addTestSuite(QueueBrowserTest.class);
// TODO: Fails due to JMS client impl error.
suite.addTestSuite(UnifiedSessionTest.class);
// TODO: Fails due to inconsistent ObjectMessage mapping in the JMS client.
suite.addTestSuite(MessageTypeTest.class);
// TODO: Fails due to: javax.jms.IllegalStateException: Cannot set client-id to "publisherConnection"; client-id must be set on connection creation
suite.addTestSuite(TemporaryTopicTest.class);
suite.addTestSuite(TopicConnectionTest.class);
suite.addTestSuite(TopicSessionTest.class);