Skip to content

Commit 3ba1801

Browse files
author
Emile Joubert
committed
Merged bug24114 into default
2 parents e5d879e + 4a7f6a4 commit 3ba1801

File tree

226 files changed

+1458
-681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+1458
-681
lines changed

LICENSE-MPL-RabbitMQ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ EXHIBIT A -Mozilla Public License.
447447
The Original Code is RabbitMQ.
448448

449449
The Initial Developer of the Original Code is VMware, Inc.
450-
Copyright (c) 2007-2012 VMware, Inc. All rights reserved.''
450+
Copyright (c) 2007-2013 VMware, Inc. All rights reserved.''
451451

452452
[NOTE: The text of this Exhibit A may differ slightly from the text of
453453
the notices in the Source Code files of the Original Code. You should

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ clean:
2222
distclean: clean
2323
make -C $(AMQP_CODEGEN_DIR) clean
2424

25-
dist: distclean srcdist dist_all
25+
dist: distclean srcdist dist_all maven-bundle
2626

2727
dist_all: dist1.5 javadoc-archive
2828

29-
maven-bundle: distclean
29+
maven-bundle:
3030
ant -Dimpl.version=$(VERSION) maven-bundle
3131

3232
dist1.5:
@@ -64,7 +64,7 @@ srcdist: distclean
6464
(cd build; zip -q -r $(SRC_ARCHIVE).zip $(SRC_ARCHIVE))
6565
(cd build; rm -rf $(SRC_ARCHIVE))
6666

67-
stage-and-promote-maven-bundle: maven-bundle
67+
stage-and-promote-maven-bundle:
6868
( \
6969
cd build/bundle; \
7070
NEXUS_USERNAME=`cat $(GNUPG_PATH)/../nexus/username`; \

build.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
</fail>
309309
</target>
310310

311-
<target name="test-suite-run" depends="test-client, test-ssl, test-server, test-functional, test-main-silent"/>
311+
<target name="test-suite-run" depends="test-client, test-ssl, test-server, test-functional, test-functional-and-server-with-ha, test-main-silent"/>
312312

313313
<target name="test-client" depends="test-build" description="Run the client test suites.">
314314
<junit printSummary="withOutAndErr"
@@ -369,6 +369,19 @@
369369
</junit>
370370
</target>
371371

372+
<!-- TODO: merge test-server, test-functional and this into one, once umbrellas have been merged -->
373+
<target name="test-functional-and-server-with-ha" depends="detect-umbrella, test-build" if="UMBRELLA_AVAILABLE">
374+
<junit printSummary="withOutAndErr"
375+
haltOnFailure="${haltOnFailureJunit}"
376+
failureproperty="test.failure"
377+
fork="yes">
378+
<classpath refid="test.classpath"/>
379+
<formatter type="plain"/>
380+
<formatter type="xml"/>
381+
<test todir="${build.out}" name="com.rabbitmq.client.test.server.HATests"/>
382+
</junit>
383+
</target>
384+
372385
<target name="test-single" depends="test-build">
373386
<junit printSummary="withOutAndErr"
374387
haltOnFailure="${haltOnFailureJunit}"
@@ -491,4 +504,3 @@
491504
</bundlor:bundlor>
492505
</target>
493506
</project>
494-

codegen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
## The Original Code is RabbitMQ.
1212
##
1313
## The Initial Developer of the Original Code is VMware, Inc.
14-
## Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
## Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
##
1616

1717
from __future__ import nested_scopes
@@ -143,7 +143,7 @@ def printFileHeader():
143143
// The Original Code is RabbitMQ.
144144
//
145145
// The Initial Developer of the Original Code is VMware, Inc.
146-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
146+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
147147
//
148148
"""
149149

src/com/rabbitmq/client/Address.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/AlreadyClosedException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/BasicProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/Channel.java

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;
@@ -45,9 +45,17 @@
4545
* </ul>
4646
* <p>
4747
*
48-
* While a Channel can be used by multiple threads, it's important to ensure
49-
* that only one thread executes a command at once. Concurrent execution of
50-
* commands will likely cause an UnexpectedFrameError to be thrown.
48+
* <p>
49+
* {@link Channel} instances are safe for use by multiple
50+
* threads. Requests into a {@link Channel} are serialized, with only one
51+
* thread running commands at a time.
52+
* As such, applications may prefer using a {@link Channel} per thread
53+
* instead of sharing the same <code>Channel</code> across multiple threads.
54+
*
55+
* An <b>important caveat</b> to this is that confirms are <b>not</b> handled
56+
* properly when a {@link Channel} is shared between multiple threads. In that
57+
* scenario, it is therefore important to ensure that the {@link Channel}
58+
* instance is <b>not</b> accessed concurrently by multiple threads.
5159
*
5260
*/
5361

@@ -361,9 +369,9 @@ Exchange.DeclareOk exchangeDeclare(String exchange,
361369
* Bind an exchange to an exchange, with no extra arguments.
362370
* @see com.rabbitmq.client.AMQP.Exchange.Bind
363371
* @see com.rabbitmq.client.AMQP.Exchange.BindOk
364-
* @param destination: the name of the exchange to which messages flow across the binding
365-
* @param source: the name of the exchange from which messages flow across the binding
366-
* @param routingKey: the routine key to use for the binding
372+
* @param destination the name of the exchange to which messages flow across the binding
373+
* @param source the name of the exchange from which messages flow across the binding
374+
* @param routingKey the routine key to use for the binding
367375
* @return a binding-confirm method if the binding was successfully created
368376
* @throws java.io.IOException if an error is encountered
369377
*/
@@ -373,10 +381,10 @@ Exchange.DeclareOk exchangeDeclare(String exchange,
373381
* Bind an exchange to an exchange.
374382
* @see com.rabbitmq.client.AMQP.Exchange.Bind
375383
* @see com.rabbitmq.client.AMQP.Exchange.BindOk
376-
* @param destination: the name of the exchange to which messages flow across the binding
377-
* @param source: the name of the exchange from which messages flow across the binding
378-
* @param routingKey: the routine key to use for the binding
379-
* @param arguments: other properties (binding parameters)
384+
* @param destination the name of the exchange to which messages flow across the binding
385+
* @param source the name of the exchange from which messages flow across the binding
386+
* @param routingKey the routine key to use for the binding
387+
* @param arguments other properties (binding parameters)
380388
* @return a binding-confirm method if the binding was successfully created
381389
* @throws java.io.IOException if an error is encountered
382390
*/
@@ -386,9 +394,9 @@ Exchange.DeclareOk exchangeDeclare(String exchange,
386394
* Unbind an exchange from an exchange, with no extra arguments.
387395
* @see com.rabbitmq.client.AMQP.Exchange.Bind
388396
* @see com.rabbitmq.client.AMQP.Exchange.BindOk
389-
* @param destination: the name of the exchange to which messages flow across the binding
390-
* @param source: the name of the exchange from which messages flow across the binding
391-
* @param routingKey: the routine key to use for the binding
397+
* @param destination the name of the exchange to which messages flow across the binding
398+
* @param source the name of the exchange from which messages flow across the binding
399+
* @param routingKey the routine key to use for the binding
392400
* @return a binding-confirm method if the binding was successfully created
393401
* @throws java.io.IOException if an error is encountered
394402
*/
@@ -398,10 +406,10 @@ Exchange.DeclareOk exchangeDeclare(String exchange,
398406
* Unbind an exchange from an exchange.
399407
* @see com.rabbitmq.client.AMQP.Exchange.Bind
400408
* @see com.rabbitmq.client.AMQP.Exchange.BindOk
401-
* @param destination: the name of the exchange to which messages flow across the binding
402-
* @param source: the name of the exchange from which messages flow across the binding
403-
* @param routingKey: the routine key to use for the binding
404-
* @param arguments: other properties (binding parameters)
409+
* @param destination the name of the exchange to which messages flow across the binding
410+
* @param source the name of the exchange from which messages flow across the binding
411+
* @param routingKey the routine key to use for the binding
412+
* @param arguments other properties (binding parameters)
405413
* @return a binding-confirm method if the binding was successfully created
406414
* @throws java.io.IOException if an error is encountered
407415
*/
@@ -737,34 +745,40 @@ void basicNack(long deliveryTag, boolean multiple, boolean requeue)
737745
/**
738746
* Wait until all messages published since the last call have been
739747
* either ack'd or nack'd by the broker. Note, when called on a
740-
* non-Confirm channel, waitForConfirms returns true immediately.
748+
* non-Confirm channel, waitForConfirms throws an IllegalStateException.
741749
* @return whether all the messages were ack'd (and none were nack'd)
750+
* @throws java.lang.IllegalStateException
742751
*/
743752
boolean waitForConfirms() throws InterruptedException;
744753

745754
/**
746755
* Wait until all messages published since the last call have been
747756
* either ack'd or nack'd by the broker; or until timeout elapses.
748757
* If the timeout expires a TimeoutException is thrown. When
749-
* called on a non-Confirm channel, waitForConfirms returns true
750-
* immediately.
758+
* called on a non-Confirm channel, waitForConfirms throws an
759+
* IllegalStateException.
751760
* @return whether all the messages were ack'd (and none were nack'd)
761+
* @throws java.lang.IllegalStateException
752762
*/
753763
boolean waitForConfirms(long timeout) throws InterruptedException, TimeoutException;
754764

755765
/** Wait until all messages published since the last call have
756766
* been either ack'd or nack'd by the broker. If any of the
757767
* messages were nack'd, waitForConfirmsOrDie will throw an
758768
* IOException. When called on a non-Confirm channel, it will
759-
* return immediately. */
760-
void waitForConfirmsOrDie() throws IOException, InterruptedException;
769+
* throw an IllegalStateException.
770+
* @throws java.lang.IllegalStateException
771+
*/
772+
void waitForConfirmsOrDie() throws IOException, InterruptedException;
761773

762774
/** Wait until all messages published since the last call have
763775
* been either ack'd or nack'd by the broker; or until timeout elapses.
764776
* If the timeout expires a TimeoutException is thrown. If any of the
765777
* messages were nack'd, waitForConfirmsOrDie will throw an
766778
* IOException. When called on a non-Confirm channel, it will
767-
* return immediately. */
779+
* throw an IllegalStateException.
780+
* @throws java.lang.IllegalStateException
781+
*/
768782
void waitForConfirmsOrDie(long timeout) throws IOException, InterruptedException, TimeoutException;
769783

770784
/**

src/com/rabbitmq/client/Command.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/ConfirmListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/Connection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;
@@ -350,7 +350,7 @@ public void setClientProperties(Map<String, Object> clientProperties) {
350350

351351
/**
352352
* Gets the sasl config to use when authenticating
353-
* @return
353+
* @return the sasl config
354354
* @see com.rabbitmq.client.SaslConfig
355355
*/
356356
public SaslConfig getSaslConfig() {

src/com/rabbitmq/client/Consumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/ConsumerCancelledException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/ContentHeader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/DefaultConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/DefaultSaslConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/Envelope.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/FlowListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/GetResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/JDKSaslConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717
package com.rabbitmq.client;

src/com/rabbitmq/client/LongString.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/MalformedFrameException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

src/com/rabbitmq/client/MapRpcServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// The Original Code is RabbitMQ.
1212
//
1313
// The Initial Developer of the Original Code is VMware, Inc.
14-
// Copyright (c) 2007-2012 VMware, Inc. All rights reserved.
14+
// Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
1515
//
1616

1717

0 commit comments

Comments
 (0)