Skip to content

Commit ad9c22a

Browse files
author
Steve Powell
committed
Merge in default.
2 parents ed84f97 + fc706eb commit ad9c22a

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

src/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,34 @@
4545
public class ConnectionFactory implements Cloneable {
4646

4747
/** Default Executor threads */
48-
private static final int DEFAULT_NUM_CONSUMER_THREADS = 5;
48+
public static final int DEFAULT_NUM_CONSUMER_THREADS = 5;
4949
/** Default user name */
50-
private static final String DEFAULT_USER = "guest";
50+
public static final String DEFAULT_USER = "guest";
5151
/** Default password */
52-
private static final String DEFAULT_PASS = "guest";
52+
public static final String DEFAULT_PASS = "guest";
5353
/** Default virtual host */
54-
private static final String DEFAULT_VHOST = "/";
54+
public static final String DEFAULT_VHOST = "/";
5555
/** Default maximum channel number;
5656
* zero for unlimited */
57-
private static final int DEFAULT_CHANNEL_MAX = 0;
57+
public static final int DEFAULT_CHANNEL_MAX = 0;
5858
/** Default maximum frame size;
5959
* zero means no limit */
60-
private static final int DEFAULT_FRAME_MAX = 0;
60+
public static final int DEFAULT_FRAME_MAX = 0;
6161
/** Default heart-beat interval;
6262
* zero means no heart-beats */
63-
private static final int DEFAULT_HEARTBEAT = 0;
63+
public static final int DEFAULT_HEARTBEAT = 0;
6464
/** The default host */
65-
private static final String DEFAULT_HOST = "localhost";
65+
public static final String DEFAULT_HOST = "localhost";
6666
/** 'Use the default port' port */
67-
private static final int USE_DEFAULT_PORT = -1;
67+
public static final int USE_DEFAULT_PORT = -1;
6868
/** The default non-ssl port */
69-
private static final int DEFAULT_AMQP_PORT = AMQP.PROTOCOL.PORT;
69+
public static final int DEFAULT_AMQP_PORT = AMQP.PROTOCOL.PORT;
7070
/** The default ssl port */
71-
private static final int DEFAULT_AMQP_OVER_SSL_PORT = 5671;
71+
public static final int DEFAULT_AMQP_OVER_SSL_PORT = 5671;
7272
/** The default connection timeout;
7373
* zero means wait indefinitely */
74-
private static final int DEFAULT_CONNECTION_TIMEOUT = 0;
74+
public static final int DEFAULT_CONNECTION_TIMEOUT = 0;
75+
7576
/** The default SSL protocol */
7677
private static final String DEFAULT_SSL_PROTOCOL = "SSLv3";
7778

src/com/rabbitmq/client/impl/AMQChannel.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,17 @@ public void handleCompleteInboundCommand(AMQCommand command) throws IOException
153153
public void enqueueRpc(RpcContinuation k)
154154
{
155155
synchronized (_channelMutex) {
156+
boolean waitClearedInterruptStatus = false;
156157
while (_activeRpc != null) {
157158
try {
158159
_channelMutex.wait();
159160
} catch (InterruptedException e) {
160-
Thread.currentThread().interrupt();
161+
waitClearedInterruptStatus = true;
161162
}
162163
}
164+
if (waitClearedInterruptStatus) {
165+
Thread.currentThread().interrupt();
166+
}
163167
_activeRpc = k;
164168
}
165169
}

test/src/com/rabbitmq/client/test/BrokenFramesTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ public void testNoMethod() throws Exception {
6565
frames.add(new Frame(AMQP.FRAME_HEADER, 0));
6666
myFrameHandler.setFrames(frames.iterator());
6767

68-
AMQConnection conn = new AMQConnection(factory.getUsername(),
69-
factory.getPassword(),
70-
myFrameHandler,
71-
Executors.newFixedThreadPool(1),
72-
factory.getVirtualHost(),
73-
factory.getClientProperties(),
74-
factory.getRequestedFrameMax(),
75-
factory.getRequestedChannelMax(),
76-
factory.getRequestedHeartbeat(),
77-
factory.getSaslConfig());
7868
try {
79-
conn.start();
69+
new AMQConnection(factory.getUsername(),
70+
factory.getPassword(),
71+
myFrameHandler,
72+
Executors.newFixedThreadPool(1),
73+
factory.getVirtualHost(),
74+
factory.getClientProperties(),
75+
factory.getRequestedFrameMax(),
76+
factory.getRequestedChannelMax(),
77+
factory.getRequestedHeartbeat(),
78+
factory.getSaslConfig())
79+
.start();
8080
} catch (IOException e) {
8181
UnexpectedFrameError unexpectedFrameError = findUnexpectedFrameError(e);
8282
assertNotNull(unexpectedFrameError);

0 commit comments

Comments
 (0)