You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2010/01/18 23:53:16 UTC

svn commit: r900595 - in /qpid/trunk/qpid/java: client/src/main/java/org/apache/qpid/client/ client/src/main/java/org/apache/qpid/client/configuration/ common/src/main/java/org/apache/configuration/ systests/src/main/java/org/apache/qpid/server/exchang...

Author: rajith
Date: Mon Jan 18 22:53:15 2010
New Revision: 900595

URL: http://svn.apache.org/viewvc?rev=900595&view=rev
Log:
This is a first step towards QPID-2343
The common module also contains code for the client, and therefore contains configuration required for the client to be accessible from within the common module. Therefore the ClientProperties.java is best be placed inside the common module.
The goal is to have a place holder for all configuration properties.

Added:
    qpid/trunk/qpid/java/common/src/main/java/org/apache/configuration/
    qpid/trunk/qpid/java/common/src/main/java/org/apache/configuration/ClientProperties.java
Removed:
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/configuration/ClientProperties.java
Modified:
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
    qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/message/JMSDestinationTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java?rev=900595&r1=900594&r2=900595&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java (original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java Mon Jan 18 22:53:15 2010
@@ -54,12 +54,12 @@
 import javax.naming.Referenceable;
 import javax.naming.StringRefAddr;
 
+import org.apache.configuration.ClientProperties;
 import org.apache.qpid.AMQConnectionFailureException;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.AMQProtocolException;
 import org.apache.qpid.AMQUnresolvedAddressException;
 import org.apache.qpid.AMQDisconnectedException;
-import org.apache.qpid.client.configuration.ClientProperties;
 import org.apache.qpid.client.failover.FailoverException;
 import org.apache.qpid.client.failover.FailoverProtectedOperation;
 import org.apache.qpid.client.protocol.AMQProtocolHandler;

Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java?rev=900595&r1=900594&r2=900595&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java (original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java Mon Jan 18 22:53:15 2010
@@ -29,8 +29,8 @@
 import javax.jms.JMSException;
 import javax.jms.XASession;
 
+import org.apache.configuration.ClientProperties;
 import org.apache.qpid.AMQException;
-import org.apache.qpid.client.configuration.ClientProperties;
 import org.apache.qpid.client.failover.FailoverException;
 import org.apache.qpid.client.failover.FailoverProtectedOperation;
 import org.apache.qpid.framing.ProtocolVersion;

Added: qpid/trunk/qpid/java/common/src/main/java/org/apache/configuration/ClientProperties.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/configuration/ClientProperties.java?rev=900595&view=auto
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/configuration/ClientProperties.java (added)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/configuration/ClientProperties.java Mon Jan 18 22:53:15 2010
@@ -0,0 +1,113 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.configuration;
+
+/**
+ * This class centralized the Qpid client properties.
+ */
+public class ClientProperties
+{
+
+    /**
+     * Currently with Qpid it is not possible to change the client ID.
+     * If one is not specified upon connection construction, an id is generated automatically.
+     * Therefore an exception is always thrown unless this property is set to true.
+     * type: boolean
+     */
+    public static final String IGNORE_SET_CLIENTID_PROP_NAME = "ignore_setclientID";
+
+    /**
+     * This property is currently used within the 0.10 code path only
+     * The maximum number of pre-fetched messages per destination
+     * This property is used for all the connection unless it is overwritten by the connectionURL
+     * type: long
+     */
+    public static final String MAX_PREFETCH_PROP_NAME = "max_prefetch";
+    public static final String MAX_PREFETCH_DEFAULT = "500";
+
+    /**
+     * When true a sync command is sent after every persistent messages.
+     * type: boolean
+     */
+    public static final String SYNC_PERSISTENT_PROP_NAME = "sync_persistence";
+
+    /**
+     * When true a sync command is sent after sending a message ack.
+     * type: boolean
+     */
+    public static final String SYNC_ACK_PROP_NAME = "sync_ack";
+
+    /**
+     * sync_publish property - {persistent|all}
+     * If set to 'persistent',then persistent messages will be publish synchronously
+     * If set to 'all', then all messages regardless of the delivery mode will be
+     * published synchronously.
+     */
+    public static final String SYNC_PUBLISH_PROP_NAME = "sync_publish";
+
+    /**
+     * This value will be used in the following settings
+     * To calculate the SO_TIMEOUT option of the socket (2*idle_timeout)
+     * If this values is between the max and min values specified for heartbeat
+     * by the broker in TuneOK it will be used as the heartbeat interval.
+     * If not a warning will be printed and the max value specified for
+     * heartbeat in TuneOK will be used
+     * 
+     * The default idle timeout is set to 120 secs
+     */
+    public static final String IDLE_TIMEOUT_PROP_NAME = "idle_timeout";
+    public static final long DEFAULT_IDLE_TIMEOUT = 120000;
+    /**
+     * This value will be used to determine the default destination syntax type.
+     * Currently the two types are Binding URL (java only) and the Addressing format (used by
+     * all clients). 
+     */
+    public static final String DEST_SYNTAX = "dest_syntax";
+
+     /**
+     * ==========================================================
+     * Those properties are used when the io size should be bounded
+     * ==========================================================
+     */
+
+    /**
+     * When set to true the io layer throttle down producers and consumers
+     * when written or read messages are accumulating and exceeding a certain size.
+     * This is especially useful when a the producer rate is greater than the network
+     * speed.
+     * type: boolean
+     */
+    public static final String PROTECTIO_PROP_NAME = "protectio";
+
+    //=== The following properties are only used when the previous one is true.
+    /**
+     * Max size of read messages that can be stored within the MINA layer
+     * type: int
+     */
+    public static final String READ_BUFFER_LIMIT_PROP_NAME = "qpid.read.buffer.limit";
+    public static final String READ_BUFFER_LIMIT_DEFAULT = "262144";
+    /**
+     * Max size of written messages that can be stored within the MINA layer
+     * type: int
+     */
+    public static final String WRITE_BUFFER_LIMIT_PROP_NAME = "qpid.read.buffer.limit";
+    public static final String WRITE_BUFFER_LIMIT_DEFAULT = "262144";
+
+    public static final String AMQP_VERSION = "qpid.amqp.version";
+}

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java?rev=900595&r1=900594&r2=900595&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java Mon Jan 18 22:53:15 2010
@@ -34,13 +34,13 @@
 import javax.jms.Session;
 import javax.jms.TextMessage;
 
+import org.apache.configuration.ClientProperties;
 import org.apache.log4j.Logger;
 import org.apache.qpid.client.AMQHeadersExchange;
 import org.apache.qpid.client.AMQNoRouteException;
 import org.apache.qpid.client.AMQQueue;
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.client.configuration.ClientProperties;
 import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.framing.FieldTable;
 import org.apache.qpid.test.utils.QpidTestCase;

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/message/JMSDestinationTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/message/JMSDestinationTest.java?rev=900595&r1=900594&r2=900595&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/message/JMSDestinationTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/message/JMSDestinationTest.java Mon Jan 18 22:53:15 2010
@@ -20,10 +20,10 @@
  */
 package org.apache.qpid.test.client.message;
 
+import org.apache.configuration.ClientProperties;
 import org.apache.qpid.client.AMQDestination;
 import org.apache.qpid.client.AMQTopic;
 import org.apache.qpid.client.CustomJMSXProperty;
-import org.apache.qpid.client.configuration.ClientProperties;
 import org.apache.qpid.management.common.mbeans.ManagedQueue;
 import org.apache.qpid.test.utils.JMXTestUtils;
 import org.apache.qpid.test.utils.QpidTestCase;

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java?rev=900595&r1=900594&r2=900595&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java Mon Jan 18 22:53:15 2010
@@ -29,12 +29,12 @@
 import javax.jms.TextMessage;
 import javax.jms.TopicSession;
 
+import org.apache.configuration.ClientProperties;
 import org.apache.qpid.client.AMQConnection;
 import org.apache.qpid.client.AMQConnectionDelegate_0_10;
 import org.apache.qpid.client.AMQQueue;
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.client.configuration.ClientProperties;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.test.utils.QpidTestCase;
 

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java?rev=900595&r1=900594&r2=900595&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java Mon Jan 18 22:53:15 2010
@@ -20,11 +20,11 @@
  */
 package org.apache.qpid.test.unit.message;
 
+import org.apache.configuration.ClientProperties;
 import org.apache.qpid.client.AMQConnection;
 import org.apache.qpid.client.AMQHeadersExchange;
 import org.apache.qpid.client.AMQQueue;
 import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.configuration.ClientProperties;
 import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.FieldTable;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org