activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: [ARTEMIS-1450] Support InitialMessagePacketSize on JMS ConnectionFactoryConfiguration
Date Fri, 06 Oct 2017 22:39:48 GMT
[ARTEMIS-1450] Support InitialMessagePacketSize on JMS ConnectionFactoryConfiguration

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1450


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/5401ec38
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/5401ec38
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/5401ec38

Branch: refs/heads/master
Commit: 5401ec383fcf847e499d1244e3ae5d16a775caf0
Parents: f364dd0
Author: Jeff Mesnil <jmesnil@gmail.com>
Authored: Thu Oct 5 15:56:09 2017 +0200
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Fri Oct 6 18:39:27 2017 -0400

----------------------------------------------------------------------
 .../server/config/ConnectionFactoryConfiguration.java |  4 ++++
 .../impl/ConnectionFactoryConfigurationImpl.java      | 14 ++++++++++++++
 .../artemis/jms/server/impl/JMSServerManagerImpl.java |  2 ++
 .../ConnectionFactorySerializationTest.java           |  3 ++-
 4 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5401ec38/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/ConnectionFactoryConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/ConnectionFactoryConfiguration.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/ConnectionFactoryConfiguration.java
index 538dbe5..51fa0f3 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/ConnectionFactoryConfiguration.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/ConnectionFactoryConfiguration.java
@@ -185,4 +185,8 @@ public interface ConnectionFactoryConfiguration extends EncodingSupport
{
    String getDeserializationWhiteList();
 
    void setDeserializationWhiteList(String whiteList);
+
+   int getInitialMessagePacketSize();
+
+   ConnectionFactoryConfiguration setInitialMessagePacketSize(int size);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5401ec38/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
index f456233..4faf13d 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java
@@ -122,6 +122,8 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf
 
    private String deserializationWhiteList;
 
+   private int initialMessagePacketSize = ActiveMQClient.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE;
+
    // Static --------------------------------------------------------
 
    // Constructors --------------------------------------------------
@@ -881,6 +883,18 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf
       return protocolManagerFactoryStr;
    }
 
+   @Override
+   public int getInitialMessagePacketSize() {
+      return initialMessagePacketSize;
+   }
+
+   @Override
+   public ConnectionFactoryConfiguration setInitialMessagePacketSize(int size) {
+      this.initialMessagePacketSize = size;
+      return this;
+   }
+
+
    // Public --------------------------------------------------------
 
    // Package protected ---------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5401ec38/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 7cbee52..8d269ed 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -1209,6 +1209,8 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
       cf.setProtocolManagerFactoryStr(cfConfig.getProtocolManagerFactoryStr());
       cf.setDeserializationBlackList(cfConfig.getDeserializationBlackList());
       cf.setDeserializationWhiteList(cfConfig.getDeserializationWhiteList());
+      cf.setInitialMessagePacketSize(cfConfig.getInitialMessagePacketSize());
+
       return cf;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5401ec38/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
index 931ae07..7366bd9 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
@@ -225,7 +225,8 @@ public class ConnectionFactorySerializationTest extends JMSTestBase {
       ArrayList<String> connectorNames = new ArrayList<>();
       connectorNames.add(main.getName());
       connectorNames.add(main2.getName());
-      ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl().setName("MyConnectionFactory").setHA(b).setConnectorNames(connectorNames).setClientID("clientID").setClientFailureCheckPeriod(-1).setConnectionTTL(-2).setFactoryType(JMSFactoryType.CF).setCallTimeout(-3).setCallFailoverTimeout(-4).setCacheLargeMessagesClient(b).setMinLargeMessageSize(-5).setConsumerWindowSize(-6).setConsumerMaxRate(-7).setConfirmationWindowSize(-8).setProducerWindowSize(-9).setProducerMaxRate(-10).setBlockOnAcknowledge(b).setBlockOnDurableSend(b).setBlockOnNonDurableSend(b).setAutoGroup(b).setPreAcknowledge(b).setLoadBalancingPolicyClassName("foobar").setTransactionBatchSize(-11).setDupsOKBatchSize(-12).setUseGlobalPools(b).setScheduledThreadPoolMaxSize(-13).setThreadPoolMaxSize(-14).setRetryInterval(-15).setRetryIntervalMultiplier(-16).setMaxRetryInterval(-17).setReconnectAttempts(-18).setFailoverOnInitialConnection(b).setGroupID("groupID");
+      ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl().setName("MyConnectionFactory").setHA(b).setConnectorNames(connectorNames).setClientID("clientID").setClientFailureCheckPeriod(-1).setConnectionTTL(-2).setFactoryType(JMSFactoryType.CF).setCallTimeout(-3).setCallFailoverTimeout(-4).setCacheLargeMessagesClient(b).setMinLargeMessageSize(-5).setConsumerWindowSize(-6).setConsumerMaxRate(-7).setConfirmationWindowSize(-8).setProducerWindowSize(-9).setProducerMaxRate(-10).setBlockOnAcknowledge(b).setBlockOnDurableSend(b).setBlockOnNonDurableSend(b).setAutoGroup(b).setPreAcknowledge(b).setLoadBalancingPolicyClassName("foobar").setTransactionBatchSize(-11).setDupsOKBatchSize(-12).setUseGlobalPools(b).setScheduledThreadPoolMaxSize(-13).setThreadPoolMaxSize(-14).setRetryInterval(-15).setRetryIntervalMultiplier(-16).setMaxRetryInterval(-17).setReconnectAttempts(-18).setFailoverOnInitialConnection(b).setGroupID("groupID")
+              .setInitialMessagePacketSize(1499);
 
       jmsServer.createConnectionFactory(false, configuration, "/MyConnectionFactory");
    }


Mime
View raw message