JBoss Native SVN: r2068 - trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-11-24 16:10:14 -0500 (Mon, 24 Nov 2008)
New Revision: 2068
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
Log:
Arrange the retry logic (readLine() return null but the write() don't fail as excepted).
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java 2008-11-24 11:07:05 UTC (rev 2067)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java 2008-11-24 21:10:14 UTC (rev 2068)
@@ -746,6 +746,25 @@
}
}
+ private String sendRequest(Writer writer, BufferedReader reader, MCMPURLEncoder encoder, StringBuilder builder) throws IOException
+ {
+ writer.write(builder.toString());
+ writer.write("\r\n");
+
+ int length = encoder.getLength();
+
+ writer.write("Content-Length: " + length + "\r\n");
+ writer.write("User-Agent: ClusterListener/1.0\r\n");
+ writer.write("Connection: Keep-Alive\r\n");
+ writer.write("\r\n");
+ writer.write(encoder.getBuffer(), 0, length);
+ writer.write("\r\n");
+ writer.flush();
+
+ // Read the first response line and skip the rest of the HTTP header
+ return reader.readLine();
+ }
+
private String sendRequest(MCMPRequest request, Proxy proxy)
{
// If there was an error, do nothing until the next periodic event, where the whole configuration
@@ -794,19 +813,7 @@
{
// Then, connect to the proxy
Writer writer = proxy.getConnectionWriter();
- // Check connection to see if it is still alive (not really allowed,
- // but httpd deals with the extra CRLF)
- try
- {
- writer.write("\r\n");
- writer.flush();
- }
- catch (IOException e)
- {
- // Get a new connection; if it fails this second time, it is an error
- proxy.closeConnection();
- writer = proxy.getConnectionWriter();
- }
+ BufferedReader reader = proxy.getConnectionReader();
// Generate and write request
StringBuilder builder = new StringBuilder();
@@ -832,23 +839,20 @@
builder.append(" HTTP/1.0");
- writer.write(builder.toString());
- writer.write("\r\n");
-
- int length = encoder.getLength();
-
- writer.write("Content-Length: " + length + "\r\n");
- writer.write("User-Agent: ClusterListener/1.0\r\n");
- writer.write("Connection: Keep-Alive\r\n");
- writer.write("\r\n");
- writer.write(encoder.getBuffer(), 0, length);
- writer.write("\r\n");
- writer.flush();
-
- // Read the response to a string
- BufferedReader reader = proxy.getConnectionReader();
- // Read the first response line and skip the rest of the HTTP header
- String line = reader.readLine();
+ String line = null;
+ try {
+ line = sendRequest(writer, reader, encoder, builder);
+ }
+ catch (IOException e) {
+ }
+ /* Retry once if it fails */
+ if (line == null) {
+ // Get a new connection; if it fails this second time, it is an error
+ proxy.closeConnection();
+ writer = proxy.getConnectionWriter();
+ reader = proxy.getConnectionReader();
+ line = sendRequest(writer, reader, encoder, builder);
+ }
// Parse the line, which is formed like HTTP/1.x YYY Message
int status = 500;
// String version = "0";
16 years, 1 month
JBoss Native SVN: r2067 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-11-24 06:07:05 -0500 (Mon, 24 Nov 2008)
New Revision: 2067
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Allow to deferenciate our cping/cpong to the mdo_proxy ones.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-11-23 18:13:03 UTC (rev 2066)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-11-24 11:07:05 UTC (rev 2067)
@@ -1037,13 +1037,13 @@
status = apr_socket_send(sock, buf, &written);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL,
- "ajp_handle_cping_cpong(): send failed");
+ "ajp_cping_cpong(): send failed");
return status;
}
status = apr_socket_timeout_get(sock, &org);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL,
- "ajp_handle_cping_cpong(): apr_socket_timeout_get failed");
+ "ajp_cping_cpong(): apr_socket_timeout_get failed");
return status;
}
status = apr_socket_timeout_set(sock, timeout);
@@ -1051,12 +1051,12 @@
status = apr_socket_recv(sock, buf, &written);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "ajp_handle_cping_cpong: apr_socket_recv failed");
+ "ajp_cping_cpong: apr_socket_recv failed");
goto cleanup;
}
if (buf[0] != 0x41 || buf[1] != 0x42 || buf[2] != 0 || buf[3] != 1 || buf[4] != (unsigned char)9) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "ajp_handle_cping_cpong: awaited CPONG, received %02x %02x %02x %02x %02x",
+ "ajp_cping_cpong: awaited CPONG, received %02x %02x %02x %02x %02x",
buf[0] & 0xFF,
buf[1] & 0xFF,
buf[2] & 0xFF,
@@ -1068,12 +1068,12 @@
status = apr_socket_timeout_set(sock, org);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "ajp_handle_cping_cpong: apr_socket_timeout_set failed");
+ "ajp_cping_cpong: apr_socket_timeout_set failed");
return status;
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "ajp_handle_cping_cpong: Done");
+ "ajp_cping_cpong: Done");
return status;
}
static apr_status_t proxy_cluster_try_pingpong(request_rec *r, proxy_worker *worker, char *scheme)
16 years, 1 month
JBoss Native SVN: r2066 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-11-23 13:13:03 -0500 (Sun, 23 Nov 2008)
New Revision: 2066
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Arrange reslist logic.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-11-23 10:47:56 UTC (rev 2065)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-11-23 18:13:03 UTC (rev 2066)
@@ -26,6 +26,7 @@
*/
#include "apr_strings.h"
+#include "apr_version.h"
#include "httpd.h"
#include "http_config.h"
@@ -68,7 +69,6 @@
#define TIMEINTERVAL apr_time_from_sec(1) /* recalcul the lbstatus based on number of request in the time interval */
-
/* reslist constructor */
/* XXX: Should use the proxy_util one. */
static apr_status_t connection_constructor(void **resource, void *params,
@@ -162,10 +162,14 @@
#endif
{
apr_pool_t *p = conn->pool;
- apr_pool_clear(conn->pool);
- memset(conn, 0, sizeof(proxy_conn_rec));
+ apr_pool_clear(p);
+ conn = apr_pcalloc(p, sizeof(proxy_conn_rec));
conn->pool = p;
conn->worker = worker;
+#if AP_MODULE_MAGIC_AT_LEAST(20051115,13)
+ apr_pool_create(&(conn->scpool), p);
+ apr_pool_tag(conn->scpool, "proxy_conn_scpool");
+#endif
}
#if APR_HAS_THREADS
if (worker->hmax && worker->cp->res) {
@@ -1096,9 +1100,9 @@
rv = APR_SUCCESS;
if (!worker->cp->conn) {
/* XXX: What appends is worker->cp->pool is NULL */
- if (worker->cp->pool)
+ if (worker->cp->pool) {
connection_constructor((void **)&conn, worker, worker->cp->pool);
- else
+ } else
rv = APR_ENOPOOL;
}
else {
16 years, 1 month
JBoss Native SVN: r2065 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-11-23 05:47:56 -0500 (Sun, 23 Nov 2008)
New Revision: 2065
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
move the relist creation to mod_proxy_cluster.c
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-11-19 02:00:59 UTC (rev 2064)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-11-23 10:47:56 UTC (rev 2065)
@@ -34,6 +34,7 @@
#include "http_request.h"
#include "http_protocol.h"
#include "http_core.h"
+#include "ap_mpm.h"
#include "mod_proxy.h"
#include "mod_proxy_cluster.h"
@@ -66,20 +67,176 @@
#define WAITFORREMOVE 10 /* seconds */
#define TIMEINTERVAL apr_time_from_sec(1) /* recalcul the lbstatus based on number of request in the time interval */
+
+
+/* reslist constructor */
+/* XXX: Should use the proxy_util one. */
+static apr_status_t connection_constructor(void **resource, void *params,
+ apr_pool_t *pool)
+{
+ apr_pool_t *ctx;
+ apr_pool_t *scpool;
+ proxy_conn_rec *conn;
+ proxy_worker *worker = (proxy_worker *)params;
+
+ /*
+ * Create the subpool for each connection
+ * This keeps the memory consumption constant
+ * when disconnecting from backend.
+ */
+ apr_pool_create(&ctx, pool);
+ conn = apr_pcalloc(pool, sizeof(proxy_conn_rec));
+
+ /*
+ * Create another subpool that manages the data for the
+ * socket and the connection member of the proxy_conn_rec struct as we
+ * destroy this data more frequently than other data in the proxy_conn_rec
+ * struct like hostname and addr (at least in the case where we have
+ * keepalive connections that timed out).
+ */
+#if AP_MODULE_MAGIC_AT_LEAST(20051115,13)
+ apr_pool_create(&scpool, ctx);
+ apr_pool_tag(scpool, "proxy_conn_scpool");
+ conn->scpool = scpool;
+#endif
+
+ conn->pool = ctx;
+ conn->worker = worker;
+#if APR_HAS_THREADS
+ conn->inreslist = 1;
+#endif
+ *resource = conn;
+
+ return APR_SUCCESS;
+}
+
+#if APR_HAS_THREADS /* only needed when threads are used */
+/* reslist destructor */
+/* XXX: Should use the proxy_util one. */
+static apr_status_t connection_destructor(void *resource, void *params,
+ apr_pool_t *pool)
+{
+ proxy_conn_rec *conn = (proxy_conn_rec *)resource;
+
+ /* Destroy the pool only if not called from reslist_destroy */
+ if (conn->worker->cp->pool) {
+ apr_pool_destroy(conn->pool);
+ }
+
+ return APR_SUCCESS;
+}
+#endif
+
+/* connection cleanup routine */
+/* XXX: Should use the proxy_util one. */
+static apr_status_t connection_cleanup(void *theconn)
+{
+ proxy_conn_rec *conn = (proxy_conn_rec *)theconn;
+ proxy_worker *worker = conn->worker;
+
+ /*
+ * If the connection pool is NULL the worker
+ * cleanup has been run. Just return.
+ */
+ if (!worker->cp) {
+ return APR_SUCCESS;
+ }
+
+#if APR_HAS_THREADS
+ /* Sanity check: Did we already return the pooled connection? */
+ if (conn->inreslist) {
+ ap_log_perror(APLOG_MARK, APLOG_ERR, 0, conn->pool,
+ "proxy: Pooled connection 0x%pp for worker %s has been"
+ " already returned to the connection pool.",
+ (void *) conn,
+ worker->name);
+ return APR_SUCCESS;
+ }
+#endif
+
+ /* determine if the connection need to be closed */
+#if MODULE_MAGIC_NUMBER_MAJOR>=20080722
+ if (conn->close)
+#else
+ if (conn->close_on_recycle || conn->close)
+#endif
+ {
+ apr_pool_t *p = conn->pool;
+ apr_pool_clear(conn->pool);
+ memset(conn, 0, sizeof(proxy_conn_rec));
+ conn->pool = p;
+ conn->worker = worker;
+ }
+#if APR_HAS_THREADS
+ if (worker->hmax && worker->cp->res) {
+ conn->inreslist = 1;
+ apr_reslist_release(worker->cp->res, (void *)conn);
+ }
+ else
+#endif
+ {
+ worker->cp->conn = conn;
+ }
+
+ /* Always return the SUCCESS */
+ return APR_SUCCESS;
+}
+
+/* XXX: Should use the proxy_util one. */
+#if APR_HAS_THREADS
+static apr_status_t conn_pool_cleanup(void *theworker)
+{
+ proxy_worker *worker = (proxy_worker *)theworker;
+ if (worker->cp->res) {
+ worker->cp->pool = NULL;
+ }
+ return APR_SUCCESS;
+}
+#endif
+
+/* XXX: Should use the proxy_util one. */
+static void init_conn_pool(apr_pool_t *p, proxy_worker *worker)
+{
+ apr_pool_t *pool;
+ proxy_conn_pool *cp;
+
+ /*
+ * Create a connection pool's subpool.
+ * This pool is used for connection recycling.
+ * Once the worker is added it is never removed but
+ * it can be disabled.
+ */
+ apr_pool_create(&pool, p);
+ apr_pool_tag(pool, "proxy_worker_cp");
+ /*
+ * Alloc from the same pool as worker.
+ * proxy_conn_pool is permanently attached to the worker.
+ */
+ cp = (proxy_conn_pool *)apr_pcalloc(p, sizeof(proxy_conn_pool));
+ cp->pool = pool;
+ worker->cp = cp;
+}
+
/*
* Create/Get the worker before using it
+ * XXX: Contains code of ap_proxy_initialize_worker (proxy_util.c)
+ * XXX: If something goes wrong the worker can't be used and we leak memory... in a pool
*/
-static void create_worker(proxy_server_conf *conf, proxy_balancer *balancer,
+static apr_status_t create_worker(proxy_server_conf *conf, proxy_balancer *balancer,
server_rec *server, proxy_worker **worker,
nodeinfo_t *node, apr_pool_t *pool)
{
char *url;
char *ptr;
int reuse = 0;
+ apr_status_t rv = APR_SUCCESS;
#if AP_MODULE_MAGIC_AT_LEAST(20051115,4)
#else
proxy_cluster_helper *helperping;
#endif
+#if APR_HAS_THREADS
+ int mpm_threads;
+#endif
/* build the name (scheme and port) when needed */
url = apr_pstrcat(pool, node->mess.Type, "://", node->mess.Host, ":", node->mess.Port, NULL);
@@ -93,9 +250,11 @@
if (err) {
ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0, server,
"Created: worker for %s failed: %s", url, err);
- return;
+ return APR_EGENERAL;
}
(*worker)->opaque = apr_pcalloc(conf->pool, sizeof(proxy_cluster_helper));
+ if (!(*worker)->opaque)
+ return APR_EGENERAL;
helper = (*worker)->opaque;
helper->count_active = 0;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server,
@@ -117,7 +276,7 @@
reuse = 1;
} else {
/* XXX: (*worker)->id ?= node->mess.id; */
- return; /* Done Already existing */
+ return APR_SUCCESS; /* Done Already existing */
}
/* Get the shared memory for this worker */
@@ -150,7 +309,62 @@
(*worker)->is_address_reusable = 1;
(*worker)->acquire = apr_time_make(0, 2 * 1000); /* 2 ms */
(*worker)->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
-
+
+ /* from ap_proxy_initialize_worker() */
+#if APR_HAS_THREADS
+ ap_mpm_query(AP_MPMQ_MAX_THREADS, &mpm_threads);
+ if (mpm_threads > 1) {
+ /* Set hard max to no more then mpm_threads */
+ if ((*worker)->hmax == 0 || (*worker)->hmax > mpm_threads) {
+ (*worker)->hmax = mpm_threads;
+ }
+ if ((*worker)->smax == -1 || (*worker)->smax > (*worker)->hmax) {
+ (*worker)->smax = (*worker)->hmax;
+ }
+ /* Set min to be lower then smax */
+ if ((*worker)->min > (*worker)->smax) {
+ (*worker)->min = (*worker)->smax;
+ }
+ }
+ else {
+ /* This will supress the apr_reslist creation */
+ (*worker)->min = (*worker)->smax = (*worker)->hmax = 0;
+ }
+
+ if ((*worker)->hmax) {
+ rv = apr_reslist_create(&((*worker)->cp->res),
+ (*worker)->min, (*worker)->smax,
+ (*worker)->hmax, (*worker)->ttl,
+ connection_constructor, connection_destructor,
+ (*worker), (*worker)->cp->pool);
+
+ apr_pool_cleanup_register((*worker)->cp->pool, (void *)(*worker),
+ conn_pool_cleanup,
+ apr_pool_cleanup_null);
+
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server,
+ "proxy: initialized worker %d in child %" APR_PID_T_FMT " for (%s) min=%d max=%d smax=%d",
+ (*worker)->id, getpid(), (*worker)->hostname, (*worker)->min,
+ (*worker)->hmax, (*worker)->smax);
+
+#if (APR_MAJOR_VERSION > 0)
+ /* Set the acquire timeout */
+ if (rv == APR_SUCCESS && (*worker)->acquire_set) {
+ apr_reslist_timeout_set((*worker)->cp->res, (*worker)->acquire);
+ }
+#endif
+ }
+ else
+#endif
+ {
+
+ rv = connection_constructor((void **)&((*worker)->cp->conn), (*worker), (*worker)->cp->pool);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server,
+ "proxy: initialized single connection worker %d in child %" APR_PID_T_FMT " for (%s)",
+ (*worker)->id, getpid(), (*worker)->hostname);
+ }
+ /* end from ap_proxy_initialize_worker() */
+
/*
* The Shared datastatus may already contains a valid information
*/
@@ -188,6 +402,7 @@
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server,
"Created: worker for %s %d (status): %d", url, (*worker)->id, (*worker)->s->status);
+ return rv;
}
/*
@@ -408,102 +623,6 @@
}
}
-/* reslist constructor */
-/* XXX: Should use the proxy_util one. */
-static apr_status_t connection_constructor(void **resource, void *params,
- apr_pool_t *pool)
-{
- apr_pool_t *ctx;
- apr_pool_t *scpool;
- proxy_conn_rec *conn;
- proxy_worker *worker = (proxy_worker *)params;
-
- /*
- * Create the subpool for each connection
- * This keeps the memory consumption constant
- * when disconnecting from backend.
- */
- apr_pool_create(&ctx, pool);
- conn = apr_pcalloc(pool, sizeof(proxy_conn_rec));
-
- /*
- * Create another subpool that manages the data for the
- * socket and the connection member of the proxy_conn_rec struct as we
- * destroy this data more frequently than other data in the proxy_conn_rec
- * struct like hostname and addr (at least in the case where we have
- * keepalive connections that timed out).
- */
-#if AP_MODULE_MAGIC_AT_LEAST(20051115,13)
- apr_pool_create(&scpool, ctx);
- apr_pool_tag(scpool, "proxy_conn_scpool");
- conn->scpool = scpool;
-#endif
-
- conn->pool = ctx;
- conn->worker = worker;
-#if APR_HAS_THREADS
- conn->inreslist = 1;
-#endif
- *resource = conn;
-
- return APR_SUCCESS;
-}
-
-/* connection cleanup routine */
-/* XXX: Should use the proxy_util one. */
-static apr_status_t connection_cleanup(void *theconn)
-{
- proxy_conn_rec *conn = (proxy_conn_rec *)theconn;
- proxy_worker *worker = conn->worker;
-
- /*
- * If the connection pool is NULL the worker
- * cleanup has been run. Just return.
- */
- if (!worker->cp) {
- return APR_SUCCESS;
- }
-
-#if APR_HAS_THREADS
- /* Sanity check: Did we already return the pooled connection? */
- if (conn->inreslist) {
- ap_log_perror(APLOG_MARK, APLOG_ERR, 0, conn->pool,
- "proxy: Pooled connection 0x%pp for worker %s has been"
- " already returned to the connection pool.",
- (void *) conn,
- worker->name);
- return APR_SUCCESS;
- }
-#endif
-
- /* determine if the connection need to be closed */
-#if MODULE_MAGIC_NUMBER_MAJOR>=20080722
- if (conn->close)
-#else
- if (conn->close_on_recycle || conn->close)
-#endif
- {
- apr_pool_t *p = conn->pool;
- apr_pool_clear(conn->pool);
- memset(conn, 0, sizeof(proxy_conn_rec));
- conn->pool = p;
- conn->worker = worker;
- }
-#if APR_HAS_THREADS
- if (worker->hmax && worker->cp->res) {
- conn->inreslist = 1;
- apr_reslist_release(worker->cp->res, (void *)conn);
- }
- else
-#endif
- {
- worker->cp->conn = conn;
- }
-
- /* Always return the SUCCESS */
- return APR_SUCCESS;
-}
-
/* Retrieve the parameter with the given name
* Something like 'JSESSIONID=12345...N'
* XXX: Should use the mod_proxy_balancer ones.
16 years, 1 month
JBoss Native SVN: r2064 - in trunk/mod_cluster/src/main/java/org/jboss/modcluster: load/impl and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-11-18 21:00:59 -0500 (Tue, 18 Nov 2008)
New Revision: 2064
Added:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadBalanceFactorProviderConfiguration.java
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProviderMBean.java
Log:
Extract configuration interface
Added: trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadBalanceFactorProviderConfiguration.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadBalanceFactorProviderConfiguration.java (rev 0)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadBalanceFactorProviderConfiguration.java 2008-11-19 02:00:59 UTC (rev 2064)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.modcluster.config;
+
+/**
+ * @author Paul Ferraro
+ *
+ */
+public interface LoadBalanceFactorProviderConfiguration
+{
+ /**
+ * Returns the history count.
+ * @return a positive integer
+ */
+ int getHistory();
+
+ /**
+ * Returns the exponential decay factor.
+ * @return a positive integer
+ */
+ int getDecayFactor();
+}
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProviderMBean.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProviderMBean.java 2008-11-19 01:59:17 UTC (rev 2063)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProviderMBean.java 2008-11-19 02:00:59 UTC (rev 2064)
@@ -21,31 +21,21 @@
*/
package org.jboss.modcluster.load.impl;
+import org.jboss.modcluster.config.LoadBalanceFactorProviderConfiguration;
+
/**
* @author Paul Ferraro
*
*/
-public interface DynamicLoadBalanceFactorProviderMBean
+public interface DynamicLoadBalanceFactorProviderMBean extends LoadBalanceFactorProviderConfiguration
{
/**
- * Returns the history count.
- * @return a positive integer
- */
- int getHistory();
-
- /**
* Sets the number of historical load values to consider when calculating the load balance factor.
* @param history
*/
void setHistory(int history);
/**
- * Returns the exponential decay factor.
- * @return a positive integer
- */
- int getDecayFactor();
-
- /**
* Sets the exponential decay factor to be applied to historical load values.
* @param decayFactor the new decay factor
*/
16 years, 1 month
JBoss Native SVN: r2063 - trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-11-18 20:59:17 -0500 (Tue, 18 Nov 2008)
New Revision: 2063
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java
Log:
allow property setters
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java 2008-11-13 23:01:02 UTC (rev 2062)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java 2008-11-19 01:59:17 UTC (rev 2063)
@@ -21,13 +21,12 @@
*/
package org.jboss.modcluster.load.metric;
-import org.jboss.modcluster.config.LoadMetricConfiguration;
/**
* Represents a specific load metric.
* @author Paul Ferraro
*/
-public interface LoadMetric<C extends LoadContext> extends LoadMetricConfiguration
+public interface LoadMetric<C extends LoadContext> extends LoadMetricMBean
{
/**
* Returns the current load. This value only has meaning when expressed as a ratio of the capacity.
16 years, 1 month
JBoss Native SVN: r2062 - in trunk/mod_cluster/src/main/java/org/jboss/modcluster: load/metric and 1 other directories.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-11-13 18:01:02 -0500 (Thu, 13 Nov 2008)
New Revision: 2062
Added:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadMetricConfiguration.java
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetricMBean.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/AbstractLoadMetric.java
Log:
Cleaned up LoadMetricMBean hierarchy. Extract LoadMetricConfiguration for use by ClusterListener.
Added: trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadMetricConfiguration.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadMetricConfiguration.java (rev 0)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/LoadMetricConfiguration.java 2008-11-13 23:01:02 UTC (rev 2062)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.modcluster.config;
+
+
+/**
+ * @author Paul Ferraro
+ *
+ */
+public interface LoadMetricConfiguration
+{
+ /**
+ * Returns the "weight" of this metric, i.e. significance of this load metric compared to the other metrics.
+ * @return the weight of the metric
+ */
+ int getWeight();
+
+ /**
+ * Returns the load capacity of this metric.
+ * Used to normalize the value returned by {@link #getLoad()} expressed as a percentage of the capacity, such that:
+ * 0 <= ({@link #getLoad()} / {@link #getCapacity()}) < 1
+ * @return the estimated capacity of this metric.
+ */
+ double getCapacity();
+}
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java 2008-11-13 22:08:21 UTC (rev 2061)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java 2008-11-13 23:01:02 UTC (rev 2062)
@@ -21,32 +21,24 @@
*/
package org.jboss.modcluster.load.metric;
+import org.jboss.modcluster.config.LoadMetricConfiguration;
+
/**
* Represents a specific load metric.
* @author Paul Ferraro
*/
-public interface LoadMetric<C extends LoadContext>
+public interface LoadMetric<C extends LoadContext> extends LoadMetricConfiguration
{
/**
- * Returns the "weight" of this metric, i.e. significance of this load metric compared to the other metrics.
- * @return the weight of the metric
- */
- int getWeight();
-
- /**
- * Returns the load capacity of this metric.
- * Used to normalize the value returned by {@link #getLoad()} expressed as a percentage of the capacity, such that:
- * 0 <= ({@link #getLoad()} / {@link #getCapacity()}) < 1
- * @return the estimated capacity of this metric.
- */
- double getCapacity();
-
- /**
* Returns the current load. This value only has meaning when expressed as a ratio of the capacity.
* @return the current load.
* @throws Exception if there was an error fetching this metric.
*/
double getLoad(C context) throws Exception;
+ /**
+ * The source of this metric's load context.
+ * @return a load metric source
+ */
LoadMetricSource<C> getSource();
}
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetricMBean.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetricMBean.java 2008-11-13 22:08:21 UTC (rev 2061)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetricMBean.java 2008-11-13 23:01:02 UTC (rev 2062)
@@ -21,12 +21,14 @@
*/
package org.jboss.modcluster.load.metric;
+import org.jboss.modcluster.config.LoadMetricConfiguration;
+
/**
* @author Paul Ferraro
*
*/
-public interface LoadMetricMBean<C extends LoadContext> extends LoadMetric<C>
+public interface LoadMetricMBean extends LoadMetricConfiguration
{
void setWeight(int weight);
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/AbstractLoadMetric.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/AbstractLoadMetric.java 2008-11-13 22:08:21 UTC (rev 2061)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/AbstractLoadMetric.java 2008-11-13 23:01:02 UTC (rev 2062)
@@ -30,7 +30,7 @@
*
* @author Paul Ferraro
*/
-public abstract class AbstractLoadMetric<C extends LoadContext> implements LoadMetricMBean<C>
+public abstract class AbstractLoadMetric<C extends LoadContext> implements LoadMetric<C>, LoadMetricMBean
{
private volatile int weight = 1;
private volatile double capacity = 1;
16 years, 1 month
JBoss Native SVN: r2061 - in trunk/mod_cluster/src/main/java/org/jboss/modcluster: load/metric/impl and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-11-13 17:08:21 -0500 (Thu, 13 Nov 2008)
New Revision: 2061
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/RequestProcessorLoadMetricSource.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/SessionLoadMetricSource.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/ThreadPoolLoadMetricSource.java
Log:
Support default Tomcat object names.
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java 2008-11-13 00:00:27 UTC (rev 2060)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java 2008-11-13 22:08:21 UTC (rev 2061)
@@ -165,6 +165,11 @@
return (serverType == ServerType.JBOSSWEB) ? new MCMPJBURLEncoder() : new MCMPTCURLEncoder();
}
+ public static String defaultObjectNameDomain()
+ {
+ return (serverType == ServerType.JBOSSWEB) ? "jboss.web" : "Catalina";
+ }
+
public static void establishJvmRouteAndConnectorAddress(Engine engine, MCMPHandler mcmpHandler) throws IOException
{
Connector connector = findProxyConnector(engine.getService().findConnectors());
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/RequestProcessorLoadMetricSource.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/RequestProcessorLoadMetricSource.java 2008-11-13 00:00:27 UTC (rev 2060)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/RequestProcessorLoadMetricSource.java 2008-11-13 22:08:21 UTC (rev 2061)
@@ -24,6 +24,7 @@
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
+import org.jboss.modcluster.Utils;
import org.jboss.modcluster.load.metric.LoadMetricSource;
/**
@@ -34,7 +35,7 @@
*/
public class RequestProcessorLoadMetricSource extends MBeanQueryLoadMetricSource
{
- public static final String DEFAULT_PATTERN = "jboss.web:type=GlobalRequestProcessor,*";
+ public static final String DEFAULT_PATTERN = Utils.defaultObjectNameDomain() + ":type=GlobalRequestProcessor,*";
/**
* Create a new GlobalRequestProcessorLoadMetricSource.
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/SessionLoadMetricSource.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/SessionLoadMetricSource.java 2008-11-13 00:00:27 UTC (rev 2060)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/SessionLoadMetricSource.java 2008-11-13 22:08:21 UTC (rev 2061)
@@ -24,6 +24,7 @@
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
+import org.jboss.modcluster.Utils;
import org.jboss.modcluster.load.metric.LoadMetricSource;
/**
@@ -34,7 +35,7 @@
*/
public class SessionLoadMetricSource extends MBeanQueryLoadMetricSource
{
- public static final String DEFAULT_PATTERN = "jboss.web:type=Manager,*";
+ public static final String DEFAULT_PATTERN = Utils.defaultObjectNameDomain() + ":type=Manager,*";
/**
* Create a new SessionLoadMetricSource.
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/ThreadPoolLoadMetricSource.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/ThreadPoolLoadMetricSource.java 2008-11-13 00:00:27 UTC (rev 2060)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/ThreadPoolLoadMetricSource.java 2008-11-13 22:08:21 UTC (rev 2061)
@@ -24,6 +24,7 @@
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
+import org.jboss.modcluster.Utils;
import org.jboss.modcluster.load.metric.LoadMetricSource;
/**
@@ -34,7 +35,7 @@
*/
public class ThreadPoolLoadMetricSource extends MBeanQueryLoadMetricSource
{
- public static final String DEFAULT_PATTERN = "jboss.web:type=ThreadPool,*";
+ public static final String DEFAULT_PATTERN = Utils.defaultObjectNameDomain() + ":type=ThreadPool,*";
/**
* Create a new ThreadPoolLoadMetricSource.
16 years, 1 month
JBoss Native SVN: r2060 - trunk/mod_cluster/src/main/java/org/jboss/modcluster/config.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-11-12 19:00:27 -0500 (Wed, 12 Nov 2008)
New Revision: 2060
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/BalancerConfiguration.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/MCMPHandlerConfiguration.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/ModClusterConfig.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/NodeConfiguration.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/SSLConfiguration.java
Log:
Moved javadocs to interfaces
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/BalancerConfiguration.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/BalancerConfiguration.java 2008-11-06 12:48:17 UTC (rev 2059)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/BalancerConfiguration.java 2008-11-13 00:00:27 UTC (rev 2060)
@@ -28,13 +28,28 @@
*/
public interface BalancerConfiguration
{
+ /**
+ * Enables sticky sessions.
+ */
boolean getStickySession();
+ /**
+ * Remove session when the request cannot be routed to the right node.
+ */
boolean getStickySessionRemove();
+ /**
+ * Return an error when the request cannot be routed to the right node.
+ */
boolean getStickySessionForce();
+ /**
+ * Timeout to wait for an available worker (default is no wait).
+ */
int getWorkerTimeout();
+ /**
+ * Maximum number of attempts to send the request to the backend server.
+ */
int getMaxAttempts();
}
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/MCMPHandlerConfiguration.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/MCMPHandlerConfiguration.java 2008-11-06 12:48:17 UTC (rev 2059)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/MCMPHandlerConfiguration.java 2008-11-13 00:00:27 UTC (rev 2060)
@@ -30,21 +30,49 @@
*/
public interface MCMPHandlerConfiguration extends SSLConfiguration
{
+ /**
+ * Proxy list, format "address:port,address:port".
+ */
String getProxyList();
+ /**
+ * URL prefix.
+ */
String getProxyURL();
-
+
+ /**
+ * Connection timeout for communication with the proxy.
+ */
int getSocketTimeout();
+ /**
+ * SSL client cert usage to connect to the proxy.
+ */
boolean isSsl();
+ /**
+ * Receive advertisements from httpd proxies (default is to use advertisements
+ * if the proxyList is not set).
+ */
Boolean getAdvertise();
-
+
+ /**
+ * Advertise group.
+ */
String getAdvertiseGroupAddress();
-
+
+ /**
+ * Advertise port.
+ */
int getAdvertisePort();
-
+
+ /**
+ * Advertise security key.
+ */
String getAdvertiseSecurityKey();
+ /**
+ * Should clustered service use a singleton master per domain.
+ */
boolean isMasterPerDomain();
}
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/ModClusterConfig.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/ModClusterConfig.java 2008-11-06 12:48:17 UTC (rev 2059)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/ModClusterConfig.java 2008-11-13 00:00:27 UTC (rev 2060)
@@ -38,195 +38,101 @@
{
// ----------------------------------------------- MCMPHandlerConfiguration
- /**
- * Receive advertisements from httpd proxies (default is to use advertisements
- * if the proxyList is not set).
- */
private Boolean advertise;
public Boolean getAdvertise() { return this.advertise; }
public void setAdvertise(Boolean advertise) { this.advertise = advertise; }
-
- /**
- * Advertise group.
- */
private String advertiseGroupAddress = null;
public String getAdvertiseGroupAddress() { return this.advertiseGroupAddress; }
public void setAdvertiseGroupAddress(String advertiseGroupAddress) { this.advertiseGroupAddress = advertiseGroupAddress; }
-
- /**
- * Advertise port.
- */
private int advertisePort = -1;
public int getAdvertisePort() { return this.advertisePort; }
public void setAdvertisePort(int advertisePort) { this.advertisePort = advertisePort; }
-
- /**
- * Advertise security key.
- */
private String advertiseSecurityKey = null;
public String getAdvertiseSecurityKey() { return this.advertiseSecurityKey; }
public void setAdvertiseSecurityKey(String advertiseSecurityKey) { this.advertiseSecurityKey = advertiseSecurityKey; }
-
- /**
- * Proxy list, format "address:port,address:port".
- */
private String proxyList = null;
public String getProxyList() { return this.proxyList; }
public void setProxyList(String proxyList) { this.proxyList = proxyList; }
-
- /**
- * URL prefix.
- */
private String proxyURL = null;
public String getProxyURL() { return this.proxyURL; }
public void setProxyURL(String proxyURL) { this.proxyURL = proxyURL; }
-
- /**
- * Connection timeout for communication with the proxy.
- */
private int socketTimeout = 20000;
public int getSocketTimeout() { return this.socketTimeout; }
public void setSocketTimeout(int socketTimeout) { this.socketTimeout = socketTimeout; }
- /**
- * Should clustered service use a singleton master per domain.
- */
+ private boolean ssl = false;
+ public boolean isSsl() { return this.ssl; }
+ public void setSsl(boolean ssl) { this.ssl = ssl; }
+
private boolean masterPerDomain = false;
public boolean isMasterPerDomain() { return this.masterPerDomain; }
public void setMasterPerDomain(boolean masterPerDomain) { this.masterPerDomain = masterPerDomain; }
// ----------------------------------------------------- SSLConfiguration
-
- /**
- * SSL client cert usage to connect to the proxy.
- */
- private boolean ssl = false;
- public boolean isSsl() { return this.ssl; }
- public void setSsl(boolean ssl) { this.ssl = ssl; }
-
- /**
- * SSL ciphers.
- */
private String sslCiphers = null;
public String getSslCiphers() { return this.sslCiphers; }
public void setSslCiphers(String sslCiphers) { this.sslCiphers = sslCiphers; }
-
- /**
- * SSL protocol.
- */
private String sslProtocol = "TLS";
public String getSslProtocol() { return this.sslProtocol; }
public void setSslProtocol(String sslProtocol) { this.sslProtocol = sslProtocol; }
-
- /**
- * Certificate encoding algorithm.
- */
private String sslCertificateEncodingAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
public String getSslCertificateEncodingAlgorithm() { return this.sslCertificateEncodingAlgorithm; }
public void setSslCertificateEncodingAlgorithm(String sslCertificateEncodingAlgorithm) { this.sslCertificateEncodingAlgorithm = sslCertificateEncodingAlgorithm; }
-
- /**
- * SSL keystore.
- */
private String sslKeyStore = System.getProperty("user.home") + "/.keystore";
public String getSslKeyStore() { return this.sslKeyStore; }
public void setSslKeyStore(String sslKeyStore) { this.sslKeyStore = sslKeyStore; }
-
- /**
- * SSL keystore password.
- */
private String sslKeyStorePass = "changeit";
public String getSslKeyStorePass() { return this.sslKeyStorePass; }
public void setSslKeyStorePass(String sslKeyStorePass) { this.sslKeyStorePass = sslKeyStorePass; }
-
- /**
- * Keystore type.
- */
private String sslKeyStoreType = "JKS";
public String getSslKeyStoreType() { return this.sslKeyStoreType; }
public void setSslKeyStoreType(String sslKeyStoreType) { this.sslKeyStoreType = sslKeyStoreType; }
-
- /**
- * Keystore provider.
- */
private String sslKeyStoreProvider = null;
public String getSslKeyStoreProvider() { return this.sslKeyStoreProvider; }
public void setSslKeyStoreProvider(String sslKeyStoreProvider) { this.sslKeyStoreProvider = sslKeyStoreProvider; }
-
- /**
- * Truststore algorithm.
- */
private String sslTrustAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
public String getSslTrustAlgorithm() { return this.sslTrustAlgorithm; }
public void setSslTrustAlgorithm(String sslTrustAlgorithm) { this.sslTrustAlgorithm = sslTrustAlgorithm; }
-
- /**
- * Key alias.
- */
private String sslKeyAlias = null;
public String getSslKeyAlias() { return this.sslKeyAlias; }
public void setSslKeyAlias(String sslKeyAlias) { this.sslKeyAlias = sslKeyAlias; }
-
- /**
- * Certificate revocation list.
- */
private String sslCrlFile = null;
public String getSslCrlFile() { return this.sslCrlFile; }
public void setSslCrlFile(String sslCrlFile) { this.sslCrlFile = sslCrlFile; }
-
- /**
- * Trust max certificate length.
- */
private int sslTrustMaxCertLength = 5;
public int getSslTrustMaxCertLength() { return this.sslTrustMaxCertLength; }
public void setSslTrustMaxCertLength(int sslTrustMaxCertLength) { this.sslTrustMaxCertLength = sslTrustMaxCertLength; }
-
- /**
- * Trust store file.
- */
private String sslTrustStore = System.getProperty("javax.net.ssl.trustStore");
public String getSslTrustStore() { return this.sslTrustStore; }
public void setSslTrustStore(String sslTrustStore) { this.sslTrustStore = sslTrustStore; }
-
- /**
- * Trust store password.
- */
private String sslTrustStorePassword = System.getProperty("javax.net.ssl.trustStorePassword");
public String getSslTrustStorePassword() { return this.sslTrustStorePassword; }
public void setSslTrustStorePassword(String sslTrustStorePassword) { this.sslTrustStorePassword = sslTrustStorePassword; }
-
- /**
- * Trust store type.
- */
private String sslTrustStoreType = System.getProperty("javax.net.ssl.trustStoreType");
public String getSslTrustStoreType() { return this.sslTrustStoreType; }
public void setSslTrustStoreType(String sslTrustStoreType) { this.sslTrustStoreType = sslTrustStoreType; }
-
- /**
- * Trust store provider.
- */
private String sslTrustStoreProvider = System.getProperty("javax.net.ssl.trustStoreProvider");
public String getSslTrustStoreProvider() { return this.sslTrustStoreProvider; }
public void setSslTrustStoreProvider(String sslTrustStoreProvider) { this.sslTrustStoreProvider = sslTrustStoreProvider; }
@@ -234,107 +140,56 @@
// ----------------------------------------------------- NodeConfiguration
-
- /**
- * Domain parameter, which allows tying a jvmRoute to a particular domain.
- */
private String domain = null;
public String getDomain() { return this.domain; }
public void setDomain(String domain) { this.domain = domain; }
-
- /**
- * Allows controlling flushing of packets.
- */
private boolean flushPackets = false;
public boolean getFlushPackets() { return this.flushPackets; }
public void setFlushPackets(boolean flushPackets) { this.flushPackets = flushPackets; }
-
- /**
- * Time to wait before flushing packets.
- */
private int flushWait = -1;
public int getFlushWait() { return this.flushWait; }
public void setFlushWait(int flushWait) { this.flushWait = flushWait; }
-
- /**
- * Time to wait for a pong answer to a ping.
- */
private int ping = -1;
public int getPing() { return this.ping; }
public void setPing(int ping) { this.ping = ping; }
-
- /**
- * Soft maximum inactive connection count.
- */
private int smax = -1;
public int getSmax() { return this.smax; }
public void setSmax(int smax) { this.smax = smax; }
-
- /**
- * Maximum time on seconds for idle connections above smax.
- */
private int ttl = -1;
public int getTtl() { return this.ttl; }
public void setTtl(int ttl) { this.ttl = ttl; }
-
- /**
- * Maximum time on seconds for idle connections the proxy will wait to connect to the node.
- */
private int nodeTimeout = -1;
public int getNodeTimeout() { return this.nodeTimeout; }
public void setNodeTimeout(int nodeTimeout) { this.nodeTimeout = nodeTimeout; }
-
- /**
- * Name of the balancer.
- */
private String balancer = null;
public String getBalancer() { return this.balancer; }
public void setBalancer(String balancer) { this.balancer = balancer; }
// ------------------------------------------------- BalancerConfiguration
- /**
- * Enables sticky sessions.
- */
private boolean stickySession = true;
public boolean getStickySession() { return this.stickySession; }
public void setStickySession(boolean stickySession) { this.stickySession = stickySession; }
-
- /**
- * Remove session when the request cannot be routed to the right node.
- */
private boolean stickySessionRemove = false;
public boolean getStickySessionRemove() { return this.stickySessionRemove; }
public void setStickySessionRemove(boolean stickySessionRemove) { this.stickySessionRemove = stickySessionRemove; }
-
- /**
- * Return an error when the request cannot be routed to the right node.
- */
private boolean stickySessionForce = true;
public boolean getStickySessionForce() { return this.stickySessionForce; }
public void setStickySessionForce(boolean stickySessionForce) { this.stickySessionForce = stickySessionForce; }
-
- /**
- * Timeout to wait for an available worker (default is no wait).
- */
private int workerTimeout = -1;
public int getWorkerTimeout() { return this.workerTimeout; }
public void setWorkerTimeout(int workerTimeout) { this.workerTimeout = workerTimeout; }
-
- /**
- * Maximum number of attempts to send the request to the backend server.
- */
private int maxAttempts = -1;
public int getMaxAttempts() { return this.maxAttempts; }
public void setMaxAttempts(int maxAttempts) { this.maxAttempts = maxAttempts; }
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/NodeConfiguration.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/NodeConfiguration.java 2008-11-06 12:48:17 UTC (rev 2059)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/NodeConfiguration.java 2008-11-13 00:00:27 UTC (rev 2060)
@@ -26,21 +26,43 @@
public interface NodeConfiguration extends LoadBalanceFactorProvider
{
- int getSocketTimeout();
-
+ /**
+ * Domain parameter, which allows tying a jvmRoute to a particular domain.
+ */
String getDomain();
+ /**
+ * Allows controlling flushing of packets.
+ */
boolean getFlushPackets();
+ /**
+ * Time to wait before flushing packets.
+ */
int getFlushWait();
+ /**
+ * Time to wait for a pong answer to a ping.
+ */
int getPing();
+ /**
+ * Soft maximum inactive connection count.
+ */
int getSmax();
+ /**
+ * Maximum time on seconds for idle connections above smax.
+ */
int getTtl();
+ /**
+ * Maximum time on seconds for idle connections the proxy will wait to connect to the node.
+ */
int getNodeTimeout();
+ /**
+ * Name of the balancer.
+ */
String getBalancer();
}
\ No newline at end of file
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/SSLConfiguration.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/SSLConfiguration.java 2008-11-06 12:48:17 UTC (rev 2059)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/config/SSLConfiguration.java 2008-11-13 00:00:27 UTC (rev 2060)
@@ -30,20 +30,79 @@
*/
public interface SSLConfiguration
{
+ /**
+ * SSL ciphers.
+ */
String getSslCiphers();
+
+ /**
+ * SSL protocol.
+ */
String getSslProtocol();
+
+ /**
+ * Certificate encoding algorithm.
+ */
String getSslCertificateEncodingAlgorithm();
+
+ /**
+ * SSL keystore.
+ */
String getSslKeyStore();
+
+ /**
+ * SSL keystore password.
+ */
String getSslKeyStorePass();
+
+ /**
+ * Keystore type.
+ */
String getSslKeyStoreType();
+
+ /**
+ * Keystore provider.
+ */
String getSslKeyStoreProvider();
+
+ /**
+ * Truststore algorithm.
+ */
String getSslTrustAlgorithm();
+
+ /**
+ * Key alias.
+ */
String getSslKeyAlias();
+
+ /**
+ * Certificate revocation list.
+ */
String getSslCrlFile();
+
+ /**
+ * Trust max certificate length.
+ */
int getSslTrustMaxCertLength();
+
+ /**
+ * Trust store file.
+ */
String getSslTrustStore();
+
+ /**
+ * Trust store password.
+ */
String getSslTrustStorePassword();
+
+ /**
+ * Trust store type.
+ */
String getSslTrustStoreType();
+
+ /**
+ * Trust store provider.
+ */
String getSslTrustStoreProvider();
}
16 years, 1 month
JBoss Native SVN: r2059 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-11-06 07:48:17 -0500 (Thu, 06 Nov 2008)
New Revision: 2059
Modified:
trunk/build/unix/package.list
Log:
2.1.0 is dev version
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2008-11-06 10:39:14 UTC (rev 2058)
+++ trunk/build/unix/package.list 2008-11-06 12:48:17 UTC (rev 2059)
@@ -7,7 +7,7 @@
jboss-native|2.0.5|TOMCAT_NATIVE_1_1_15|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8h|zlib:v:1.2.3
jboss-native|2.0.6-mac|TOMCAT_NATIVE_1_1_16|apr:v:1.3.3|apu:v:1.3.4|api:v:1.2.1|ssl:v:0.9.8i|zlib:v:1.2.3
jboss-native|2.0.6|TOMCAT_NATIVE_1_1_16|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1|ssl:v:0.9.8i|zlib:v:1.2.3
-jboss-native|2.1.0|trunk|apr:v:1.3.3|apu:v:1.3.4|api:v:1.2.1|ssl:v:0.9.8i|zlib:v:1.2.3
+jboss-native|2.1.0-dev|trunk|apr:v:1.3.3|apu:v:1.3.4|api:v:1.2.1|ssl:v:0.9.8i|zlib:v:1.2.3
# SIGHT
jboss-sight|1.0.0|trunk|apr:v:1.2.9|apu:v:1.2.8|api:v:1.2.1
jboss-sight|1.0.1|trunk|apr:v:1.2.8|apu:v:1.2.8|api:v:1.2.1
16 years, 2 months