JBoss Native SVN: r1571 - in sandbox/httpd/src/native: mod_manager and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-30 05:24:39 -0400 (Wed, 30 Apr 2008)
New Revision: 1571
Modified:
sandbox/httpd/src/native/common/context.c
sandbox/httpd/src/native/mod_manager/mod_manager.c
Log:
Improve the context "key" logic.
Modified: sandbox/httpd/src/native/common/context.c
===================================================================
--- sandbox/httpd/src/native/common/context.c 2008-04-30 09:23:43 UTC (rev 1570)
+++ sandbox/httpd/src/native/common/context.c 2008-04-30 09:24:39 UTC (rev 1571)
@@ -87,7 +87,8 @@
{
contextinfo_t *in = (contextinfo_t *)*data;
contextinfo_t *ou = (contextinfo_t *)mem;
- if (strcmp(in->context, ou->context) == 0 && in->vhost == ou->vhost) {
+ if (strcmp(in->context, ou->context) == 0 &&
+ in->vhost == ou->vhost && in->node == ou->node) {
memcpy(ou, in, sizeof(contextinfo_t));
ou->id = id;
ou->updatetime = apr_time_sec(apr_time_now());
@@ -129,7 +130,8 @@
static apr_status_t loc_read_context(void* mem, void **data, int id, apr_pool_t *pool) {
contextinfo_t *in = (contextinfo_t *)*data;
contextinfo_t *ou = (contextinfo_t *)mem;
- if (strcmp(in->context, ou->context) == 0 && in->vhost == ou->vhost) {
+ if (strcmp(in->context, ou->context) == 0 &&
+ in->vhost == ou->vhost && ou->node == in->node) {
*data = ou;
return APR_SUCCESS;
}
Modified: sandbox/httpd/src/native/mod_manager/mod_manager.c
===================================================================
--- sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-30 09:23:43 UTC (rev 1570)
+++ sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-30 09:24:39 UTC (rev 1571)
@@ -429,8 +429,9 @@
for (i=0; i<size; i++) {
nodeinfo_t *ou;
get_node(nodestatsmem, &ou, id[i]);
- ap_rprintf(r, "node: [%d:%d] %s %s %s %s %s\n", id[i], ou->mess.id, ou->mess.JVMRoute, ou->mess.Domain,
- ou->mess.Host, ou->mess.Port, ou->mess.Type);
+ ap_rprintf(r, "node: [%d:%d] JVMRoute: %s Domain: [%s] Host: %s Port: %s Type: %s\n",
+ id[i], ou->mess.id, ou->mess.JVMRoute, ou->mess.Domain,
+ ou->mess.Host, ou->mess.Port, ou->mess.Type);
}
size = get_max_size_host(hoststatsmem);
@@ -439,7 +440,7 @@
for (i=0; i<size; i++) {
hostinfo_t *ou;
get_host(hoststatsmem, &ou, id[i]);
- ap_rprintf(r, "host: %d [%s] %d %d\n", id[i], ou->host, ou->vhost,
+ ap_rprintf(r, "host: %d [%s] vhost: %d node: %d\n", id[i], ou->host, ou->vhost,
ou->node);
}
@@ -449,8 +450,9 @@
for (i=0; i<size; i++) {
contextinfo_t *ou;
get_context(contextstatsmem, &ou, id[i]);
- ap_rprintf(r, "context: %d [%s] %d %d status: %d\n", id[i], ou->context, ou->vhost,
- ou->node, ou->status);
+ ap_rprintf(r, "context: %d [%s] vhost: %d node: %d status: %d\n", id[i], ou->context,
+ ou->vhost, ou->node,
+ ou->status);
}
return OK;
}
16 years, 8 months
JBoss Native SVN: r1570 - sandbox/httpd/src/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-30 05:23:43 -0400 (Wed, 30 Apr 2008)
New Revision: 1570
Modified:
sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Remove useless trace.
Modified: sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-04-30 09:19:58 UTC (rev 1569)
+++ sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-04-30 09:23:43 UTC (rev 1570)
@@ -849,8 +849,6 @@
/* search for the worker */
worker = (proxy_worker *)conf->workers->elts;
for (i = 0; i < conf->workers->nelts; i++) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy_cluster_isup: %d JVMRoute: %s", worker->id, worker->s->route);
if (worker->id == id)
break;
}
16 years, 8 months
JBoss Native SVN: r1569 - sandbox/httpd/src/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-30 05:19:58 -0400 (Wed, 30 Apr 2008)
New Revision: 1569
Modified:
sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Prevent zero divisions.
Modified: sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-04-30 09:18:36 UTC (rev 1568)
+++ sandbox/httpd/src/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-04-30 09:19:58 UTC (rev 1569)
@@ -512,8 +512,11 @@
* not in error state or not disabled.
*/
if (PROXY_WORKER_IS_USABLE(worker) && iscontext_host_ok(r, balancer, worker)) {
- mytraffic = (worker->s->transferred/worker->s->lbfactor) +
- (worker->s->read/worker->s->lbfactor);
+ if (worker->s->lbfactor <= 0)
+ mytraffic = curmin;
+ else
+ mytraffic = (worker->s->transferred/worker->s->lbfactor) +
+ (worker->s->read/worker->s->lbfactor);
if (!mycandidate || mytraffic < curmin) {
mycandidate = worker;
curmin = mytraffic;
@@ -846,6 +849,8 @@
/* search for the worker */
worker = (proxy_worker *)conf->workers->elts;
for (i = 0; i < conf->workers->nelts; i++) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "proxy_cluster_isup: %d JVMRoute: %s", worker->id, worker->s->route);
if (worker->id == id)
break;
}
16 years, 8 months
JBoss Native SVN: r1568 - sandbox/httpd/src/java.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-30 05:18:36 -0400 (Wed, 30 Apr 2008)
New Revision: 1568
Modified:
sandbox/httpd/src/java/TestHttpClient.java
Log:
Add commented out Reversed logic parameter.
Modified: sandbox/httpd/src/java/TestHttpClient.java
===================================================================
--- sandbox/httpd/src/java/TestHttpClient.java 2008-04-25 14:00:45 UTC (rev 1567)
+++ sandbox/httpd/src/java/TestHttpClient.java 2008-04-30 09:18:36 UTC (rev 1568)
@@ -58,6 +58,7 @@
pm.addParameter("Host", Host);
pm.addParameter("Port", "8009");
pm.addParameter("Type", "ajp");
+ // pm.addParameter("Reversed", "yes");
pm.addParameter("Context", "/hisapp,/ourapp");
}
else if (command.compareToIgnoreCase("DUMP")==0) {
16 years, 8 months
JBoss Native SVN: r1567 - sandbox/httpd/src/java.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-25 10:00:45 -0400 (Fri, 25 Apr 2008)
New Revision: 1567
Modified:
sandbox/httpd/src/java/TestHttpClient.java
sandbox/httpd/src/java/TestHttpClient.sh
Log:
Make it more flexible.
Modified: sandbox/httpd/src/java/TestHttpClient.java
===================================================================
--- sandbox/httpd/src/java/TestHttpClient.java 2008-04-25 11:51:16 UTC (rev 1566)
+++ sandbox/httpd/src/java/TestHttpClient.java 2008-04-25 14:00:45 UTC (rev 1567)
@@ -4,6 +4,8 @@
public class TestHttpClient
{
+ public static String JVMRoute = System.getProperty("JVMRoute", "node1");
+ public static String Host = System.getProperty("Host", "localhost");
/**
*
* Usage:
@@ -14,7 +16,7 @@
* Argument 1 is the command to execute.
*
*/
- public static void main(String[] args) throws Exception
+ public static void main(String[] args) throws Exception
{
if (args.length != 2)
{
@@ -30,30 +32,30 @@
PostMethod pm = null;
if (command.compareToIgnoreCase("ENABLE")==0) {
pm = (PostMethod) new EnableMethod(URL);
- pm.addParameter("JVMRoute","node1");
+ pm.addParameter("JVMRoute", JVMRoute);
pm.addParameter("context", "/myapp");
System.out.println("ENABLE");
}
else if (command.compareToIgnoreCase("DISABLE")==0) {
pm = (PostMethod) new DisableMethod(URL);
- pm.addParameter("JVMRoute","node1");
+ pm.addParameter("JVMRoute", JVMRoute);
pm.addParameter("context", "/myapp");
}
else if (command.compareToIgnoreCase("STOP")==0) {
pm = (PostMethod) new StopMethod(URL);
- pm.addParameter("JVMRoute","node1");
+ pm.addParameter("JVMRoute", JVMRoute);
pm.addParameter("context", "/myapp");
}
else if (command.compareToIgnoreCase("REMOVE")==0) {
pm = (PostMethod) new RemoveMethod(URL);
- pm.addParameter("JVMRoute","node1");
+ pm.addParameter("JVMRoute", JVMRoute);
pm.addParameter("context", "/hisapp");
}
else if (command.compareToIgnoreCase("CONFIG")==0) {
pm = (PostMethod) new ConfigMethod(URL);
- pm.addParameter("JVMRoute","node1");
+ pm.addParameter("JVMRoute", JVMRoute);
pm.addParameter("Domain", "domain1");
- pm.addParameter("Host", "localhost");
+ pm.addParameter("Host", Host);
pm.addParameter("Port", "8009");
pm.addParameter("Type", "ajp");
pm.addParameter("Context", "/hisapp,/ourapp");
@@ -63,7 +65,7 @@
}
else if (command.compareToIgnoreCase("STATUS")==0) {
pm = (PostMethod) new StatusMethod(URL);
- pm.addParameter("JVMRoute","node1");
+ pm.addParameter("JVMRoute", JVMRoute);
pm.addParameter("Load", "50");
}
else
@@ -83,7 +85,7 @@
System.out.println("response: " + httpResponseCode);
System.out.println("response: " + pm.getStatusLine());
int len = (int) pm.getResponseContentLength();
- System.out.println("response: " + pm.getResponseBodyAsString(len));
+ System.out.println("response:\n" + pm.getResponseBodyAsString(len));
} catch(HttpException e) {
e.printStackTrace();
}
Modified: sandbox/httpd/src/java/TestHttpClient.sh
===================================================================
--- sandbox/httpd/src/java/TestHttpClient.sh 2008-04-25 11:51:16 UTC (rev 1566)
+++ sandbox/httpd/src/java/TestHttpClient.sh 2008-04-25 14:00:45 UTC (rev 1567)
@@ -16,21 +16,28 @@
javac -classpath $CLASSES:. TestHttpClient.java
CLASSES=$CLASSES:$HOME/java/commons-logging-1.0.4/commons-logging.jar:$HOME/java/commons-codec-1.3/commons-codec-1.3.jar:.
+HTTPD=jfcpc
+JVMROUTE=neo
+HOST=neo
+SCHEME=http
+SECURITY="-Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=changeit -Djavax.net.ssl.keyStoreType=\"PKCS12\""
+
+
# Send a CONFIG command.
-java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ CONFIG
+java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ CONFIG
-java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ DUMP
+java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ DUMP
# Send a ENABLE for /myapp
-java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ ENABLE
+java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ ENABLE
-java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ DUMP
+java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ DUMP
# Send a REMOVE for /hisapp
-java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ REMOVE
+java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ REMOVE
-java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ DUMP
+java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ DUMP
-java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ STATUS
+java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ STATUS
-#java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ INFO
+#java ${SECURITY} -classpath $CLASSES -DJVMRoute=${JVMROUTE} -DHost=${HOST} TestHttpClient ${SCHEME}://${HTTPD}:6666/test_bla/ INFO
16 years, 8 months
JBoss Native SVN: r1566 - sandbox/httpd/src/java.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-25 07:51:16 -0400 (Fri, 25 Apr 2008)
New Revision: 1566
Added:
sandbox/httpd/src/java/InfoMethod.java
Log:
Add missing file.
Added: sandbox/httpd/src/java/InfoMethod.java
===================================================================
--- sandbox/httpd/src/java/InfoMethod.java (rev 0)
+++ sandbox/httpd/src/java/InfoMethod.java 2008-04-25 11:51:16 UTC (rev 1566)
@@ -0,0 +1,9 @@
+import org.apache.commons.httpclient.methods.PostMethod;
+public class InfoMethod extends PostMethod {
+ public String getName() {
+ return "INFO";
+ }
+ public InfoMethod(String uri) {
+ super(uri);
+ }
+}
16 years, 8 months
JBoss Native SVN: r1565 - sandbox/httpd/src/java.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-25 06:48:18 -0400 (Fri, 25 Apr 2008)
New Revision: 1565
Added:
sandbox/httpd/src/java/TestHttpClient.sh
Log:
Add the test examples.
Added: sandbox/httpd/src/java/TestHttpClient.sh
===================================================================
--- sandbox/httpd/src/java/TestHttpClient.sh (rev 0)
+++ sandbox/httpd/src/java/TestHttpClient.sh 2008-04-25 10:48:18 UTC (rev 1565)
@@ -0,0 +1,36 @@
+#
+# Copyright 2008 Red Hat Middleware, LLC.
+# Licensed 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,i
+# 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.
+#
+CLASSES=$HOME/java/commons-httpclient-3.1/commons-httpclient-3.1.jar
+javac -classpath $CLASSES *Method.java
+javac -classpath $CLASSES:. TestHttpClient.java
+CLASSES=$CLASSES:$HOME/java/commons-logging-1.0.4/commons-logging.jar:$HOME/java/commons-codec-1.3/commons-codec-1.3.jar:.
+
+# Send a CONFIG command.
+java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ CONFIG
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ DUMP
+
+# Send a ENABLE for /myapp
+java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ ENABLE
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ DUMP
+
+# Send a REMOVE for /hisapp
+java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ REMOVE
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ DUMP
+
+java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ STATUS
+
+#java -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.keyStore=$HOME/CERTS/demoCA/test.p12 -Djavax.net.ssl.keyStorePassword=adelina -Djavax.net.ssl.keyStoreType="PKCS12" -classpath $CLASSES TestHttpClient https://localhost:6666/test_bla/ INFO
16 years, 8 months
JBoss Native SVN: r1564 - sandbox/httpd/src/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-25 05:02:41 -0400 (Fri, 25 Apr 2008)
New Revision: 1564
Modified:
sandbox/httpd/src/native/mod_manager/mod_manager.c
Log:
Add logic to request a CONFIG to ModClusterService.
Modified: sandbox/httpd/src/native/mod_manager/mod_manager.c
===================================================================
--- sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-25 07:47:44 UTC (rev 1563)
+++ sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-25 09:02:41 UTC (rev 1564)
@@ -22,6 +22,7 @@
#include "http_request.h"
#include "http_protocol.h"
#include "http_core.h"
+#include "scoreboard.h"
#include "node.h"
#include "host.h"
@@ -593,10 +594,15 @@
ap_rprintf(r, "Type=STATUS-RSP&JVMRoute=%s", nodeinfo.mess.JVMRoute);
if (proxy_cluster_isup(r, node->mess.id, Load) != OK)
- ap_rprintf(r, "&State=NOTOK\n");
+ ap_rprintf(r, "&State=NOTOK");
else
- ap_rprintf(r, "&State=OK\n");
+ ap_rprintf(r, "&State=OK");
+ if (ap_my_generation)
+ ap_rprintf(r, "&id=%d", ap_my_generation);
+ else
+ ap_rprintf(r, "&id=%d", ap_scoreboard_image->global->restart_time);
+ ap_rprintf(r, "\n");
return OK;
}
16 years, 8 months
JBoss Native SVN: r1563 - in sandbox/httpd/src/native: mod_manager and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-25 03:47:44 -0400 (Fri, 25 Apr 2008)
New Revision: 1563
Modified:
sandbox/httpd/src/native/common/sharedmem_util.c
sandbox/httpd/src/native/mod_manager/mod_manager.c
Log:
Arrange the logic to persist the data.
Modified: sandbox/httpd/src/native/common/sharedmem_util.c
===================================================================
--- sandbox/httpd/src/native/common/sharedmem_util.c 2008-04-25 07:18:05 UTC (rev 1562)
+++ sandbox/httpd/src/native/common/sharedmem_util.c 2008-04-25 07:47:44 UTC (rev 1563)
@@ -135,7 +135,6 @@
/* XXX: remove the lock file ? */
next = next->next;
}
- apr_pool_destroy(pool);
}
return APR_SUCCESS;
}
Modified: sandbox/httpd/src/native/mod_manager/mod_manager.c
===================================================================
--- sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-25 07:18:05 UTC (rev 1562)
+++ sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-25 07:47:44 UTC (rev 1563)
@@ -197,6 +197,8 @@
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "create_mem_host failed");
return !OK;
}
+
+ sharedmem_initialize_cleanup(p);
return OK;
}
static char **process_buff(request_rec *r, char *buff)
16 years, 8 months
JBoss Native SVN: r1562 - sandbox/httpd/src/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-04-25 03:18:05 -0400 (Fri, 25 Apr 2008)
New Revision: 1562
Modified:
sandbox/httpd/src/native/mod_manager/mod_manager.c
Log:
Add the logic to received the reversed connection indicator.
Modified: sandbox/httpd/src/native/mod_manager/mod_manager.c
===================================================================
--- sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-24 15:29:41 UTC (rev 1561)
+++ sandbox/httpd/src/native/mod_manager/mod_manager.c 2008-04-25 07:18:05 UTC (rev 1562)
@@ -302,6 +302,7 @@
* <Host: <Node IP>
* Port: <Connector Port>
* Type: <Type of the connector>
+ * Reserved: <Use connection pool initiated by Tomcat *.
* (<node conf>
* Virtual hosts in JBossAS
* Alias: <vhost list>
@@ -333,6 +334,7 @@
vhost->next = NULL;
phost = vhost;
+ nodeinfo.mess.reversed = 0;
int i = 0;
while (ptr[i]) {
if (strcasecmp(ptr[i], "JVMRoute") == 0) {
@@ -360,6 +362,11 @@
return 500;
strcpy(nodeinfo.mess.Type, ptr[i+1]);
}
+ if (strcasecmp(ptr[i], "Reversed") == 0) {
+ if (strcasecmp(ptr[i+1], "yes") == 0) {
+ nodeinfo.mess.reversed = 1;
+ }
+ }
if (strcasecmp(ptr[i], "Alias") == 0) {
if (phost->host && !phost->context) {
return 500;
16 years, 8 months