[infinispan-commits] Infinispan SVN: r2040 - in trunk: cachestore/remote/src/test/resources and 10 other directories.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Thu Jul 15 12:21:31 EDT 2010
Author: manik.surtani at jboss.com
Date: 2010-07-15 12:21:29 -0400 (Thu, 15 Jul 2010)
New Revision: 2040
Modified:
trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreFunctionalTest.java
trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreTest.java
trunk/cachestore/remote/src/test/resources/hotrod-client.properties
trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/ConfigurationProperties.java
trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/async/DefaultAsyncExecutorFactory.java
trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transport/TransportFactory.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ClientConnectionPoolingTest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/DroppedConnectionsTest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HeavyLoadConnectionPoolingTest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodIntegrationTest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/PingOnStartupTest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerRestartTest.java
trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/retry/AbstractRetryTest.java
trunk/client/hotrod-client/src/test/resources/hotrod-client.properties
trunk/core/src/test/java/org/infinispan/test/fwk/SuiteResourcesAndLogTest.java
trunk/parent/pom.xml
trunk/server/rest/src/main/webapp/index.html
Log:
[ISPN-534] (Standardise keys used for System properties, .properties and Properties entries) Updated Javadocs and tests
Modified: trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreFunctionalTest.java
===================================================================
--- trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreFunctionalTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreFunctionalTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -29,7 +29,7 @@
remoteCacheStoreConfig.setRemoteCacheName(CacheContainer.DEFAULT_CACHE_NAME);
Properties properties = new Properties();
- properties.put("hotrod-servers", "localhost:"+ hrServer.getPort());
+ properties.put("infinispan.client.hotrod.server_list", "localhost:"+ hrServer.getPort());
remoteCacheStoreConfig.setHotRodClientProperties(properties);
return remoteCacheStoreConfig;
Modified: trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreTest.java
===================================================================
--- trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/cachestore/remote/src/test/java/org/infinispan/loaders/remote/RemoteCacheStoreTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -37,7 +37,7 @@
configuration.setEvictionStrategy(EvictionStrategy.UNORDERED);
hrServer = TestHelper.startHotRodServer(localCacheManager);
Properties properties = new Properties();
- properties.put("hotrod-servers", "localhost:" + hrServer.getPort());
+ properties.put("infinispan.client.hotrod.server_list", "localhost:" + hrServer.getPort());
remoteCacheStoreConfig.setHotRodClientProperties(properties);
RemoteCacheStore remoteCacheStore = new RemoteCacheStore();
Modified: trunk/cachestore/remote/src/test/resources/hotrod-client.properties
===================================================================
--- trunk/cachestore/remote/src/test/resources/hotrod-client.properties 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/cachestore/remote/src/test/resources/hotrod-client.properties 2010-07-15 16:21:29 UTC (rev 2040)
@@ -1,9 +1,19 @@
# hopefully this port is available
-hotrod-servers=127.0.0.1:19711
-force-return-value=false
+infinispan.client.hotrod.transport_factory = org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory
+infinispan.client.hotrod.server_list = 127.0.0.1:19711
+infinispan.client.hotrod.marshaller = org.infinispan.marshall.jboss.GenericJBossMarshaller
+infinispan.client.hotrod.async_executor_factory = org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory
+infinispan.client.hotrod.default_executor_factory.pool_size = 1
+infinispan.client.hotrod.default_executor_factory.queue_size = 10000
+infinispan.client.hotrod.hash_function_impl.1 = org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV1
+infinispan.client.hotrod.tcp_no_delay = true
+infinispan.client.hotrod.ping_on_startup = true
+infinispan.client.hotrod.request_balancing_strategy = org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy
+infinispan.client.hotrod.key_size_estimate = 64
+infinispan.client.hotrod.value_size_estimate = 512
+infinispan.client.hotrod.force_return_values = false
-
-##bellow is connection pooling config
+## below is connection pooling config
maxActive=99
maxTotal = -98
maxIdle = 97
\ No newline at end of file
Modified: trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
===================================================================
--- trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -22,6 +22,7 @@
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicInteger;
+
import static org.infinispan.util.Util.getInstance;
/**
@@ -41,48 +42,49 @@
* <p/>
* <b>Configuration:</b>
* <p/>
- * The cache manager is configured through a {@link java.util.Properties} object passed to the C-tor (there are also
- * "simplified" constructors that rely on default values). Bellow is the list of supported configuration elements:
+ * The cache manager is configured through a {@link java.util.Properties} object passed to the constructor (there are also
+ * "simplified" constructors that rely on default values).
+ * <p/>
+ * Below is the list of supported configuration elements:
* <ul>
- * <li>
- * hotrod-servers - the initial list of hotrod servers to connect to, specified in the following format: host1:port1;host2:port2...
- * At least one host:port must be specified.
- * </li>
- * <li>
- * request-balancing-strategy - for replicated (vs distributed) hotrod server clusters, the client balances requests to the
- * servers according to this strategy. Defaults to {@link org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy}
- * </li>
- * <li>
- * force-return-value - weather or not to implicitly {@link org.infinispan.client.hotrod.Flag#FORCE_RETURN_VALUE} for all calls.
- * Defaults to false.
- * </li>
- * <li>
- * tcp-no-delay - TCP no delay flag switch. Defaults to true.
- * </li>
- * <li>
- * ping-on-startup - if true, a ping request is sent to a back end server in order to fetch cluster's topology. True by default.
- * </li>
+ * <li><tt>infinispan.client.hotrod.request_balancing_strategy</tt>, default = org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy. For replicated (vs distributed) hotrod server clusters, the client balances requests to the
+ * servers according to this strategy.</li>
+ * <li><tt>infinispan.client.hotrod.server_list</tt>, default = 127.0.0.1:11311. This is the initial list of hotrod servers to connect to, specified in the following format: host1:port1;host2:port2...
+ * At least one host:port must be specified.</li>
+ * <li><tt>infinispan.client.hotrod.force_return_values</tt>, default = false. Whether or not to implicitly {@link org.infinispan.client.hotrod.Flag#FORCE_RETURN_VALUE} for all calls.</li>
+ * <li><tt>infinispan.client.hotrod.tcp_no_delay</tt>, default = true. Affects TCP NODELAY on the TCP stack.</li>
+ * <li><tt>infinispan.client.hotrod.ping_on_startup</tt>, default = true. If true, a ping request is sent to a back end server in order to fetch cluster's topology.</li>
+ * <li><tt>infinispan.client.hotrod.transport_factory</tt>, default = org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory - controls which transport to use. Currently only the TcpTransport is supported.</li>
+ * <li><tt>infinispan.client.hotrod.marshaller</tt>, default = org.infinispan.marshall.jboss.GenericJBossMarshaller. Allows you to specify a custom {@link org.infinispan.marshall.Marshaller} implementation to serialize and deserialize user objects.</li>
+ * <li><tt>infinispan.client.hotrod.async_executor_factory</tt>, default = org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory. Allows you to specify a custom asynchroous executor for async calls.</li>
+ * <li><tt>infinispan.client.hotrod.default_executor_factory.pool_size</tt>, default = 10. If the default executor is used, this configures the number of threads to initialize the executor with.</li>
+ * <li><tt>infinispan.client.hotrod.default_executor_factory.queue_size</tt>, default = 100000. If the default executor is used, this configures the queue size to initialize the executor with.</li>
+ * <li><tt>infinispan.client.hotrod.hash_function_impl.1</tt>, default = org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV1. This specifies the version of the hash function and consistent hash algorithm in use, and is closely tied with the HotRod server version used.</li>
+ * <li><tt>infinispan.client.hotrod.key_size_estimate</tt>, default = 64. This hint allows sizing of byte buffers when serializing and deserializing keys, to minimize array resizing.</li>
+ * <li><tt>infinispan.client.hotrod.value_size_estimate</tt>, default = 512. This hint allows sizing of byte buffers when serializing and deserializing values, to minimize array resizing.</li>
+ * </ul>
* <br/>
- * <i>below is connection pooling config</i>:
+ * <i>The following properties are related to connection pooling</i>:
* <p/>
- * <li>maxActive - controls the maximum number of connections per server that are allocated (checked out to client threads, or idle in
+ * <ul>
+ * <li><tt>maxActive</tt> - controls the maximum number of connections per server that are allocated (checked out to client threads, or idle in
* the pool) at one time. When non-positive, there is no limit to the number of connections per server. When maxActive
* is reached, the connection pool for that server is said to be exhausted. The default setting for this parameter is
* -1, i.e. there is no limit.</li>
- * <li>maxTotal - sets a global limit on the number persistent connections that can be in circulation within the combined set of
+ * <li><tt>maxTotal</tt> - sets a global limit on the number persistent connections that can be in circulation within the combined set of
* servers. When non-positive, there is no limit to the total number of persistent connections in circulation. When
* maxTotal is exceeded, all connections pools are exhausted. The default setting for this parameter is -1 (no limit).
* </li>
* <p/>
- * <li>maxIdle - controls the maximum number of idle persistent connections, per server, at any time. When negative, there is no limit
+ * <li><tt>maxIdle</tt> - controls the maximum number of idle persistent connections, per server, at any time. When negative, there is no limit
* to the number of connections that may be idle per server. The default setting for this parameter is -1.</li>
* <p/>
* <li>
- * whenExhaustedAction - specifies what happens when asking for a connection from a server's pool, and that pool is exhausted. Possible values:
+ * <tt>whenExhaustedAction</tt> - specifies what happens when asking for a connection from a server's pool, and that pool is exhausted. Possible values:
* <ul>
- * <li> 0 - an exception will be thrown to the calling user</li>
- * <li> 1 - the caller will block (invoke waits until a new or idle connections is available.
- * <li> 2 - a new persistent connection will be created and and returned (essentially making maxActive meaningless.) </li>
+ * <li> <tt>0</tt> - an exception will be thrown to the calling user</li>
+ * <li> <tt>1</tt> - the caller will block (invoke waits until a new or idle connections is available.
+ * <li> <tt>2</tt> - a new persistent connection will be created and and returned (essentially making maxActive meaningless.) </li>
* </ul>
* The default whenExhaustedAction setting is 1.
* </li>
@@ -93,33 +95,25 @@
* eviction" thread, which runs asynchronously. The idle object evictor does not lock the pool
* throughout its execution. The idle connection eviction thread may be configured using the following attributes:
* <ul>
- * <li>timeBetweenEvictionRunsMillis - indicates how long the eviction thread should sleep before "runs" of examining idle
+ * <li><tt>timeBetweenEvictionRunsMillis</tt> - indicates how long the eviction thread should sleep before "runs" of examining idle
* connections. When non-positive, no eviction thread will be launched. The default setting for this parameter is
* 2 minutes </li>
- * <li> minEvictableIdleTimeMillis - specifies the minimum amount of time that an connection may sit idle in the pool before it
+ * <li> <tt>minEvictableIdleTimeMillis</tt> - specifies the minimum amount of time that an connection may sit idle in the pool before it
* is eligible for eviction due to idle time. When non-positive, no connection will be dropped from the pool due to
* idle time alone. This setting has no effect unless timeBetweenEvictionRunsMillis > 0. The default setting for this
* parameter is 1800000(30 minutes). </li>
- * <li> testWhileIdle - indicates whether or not idle connections should be validated by sending an TCP packet to the server,
+ * <li> <tt>testWhileIdle</tt> - indicates whether or not idle connections should be validated by sending an TCP packet to the server,
* during idle connection eviction runs. Connections that fail to validate will be dropped from the pool. This setting
* has no effect unless timeBetweenEvictionRunsMillis > 0. The default setting for this parameter is true.
* </li>
- * <li>minIdle - sets a target value for the minimum number of idle connections (per server) that should always be available.
+ * <li><tt>minIdle</tt> - sets a target value for the minimum number of idle connections (per server) that should always be available.
* If this parameter is set to a positive number and timeBetweenEvictionRunsMillis > 0, each time the idle connection
* eviction thread runs, it will try to create enough idle instances so that there will be minIdle idle instances
* available for each server. The default setting for this parameter is 1. </li>
* </ul>
* </li>
* <li>
- * async-executor-factory - the ExecutorFactory that will hold the thread pool used for async calls. It must implement
- * {@link org.infinispan.executors.ExecutorFactory}. If not specified, defaults to {@link DefaultAsyncExecutorFactory} </li>
- * <li>default-executor-factory.poolSize - used as a configuration for {@link DefaultAsyncExecutorFactory}, and defined the number
- * of threads to keep in the pool. If not specified defaults to 1. </li>
- * <li> default-executor-factory.queueSize - queue to use for holding async requests before they are executed. Defaults
- * to 100000</li>
- * <li>
- * consistent-hash.[version] - see {@link org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashFactory}
- * <ul>
+ * </ul>
*
* @author Mircea.Markus at jboss.com
* @since 4.1
@@ -157,10 +151,10 @@
}
/**
- * Same as {@link org.infinispan.client.hotrod.RemoteCacheManager#RemoteCacheManager(Marshaller, java.util.Properties, boolean)} with start = true.
+ * Same as {@link #RemoteCacheManager(Marshaller, java.util.Properties, boolean)} with start = true.
*/
public RemoteCacheManager(Marshaller marshaller, Properties props) {
- this(marshaller, props, false);
+ this(marshaller, props, true);
}
/**
Modified: trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/ConfigurationProperties.java
===================================================================
--- trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/ConfigurationProperties.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/ConfigurationProperties.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -33,7 +33,8 @@
public static final String VALUE_SIZE_ESTIMATE = "infinispan.client.hotrod.value_size_estimate";
public static final String FORCE_RETURN_VALUES = "infinispan.client.hotrod.force_return_values";
public static final String HASH_FUNCTION_PREFIX = "infinispan.client.hotrod.hash_function_impl";
-
+ public static final String DEFAULT_EXECUTOR_FACTORY_QUEUE_SIZE ="infinispan.client.hotrod.default_executor_factory.queue_size";
+
// defaults
private static final int DEFAULT_KEY_SIZE = 64;
@@ -41,6 +42,7 @@
private final TypedProperties props;
+
public ConfigurationProperties() {
this.props = new TypedProperties();
}
Modified: trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/async/DefaultAsyncExecutorFactory.java
===================================================================
--- trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/async/DefaultAsyncExecutorFactory.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/async/DefaultAsyncExecutorFactory.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -1,6 +1,9 @@
package org.infinispan.client.hotrod.impl.async;
+import com.sun.corba.se.impl.orb.ORBConfiguratorImpl;
+import org.infinispan.client.hotrod.impl.ConfigurationProperties;
import org.infinispan.executors.ExecutorFactory;
+import org.infinispan.util.TypedProperties;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
@@ -12,19 +15,14 @@
/**
* Default implementation for {@link org.infinispan.executors.ExecutorFactory} based on an {@link ThreadPoolExecutor}.
- * Accepts following configuration parameters:
- * <ul>
- * <li> - default-executor-factory.poolSize = the fixed size fo the pool</li>
- * <li> - default-executor-factory.queueSize = The size of the {@link LinkedBlockingQueue} backing up the executor</li>
- * </ul>
*
* @author Mircea.Markus at jboss.com
* @since 4.1
*/
public class DefaultAsyncExecutorFactory implements ExecutorFactory {
- public static final String THREAD_NAME = "Hotrod-client-async-pool";
+ public static final String THREAD_NAME = "HotRod-client-async-pool";
public static final AtomicInteger counter = new AtomicInteger(0);
- private int poolSize = 1;
+ private int poolSize = 10;
private int queueSize = 100000;
@Override
@@ -45,11 +43,8 @@
}
private void readParams(Properties props) {
- if (props.contains("default-executor-factory.poolSize")) {
- poolSize = Integer.parseInt(props.getProperty("default-executor-factory.poolSize"));
- }
- if (props.contains("default-executor-factory.queueSize")) {
- queueSize = Integer.parseInt("default-executor-factory.queueSize");
- }
+ TypedProperties tp = TypedProperties.toTypedProperties(props);
+ poolSize = tp.getIntProperty(ConfigurationProperties.DEFAULT_EXECUTOR_FACTORY_POOL_SIZE, 10);
+ queueSize = tp.getIntProperty(ConfigurationProperties.DEFAULT_EXECUTOR_FACTORY_QUEUE_SIZE, 100000);
}
}
Modified: trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transport/TransportFactory.java
===================================================================
--- trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transport/TransportFactory.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transport/TransportFactory.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -17,8 +17,6 @@
*/
public interface TransportFactory {
- public static final String CONF_HOTROD_SERVERS = "hotrod-servers";
-
public Transport getTransport();
public void releaseTransport(Transport transport);
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/CSAIntegrationTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -100,8 +100,8 @@
//Important: this only connects to one of the two servers!
Properties props = new Properties();
- props.put("hotrod-servers", "localhost:" + hotRodServer2.getPort() + ";localhost:" + hotRodServer2.getPort());
- props.put("ping-on-startup", "false");
+ props.put("infinispan.client.hotrod.server_list", "localhost:" + hotRodServer2.getPort() + ";localhost:" + hotRodServer2.getPort());
+ props.put("infinispan.client.hotrod.ping_on_startup", "false");
remoteCacheManager = new RemoteCacheManager(props);
remoteCache = remoteCacheManager.getCache();
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ClientConnectionPoolingTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ClientConnectionPoolingTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ClientConnectionPoolingTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -80,7 +80,7 @@
hotrodClientConf.put("testWhileIdle", "true");
hotrodClientConf.put("minIdle", "-5");
hotrodClientConf.put("lifo", "true");
- hotrodClientConf.put("ping-on-startup", "false");
+ hotrodClientConf.put("infinispan.client.hotrod.ping_on_startup", "false");
remoteCacheManager = new RemoteCacheManager(hotrodClientConf);
remoteCache = remoteCacheManager.getCache();
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/DroppedConnectionsTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/DroppedConnectionsTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/DroppedConnectionsTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -36,7 +36,7 @@
hrClientConfig.put("minIdle","1");
hrClientConfig.put("maxIdle","2");
hrClientConfig.put("maxActive","2");
- hrClientConfig.put("hotrod-servers", "127.0.0.1:" + hotRodServer.getPort());
+ hrClientConfig.put("infinispan.client.hotrod.server_list", "127.0.0.1:" + hotRodServer.getPort());
remoteCacheManager = new RemoteCacheManager(hrClientConfig);
rc = remoteCacheManager.getCache();
transportFactory = (TcpTransportFactory) TestingUtil.extractField(remoteCacheManager, "transportFactory");
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HeavyLoadConnectionPoolingTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HeavyLoadConnectionPoolingTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HeavyLoadConnectionPoolingTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -41,10 +41,10 @@
hotRodServer = TestHelper.startHotRodServer(cacheManager);
Properties hotrodClientConf = new Properties();
- hotrodClientConf.put("hotrod-servers", "localhost:"+hotRodServer.getPort());
+ hotrodClientConf.put("infinispan.client.hotrod.server_list", "localhost:"+hotRodServer.getPort());
hotrodClientConf.put("timeBetweenEvictionRunsMillis", "3000");
hotrodClientConf.put("minEvictableIdleTimeMillis", "1000");
- hotrodClientConf.put("ping-on-startup", "1000");
+ hotrodClientConf.put("infinispan.client.hotrod.ping_on_startup", "true");
remoteCacheManager = new RemoteCacheManager(hotrodClientConf);
remoteCache = remoteCacheManager.getCache();
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodIntegrationTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodIntegrationTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/HotRodIntegrationTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -63,7 +63,7 @@
protected RemoteCacheManager getRemoteCacheManager() {
Properties config = new Properties();
- config.put("hotrod-servers", "127.0.0.1:" + hotrodServer.getPort());
+ config.put("infinispan.client.hotrod.server_list", "127.0.0.1:" + hotrodServer.getPort());
return new RemoteCacheManager(config);
}
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/PingOnStartupTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/PingOnStartupTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/PingOnStartupTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -56,8 +56,8 @@
public void testTopologyFetched() throws Exception {
Properties props = new Properties();
- props.put("hotrod-servers", "localhost:" + hotRodServer2.getPort() + ";localhost:" + hotRodServer2.getPort());
- props.put("ping-on-startup", "true");
+ props.put("infinispan.client.hotrod.server_list", "localhost:" + hotRodServer2.getPort() + ";localhost:" + hotRodServer2.getPort());
+ props.put("infinispan.client.hotrod.ping_on_startup", "true");
props.put("timeBetweenEvictionRunsMillis", "500");
RemoteCacheManager remoteCacheManager = new RemoteCacheManager(props);
@@ -78,8 +78,8 @@
public void testTopologyNotFetched() {
Properties props = new Properties();
- props.put("hotrod-servers", "localhost:" + hotRodServer2.getPort() + ";localhost:" + hotRodServer2.getPort());
- props.put("ping-on-startup", "false");
+ props.put("infinispan.client.hotrod.server_list", "localhost:" + hotRodServer2.getPort() + ";localhost:" + hotRodServer2.getPort());
+ props.put("infinispan.client.hotrod.ping_on_startup", "false");
RemoteCacheManager remoteCacheManager = new RemoteCacheManager(props);
TcpTransportFactory tcpConnectionFactory = (TcpTransportFactory) TestingUtil.extractField(remoteCacheManager, "transportFactory");
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteAsyncAPITest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -30,8 +30,8 @@
cache = cm.getCache();
hotrodServer = TestHelper.startHotRodServer(cm);
Properties props = new Properties();
- props.put("hotrod-servers", "127.0.0.1:" + hotrodServer.getPort());
- props.put("force-return-value","true");
+ props.put("infinispan.client.hotrod.server_list", "127.0.0.1:" + hotrodServer.getPort());
+ props.put("infinispan.client.hotrod.force_return_values","true");
props.put("testOnBorrow", "false");
rcm = new RemoteCacheManager(props);
c = rcm.getCache(true);
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerRestartTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerRestartTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/ServerRestartTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -38,7 +38,7 @@
log.info("Started server on port: " + hotrodServer.getPort());
Properties config = new Properties();
- config.put("hotrod-servers", "127.0.0.1:" + hotrodServer.getPort());
+ config.put("infinispan.client.hotrod.server_list", "127.0.0.1:" + hotrodServer.getPort());
config.put("timeBetweenEvictionRunsMillis", "2000");
remoteCacheManager = new RemoteCacheManager(config);
defaultRemote = remoteCacheManager.getCache();
Modified: trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/retry/AbstractRetryTest.java
===================================================================
--- trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/retry/AbstractRetryTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/retry/AbstractRetryTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -68,8 +68,8 @@
waitForClusterToForm();
Properties clientConfig = new Properties();
- clientConfig.put("hotrod-servers", "localhost:" + hotRodServer2.getPort());
- clientConfig.put("force-return-value", "true");
+ clientConfig.put("infinispan.client.hotrod.server_list", "localhost:" + hotRodServer2.getPort());
+ clientConfig.put("infinispan.client.hotrod.force_return_values", "true");
clientConfig.put("maxActive",1); //this ensures that only one server is active at a time
remoteCacheManager = new RemoteCacheManager(clientConfig);
Modified: trunk/client/hotrod-client/src/test/resources/hotrod-client.properties
===================================================================
--- trunk/client/hotrod-client/src/test/resources/hotrod-client.properties 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/client/hotrod-client/src/test/resources/hotrod-client.properties 2010-07-15 16:21:29 UTC (rev 2040)
@@ -1,9 +1,20 @@
-hotrod-servers=127.0.0.1:11311
-force-return-value=false
-ping-on-startup=true
+# hopefully this port is available
+infinispan.client.hotrod.transport_factory = org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory
+infinispan.client.hotrod.server_list = 127.0.0.1:11311
+infinispan.client.hotrod.marshaller = org.infinispan.marshall.jboss.GenericJBossMarshaller
+infinispan.client.hotrod.async_executor_factory = org.infinispan.client.hotrod.impl.async.DefaultAsyncExecutorFactory
+infinispan.client.hotrod.default_executor_factory.pool_size = 1
+infinispan.client.hotrod.default_executor_factory.queue_size = 10000
+infinispan.client.hotrod.hash_function_impl.1 = org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV1
+infinispan.client.hotrod.tcp_no_delay = true
+infinispan.client.hotrod.ping_on_startup = true
+infinispan.client.hotrod.request_balancing_strategy = org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy
+infinispan.client.hotrod.key_size_estimate = 64
+infinispan.client.hotrod.value_size_estimate = 512
+infinispan.client.hotrod.force_return_values = false
-##bellow is connection pooling config
-maxActive= -1
+## below is connection pooling config
+maxActive=-1
maxTotal = -1
maxIdle = -1
whenExhaustedAction = 1
@@ -12,8 +23,3 @@
testWhileIdle = true
minIdle = 1
-asyn-executor-factory=org.infinispan.client.hotrod.DefaultAsyncExecutorFactory
-default-executor-factory.poolSize = 1;
-default-executor-factory.queueSize = 100000
-consistent-hash.1=org.infinispan.client.hotrod.impl.consistenthash.ConsitentHashV1
-
Modified: trunk/core/src/test/java/org/infinispan/test/fwk/SuiteResourcesAndLogTest.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/test/fwk/SuiteResourcesAndLogTest.java 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/core/src/test/java/org/infinispan/test/fwk/SuiteResourcesAndLogTest.java 2010-07-15 16:21:29 UTC (rev 2040)
@@ -32,7 +32,7 @@
log("sun.arch.data.model = " + System.getProperty("sun.arch.data.model"));
log("sun.cpu.endian = " + System.getProperty("sun.cpu.endian"));
log("protocol.stack = " + System.getProperty("protocol.stack"));
-// log("infinispan.marshaller.class = " + System.getProperty("infinispan.marshaller.class"));
+ log("infinispan.test.jgroups.protocol = " + System.getProperty("infinispan.test.jgroups.protocol"));
String preferIpV4 = System.getProperty("java.net.preferIPv4Stack");
log("java.net.preferIPv4Stack = " + preferIpV4);
log("java.net.preferIPv6Stack = " + System.getProperty("java.net.preferIPv6Stack"));
Modified: trunk/parent/pom.xml
===================================================================
--- trunk/parent/pom.xml 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/parent/pom.xml 2010-07-15 16:21:29 UTC (rev 2040)
@@ -211,8 +211,8 @@
<forkMode>none</forkMode>
<systemProperties>
<property>
- <name>protocol.stack</name>
- <value>${protocol.stack}</value>
+ <name>infinispan.test.jgroups.protocol</name>
+ <value>${infinispan.test.jgroups.protocol}</value>
</property>
<property>
<name>bind.address</name>
@@ -223,8 +223,8 @@
<value>true</value>
</property>
<property>
- <name>infinispan.marshaller.class</name>
- <value>${marshaller.class}</value>
+ <name>infinispan.test.marshaller.class</name>
+ <value>${infinispan.test.marshaller.class}</value>
</property>
</systemProperties>
<trimStackTrace>false</trimStackTrace>
@@ -377,14 +377,14 @@
</activation>
<properties>
<defaultTestGroup>functional,unit</defaultTestGroup>
- <protocol.stack>tcp</protocol.stack>
+ <infinispan.test.jgroups.protocol>tcp</infinispan.test.jgroups.protocol>
</properties>
</profile>
<profile>
<id>test-functional</id>
<properties>
<defaultTestGroup>functional</defaultTestGroup>
- <protocol.stack>tcp</protocol.stack>
+ <infinispan.test.jgroups.protocol>tcp</infinispan.test.jgroups.protocol>
</properties>
</profile>
<profile>
@@ -409,7 +409,7 @@
<id>debug-tests</id>
<properties>
<testNGListener>org.infinispan.test.fwk.DebuggingUnitTestNGListener</testNGListener>
- <protocol.stack>tcp</protocol.stack>
+ <infinispan.test.jgroups.protocol>tcp</infinispan.test.jgroups.protocol>
</properties>
</profile>
</profiles>
Modified: trunk/server/rest/src/main/webapp/index.html
===================================================================
--- trunk/server/rest/src/main/webapp/index.html 2010-07-15 15:33:09 UTC (rev 2039)
+++ trunk/server/rest/src/main/webapp/index.html 2010-07-15 16:21:29 UTC (rev 2040)
@@ -42,7 +42,7 @@
<h4>
Configuration</h4> <!-- class="proj_define" FOR BOX EFFECT -->
<p>
- Out of the box, Infinispan will use its LOCAL mode cache. To set a custom configuration, create an infinispan config file (xml) and set the PATH to it as either the System property called "infinispan.server.rest.cfg" (without quotes, obviously) or a web context attribute of the same name. The value should be a path to your config file (eg on the command line: -Dinfinispan.server.rest.cfg=/somewhere/infinispan.xml). Please note that the REST server only allows interaction with either the default cache named as "___defaultcache" or one of the named caches in the configuration file. This is because the REST server starts default and pre-defined caches on startup in order to provide a more consistent behaivour. So, if you don't pass any configuration file, you'll only be able to interact with the default cache. To interact with more caches, pass a configuration file with the desired named caches.
+ Out of the box, Infinispan will use its LOCAL mode cache. To set a custom configuration, create an infinispan config file (xml) and set the PATH to it in your web.xml file, under the key <b>infinispan.configuration</b>. See the sample web.xml file for details. The value should be a path to your config file. Please note that the REST server only allows interaction with either the default cache named as "___defaultcache" or one of the named caches in the configuration file. This is because the REST server starts default and pre-defined caches on startup in order to provide a more consistent behaivour. So, if you don't pass any configuration file, you'll only be able to interact with the default cache. To interact with more caches, pass a configuration file with the desired named caches.
</div><div style="clear: both;"></div><div id="commonContent" >
<h5>
More information about the infinispan-commits
mailing list