You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/01/11 19:22:32 UTC
[1/2] activemq-artemis git commit: This closes #307
Repository: activemq-artemis
Updated Branches:
refs/heads/master 3a5234ee2 -> c4837c2c3
This closes #307
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/c4837c2c
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/c4837c2c
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/c4837c2c
Branch: refs/heads/master
Commit: c4837c2c38fa7dae83f7b40a961595b620e663bb
Parents: 3a5234e f85e5e7
Author: Clebert Suconic <cl...@apache.org>
Authored: Mon Jan 11 13:22:18 2016 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Jan 11 13:22:18 2016 -0500
----------------------------------------------------------------------
.../impl/CompressedLargeMessageControllerImpl.java | 1 +
.../core/remoting/impl/netty/NettyConnector.java | 4 ++--
.../protocol/proton/converter/ActiveMQJMSVendor.java | 1 +
.../activemq/artemis/rest/queue/push/UriStrategy.java | 13 ++++++-------
.../core/remoting/server/impl/RemotingServiceImpl.java | 1 +
.../artemis/core/server/ActiveMQServerLogger.java | 1 +
.../server/protocol/stomp/WebSocketServerHandler.java | 2 +-
.../activemq/broker/region/DestinationGCTest.java | 2 +-
.../java/org/apache/activemq/bugs/AMQ3157Test.java | 2 +-
.../java/org/apache/activemq/bugs/AMQ3324Test.java | 2 +-
.../usecases/RequestReplyNoAdvisoryNetworkTest.java | 2 +-
11 files changed, 17 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
[2/2] activemq-artemis git commit: Deprecation fixes
Posted by cl...@apache.org.
Deprecation fixes
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f85e5e79
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f85e5e79
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f85e5e79
Branch: refs/heads/master
Commit: f85e5e79229e3fc06288f2172265aed20ac2fa2c
Parents: 3a5234e
Author: Ville Skyttä <vi...@iki.fi>
Authored: Sat Jan 9 23:43:39 2016 +0200
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Jan 11 13:22:18 2016 -0500
----------------------------------------------------------------------
.../impl/CompressedLargeMessageControllerImpl.java | 1 +
.../core/remoting/impl/netty/NettyConnector.java | 4 ++--
.../protocol/proton/converter/ActiveMQJMSVendor.java | 1 +
.../activemq/artemis/rest/queue/push/UriStrategy.java | 13 ++++++-------
.../core/remoting/server/impl/RemotingServiceImpl.java | 1 +
.../artemis/core/server/ActiveMQServerLogger.java | 1 +
.../server/protocol/stomp/WebSocketServerHandler.java | 2 +-
.../activemq/broker/region/DestinationGCTest.java | 2 +-
.../java/org/apache/activemq/bugs/AMQ3157Test.java | 2 +-
.../java/org/apache/activemq/bugs/AMQ3324Test.java | 2 +-
.../usecases/RequestReplyNoAdvisoryNetworkTest.java | 2 +-
11 files changed, 17 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java
index 0cb38f6..e7cc173 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java
@@ -466,6 +466,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
/** from {@link java.io.DataInput} interface */
@Override
+ @SuppressWarnings("deprecation")
public String readLine() throws IOException {
return getStream().readLine();
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
index 97c0fef..55435f5 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
@@ -62,7 +62,6 @@ import io.netty.channel.group.DefaultChannelGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.base64.Base64;
-import io.netty.handler.codec.http.ClientCookieEncoder;
import io.netty.handler.codec.http.Cookie;
import io.netty.handler.codec.http.CookieDecoder;
import io.netty.handler.codec.http.DefaultFullHttpRequest;
@@ -80,6 +79,7 @@ import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.HttpResponseDecoder;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.HttpVersion;
+import io.netty.handler.codec.http.cookie.ClientCookieEncoder;
import io.netty.handler.ssl.SslHandler;
import io.netty.util.AttributeKey;
import io.netty.util.ResourceLeakDetector;
@@ -825,7 +825,7 @@ public class NettyConnector extends AbstractConnector {
Set<Cookie> cookieMap = CookieDecoder.decode(response.headers().get(HttpHeaders.Names.SET_COOKIE));
for (Cookie cookie : cookieMap) {
if (cookie.getName().equals("JSESSIONID")) {
- this.cookie = ClientCookieEncoder.encode(cookie);
+ this.cookie = ClientCookieEncoder.LAX.encode(cookie);
}
}
active = true;
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java
index 8e7502b..7d8e685 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/ActiveMQJMSVendor.java
@@ -78,6 +78,7 @@ public class ActiveMQJMSVendor extends JMSVendor {
}
@Override
+ @SuppressWarnings("deprecation")
public Destination createDestination(String name) {
return super.createDestination(name);
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
----------------------------------------------------------------------
diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
index f04c1bb..5bca167 100644
--- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
+++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
@@ -33,13 +33,13 @@ import org.apache.http.auth.Credentials;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.HttpClient;
-import org.apache.http.client.protocol.ClientContext;
+import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.protocol.BasicHttpContext;
-import org.apache.http.protocol.ExecutionContext;
import org.apache.http.protocol.HttpContext;
+import org.apache.http.protocol.HttpCoreContext;
import org.apache.activemq.artemis.api.core.client.ClientMessage;
import org.apache.activemq.artemis.rest.ActiveMQRestLogger;
import org.apache.activemq.artemis.rest.queue.push.xml.XmlHttpHeader;
@@ -199,20 +199,19 @@ public class UriStrategy implements PushStrategy {
@Override
public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
- AuthState authState = (AuthState) context.getAttribute(ClientContext.TARGET_AUTH_STATE);
+ AuthState authState = (AuthState) context.getAttribute(HttpClientContext.TARGET_AUTH_STATE);
// If no auth scheme available yet, try to initialize it preemptively
if (authState.getAuthScheme() == null) {
AuthScheme authScheme = (AuthScheme) context.getAttribute("preemptive-auth");
- CredentialsProvider credsProvider = (CredentialsProvider) context.getAttribute(ClientContext.CREDS_PROVIDER);
- HttpHost targetHost = (HttpHost) context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
+ CredentialsProvider credsProvider = (CredentialsProvider) context.getAttribute(HttpClientContext.CREDS_PROVIDER);
+ HttpHost targetHost = (HttpHost) context.getAttribute(HttpCoreContext.HTTP_TARGET_HOST);
if (authScheme != null) {
Credentials creds = credsProvider.getCredentials(new AuthScope(targetHost.getHostName(), targetHost.getPort()));
if (creds == null) {
throw new HttpException("No credentials for preemptive authentication");
}
- authState.setAuthScheme(authScheme);
- authState.setCredentials(creds);
+ authState.update(authScheme, creds);
}
}
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
index f56fb46..4b83657 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
@@ -212,6 +212,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle
Map<String, ProtocolManager> supportedProtocols = new ConcurrentHashMap();
+ @SuppressWarnings("deprecation")
String protocol = ConfigurationHelper.getStringProperty(TransportConstants.PROTOCOL_PROP_NAME, null, info.getParams());
if (protocol != null) {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index 91d2ce8..5b7c39a 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -1005,6 +1005,7 @@ public interface ActiveMQServerLogger extends BasicLogger {
format = Message.Format.MESSAGE_FORMAT)
void groupingQueueRemoved(int size, SimpleString clusterName);
+ @SuppressWarnings("deprecation")
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222168, value = "The ''" + TransportConstants.PROTOCOL_PROP_NAME + "'' property is deprecated. If you want this Acceptor to support multiple protocols, use the ''" + TransportConstants.PROTOCOLS_PROP_NAME + "'' property, e.g. with value ''CORE,AMQP,STOMP''",
format = Message.Format.MESSAGE_FORMAT)
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/stomp/WebSocketServerHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/stomp/WebSocketServerHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/stomp/WebSocketServerHandler.java
index 20ae341..e276047 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/stomp/WebSocketServerHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/stomp/WebSocketServerHandler.java
@@ -79,7 +79,7 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler<Object>
this.httpRequest = req;
this.handshaker = wsFactory.newHandshaker(req);
if (this.handshaker == null) {
- WebSocketServerHandshakerFactory.sendUnsupportedWebSocketVersionResponse(ctx.channel());
+ WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse(ctx.channel());
}
else {
ChannelFuture handshake = this.handshaker.handshake(ctx.channel(), req);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java
index cc957ae..27375e5 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/DestinationGCTest.java
@@ -47,7 +47,7 @@ public class DestinationGCTest extends EmbeddedBrokerTestSupport {
broker.setMaxPurgedDestinationsPerSweep(1);
PolicyEntry entry = new PolicyEntry();
entry.setGcInactiveDestinations(true);
- entry.setInactiveTimoutBeforeGC(3000);
+ entry.setInactiveTimeoutBeforeGC(3000);
PolicyMap map = new PolicyMap();
map.setDefaultEntry(entry);
broker.setDestinationPolicy(map);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3157Test.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3157Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3157Test.java
index d0dcafd..34b1909 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3157Test.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3157Test.java
@@ -120,7 +120,7 @@ public class AMQ3157Test extends EmbeddedBrokerTestSupport {
PolicyEntry entry = new PolicyEntry();
entry.setGcInactiveDestinations(true);
- entry.setInactiveTimoutBeforeGC(5000);
+ entry.setInactiveTimeoutBeforeGC(5000);
entry.setProducerFlowControl(true);
PolicyMap map = new PolicyMap();
map.setDefaultEntry(entry);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3324Test.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3324Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3324Test.java
index 40761f4..a90521b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3324Test.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3324Test.java
@@ -127,7 +127,7 @@ public class AMQ3324Test {
PolicyEntry entry = new PolicyEntry();
entry.setGcInactiveDestinations(true);
- entry.setInactiveTimoutBeforeGC(2000);
+ entry.setInactiveTimeoutBeforeGC(2000);
entry.setProducerFlowControl(true);
entry.setAdvisoryForConsumed(true);
entry.setAdvisoryForFastProducers(true);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f85e5e79/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/RequestReplyNoAdvisoryNetworkTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/RequestReplyNoAdvisoryNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/RequestReplyNoAdvisoryNetworkTest.java
index 54781ee..0823a58 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/RequestReplyNoAdvisoryNetworkTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/RequestReplyNoAdvisoryNetworkTest.java
@@ -267,7 +267,7 @@ public class RequestReplyNoAdvisoryNetworkTest extends JmsMultipleBrokersTestSup
tempReplyQPolicy.setOptimizedDispatch(true);
tempReplyQPolicy.setGcInactiveDestinations(true);
tempReplyQPolicy.setGcWithNetworkConsumers(true);
- tempReplyQPolicy.setInactiveTimoutBeforeGC(1000);
+ tempReplyQPolicy.setInactiveTimeoutBeforeGC(1000);
map.put(replyQWildcard, tempReplyQPolicy);
broker.setDestinationPolicy(map);