JBoss Native SVN: r2100 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-12-09 11:38:33 -0500 (Tue, 09 Dec 2008)
New Revision: 2100
Modified:
trunk/build/unix/buildbin.mod_cluster.sh
trunk/build/unix/buildbin.mod_cluster.windows.sh
Log:
Add the build of the java part.
Modified: trunk/build/unix/buildbin.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.sh 2008-12-09 15:55:25 UTC (rev 2099)
+++ trunk/build/unix/buildbin.mod_cluster.sh 2008-12-09 16:38:33 UTC (rev 2100)
@@ -219,5 +219,11 @@
done
fi
+# Also build the java part.
+(cd ../mod_cluster
+ mvn -P dist package
+)
+
+
echo "Done"
exit 0
Modified: trunk/build/unix/buildbin.mod_cluster.windows.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.windows.sh 2008-12-09 15:55:25 UTC (rev 2099)
+++ trunk/build/unix/buildbin.mod_cluster.windows.sh 2008-12-09 16:38:33 UTC (rev 2100)
@@ -71,5 +71,10 @@
nmake -f NMAKEmakefile PREFIX=${win_output_loc} ${add_conf} install
)
+# Also build the java part.
+(cd ../mod_cluster
+ mvn -P dist package
+)
+
echo "Done"
exit 0
16 years
JBoss Native SVN: r2099 - trunk/build/daemon.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-12-09 10:55:25 -0500 (Tue, 09 Dec 2008)
New Revision: 2099
Modified:
trunk/build/daemon/buildmdc.bat
trunk/build/daemon/buildmdc.sh
Log:
Build mod_cluster.
Modified: trunk/build/daemon/buildmdc.bat
===================================================================
--- trunk/build/daemon/buildmdc.bat 2008-12-09 15:33:46 UTC (rev 2098)
+++ trunk/build/daemon/buildmdc.bat 2008-12-09 15:55:25 UTC (rev 2099)
@@ -46,9 +46,9 @@
pushd %BUILD_HOME%\windows
-REM build http using rhel repos
-call build.bat sdk x86 rhel-httpd -ssl -cache
-call build.bat sdk x64 rhel-httpd -ssl -cache
-call build.bat sdk i64 rhel-httpd -ssl -cache
+REM build mod_cluster bundles.
+call build.bat sdk x86 mod_cluster -ssl -cache
+call build.bat sdk x64 mod_cluster -ssl -cache
+call build.bat sdk i64 mod_cluster -ssl -cache
popd
Modified: trunk/build/daemon/buildmdc.sh
===================================================================
--- trunk/build/daemon/buildmdc.sh 2008-12-09 15:33:46 UTC (rev 2098)
+++ trunk/build/daemon/buildmdc.sh 2008-12-09 15:55:25 UTC (rev 2099)
@@ -47,7 +47,7 @@
(cd ../unix
if $build_ssl; then
- ./build.sh rhel-httpd -ssl -cache
+ ./build.sh mod_cluster -ssl -cache
fi
- ./build.sh rhel-httpd -cache
+ ./build.sh mod_cluster -cache
)
16 years
JBoss Native SVN: r2098 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-12-09 10:33:46 -0500 (Tue, 09 Dec 2008)
New Revision: 2098
Added:
trunk/build/unix/buildbin.mod_cluster.sh
trunk/build/unix/buildbin.mod_cluster.windows.sh
trunk/build/unix/buildsrc.mod_cluster.sh
Modified:
trunk/build/unix/package.list
Log:
Add mod_cluster.
Added: trunk/build/unix/buildbin.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.sh (rev 0)
+++ trunk/build/unix/buildbin.mod_cluster.sh 2008-12-09 15:33:46 UTC (rev 2098)
@@ -0,0 +1,223 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library 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 of the License, or (at your option) any later version.
+#
+# This library 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 library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+# @author Mladen Turk
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2007-07-02 16:22:00 +0200 (Mon, 02 Jul 2007) $"
+echo ""
+echo "Started : `date`"
+echo "Common : $1"
+echo "Prefix : $2"
+echo "Output : $3"
+echo "OpenSSL : $4"
+echo "Static : $5"
+echo "Sources : $6"
+echo ""
+
+
+# parameters
+# $1: Location of the common libraries.
+# $2: Destination location.
+# $3: Location where to put the binaries.
+# $4: Use OpenSSL.
+# $5: Use static build.
+# $6: Location of the sources.
+
+common_loc=$1
+prefix_loc=$2
+output_loc=$3
+has_openssl_loc=$4
+has_static_loc=$5
+sources_loc=$6
+current_loc=`pwd`
+
+#
+# Function from the httpd.spec file
+# removed for easy testing.
+# --with-apr=${_prefix} --with-apr-util=${_prefix} \
+mpmbuild()
+{
+mpm=$1; shift
+mkdir $mpm
+#(cd $mpm
+(
+bash ./configure \
+ --enable-layout=Apache \
+ --with-included-apr \
+ --prefix=${_sysconfdir}/httpd \
+ --exec-prefix=${_prefix} \
+ --bindir=${_bindir} \
+ --sbindir=${_sbindir} \
+ --mandir=${_mandir} \
+ --libdir=${_libdir} \
+ --sysconfdir=${_sysconfdir}/httpd/conf \
+ --includedir=${_includedir}/httpd \
+ --libexecdir=${_libdir}/httpd/modules \
+ --datadir=${contentdir} \
+ --with-installbuilddir=${_libdir}/httpd/build \
+ --with-mpm=$mpm \
+ --enable-suexec --with-suexec \
+ --with-suexec-caller=${suexec_caller} \
+ --with-suexec-docroot=${contentdir} \
+ --with-suexec-logfile=${_localstatedir}/log/httpd/suexec.log \
+ --with-suexec-bin=${_sbindir}/suexec \
+ --with-suexec-uidmin=500 --with-suexec-gidmin=100 \
+ --with-pcre=builtin \
+ $* || exit 1
+make clean || exit 1
+make || exit 1
+) || return 1
+}
+
+#
+# Set needed variables. (defaulted to hacked values).
+PREFIX=/opt/jboss/httpd
+
+_sysconfdir=${PREFIX}
+_prefix=${PREFIX}
+_sbindir=${PREFIX}/sbin
+_bindir=${PREFIX}/bin
+_mandir=${PREFIX}/man
+_libdir=${PREFIX}/lib
+_includedir=${PREFIX}/include
+contentdir=${PREFIX}/htdocs
+suexec_caller=${PREFIX}/bin/suexec
+_localstatedir=${PREFIX}/logs
+
+if $has_openssl_loc ; then
+ add_conf="--with-ssl=${common_loc} --enable-ssl"
+else
+ add_conf=""
+fi
+if $build_iconv; then
+ # Use the static iconv we built before.
+ LDFLAGS="$LDFLAGS -L${build_common_dir}-static/lib -liconv"
+ export LDFLAGS
+ # Add the LD_LIBRARY_PATH if we want to use dynamic library.
+ #LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${build_common_dir}-static/lib"
+ #export LD_LIBRARY_PATH
+fi
+if $build_expat; then
+ add_conf_sys="--with-expat=${build_common_dir}-static/"
+else
+ add_conf_sys="--with-expat=builtin"
+fi
+if $build_zlib; then
+ add_conf_sys="$add_conf_sys --with-z=${build_common_dir}-static/"
+fi
+# Process mod_jk if needed.
+native_sources=srclib/`ls srclib | grep httpd-`
+cd $native_sources
+
+if $has_jk; then
+ add_conf="$add_conf --enable-jk"
+ (cd modules/jk; ./configure)
+fi
+
+if $has_cluster; then
+ add_conf="$add_conf --enable-proxy-cluster --enable-advertise --enable-slotmem --enable-manager"
+fi
+
+# Ajust some more platform dependent stuff.
+case ${BUILD_SYS} in
+ linux*)
+ add_conf_sys="$add_conf_sys --enable-pie"
+ ;;
+ hpux*)
+ add_conf_sys="$add_conf_sys --enable-experimental-libtool --enable-shared"
+ ;;
+esac
+case ${BUILD_CPU} in
+ ppc64)
+ # XXX: It is also in build.sh but not exported.
+ add_conf_sys="$add_conf_sys CFLAGS=-m64"
+ ;;
+esac
+echo "Building prefork and mpm with add_conf: $add_conf $add_conf_sys"
+
+# Build everything and the kitchen sink with the prefork build
+# removed because of ldap dependencies.
+# --enable-ldap --enable-authnz-ldap \
+mpmbuild prefork \
+ --enable-mods-shared=all \
+ ${add_conf} \
+ ${add_conf_sys} \
+ --enable-proxy \
+ --enable-cache --enable-mem-cache \
+ --enable-file-cache --enable-disk-cache \
+ --enable-cgid \
+ --enable-authn-anon --enable-authn-alias
+if [ $? -ne 0 ]; then
+ echo "mpmbuild prefork failed"
+ exit 1
+fi
+
+# Install it
+RPM_BUILD_ROOT=$output_loc
+make DESTDIR=$RPM_BUILD_ROOT install
+if [ $? -ne 0 ]; then
+ echo "mpmbuild prefork install failed"
+ exit 1
+fi
+
+# Clean it before building worker.
+make clean
+
+# For the other MPMs, just build httpd and no optional modules
+mpmbuild worker --enable-modules=none ${add_conf_sys}
+if [ $? -ne 0 ]; then
+ echo "mpmbuild worker failed"
+ exit 1
+fi
+
+# Install it
+#install -m 755 worker/httpd ${RPM_BUILD_ROOT}/${_sbindir}/httpd.worker
+install -m 755 httpd ${RPM_BUILD_ROOT}/${_sbindir}/httpd.worker
+
+# Add the needed openssl stuff.
+current_loc=`pwd`
+install_loc=${output_loc}/${PREFIX}
+if $has_openssl_loc; then
+ echo "Adding OpenSSL libraries ..."
+ (cd ${common_loc}/lib
+ tar -cf ${current_loc}/x.tar engines *.${so_extension}*
+ )
+ (cd ${install_loc}/lib
+ tar -xf ${current_loc}/x.tar
+ )
+ rm -f ${current_loc}/x.tar
+
+ cp ${common_loc}/bin/openssl ${install_loc}/bin
+fi
+
+# Arrange the sl file into so on hpux
+if [ "$BUILD_SYS" = "hpux" ]; then
+ for file in `find ${RPM_BUILD_ROOT}/opt/jboss/httpd/lib/httpd -name *.sl`
+ do
+ nfile=`echo $file | sed 's:\.sl:\.so:'`
+ mv $file $nfile
+ done
+fi
+
+echo "Done"
+exit 0
Property changes on: trunk/build/unix/buildbin.mod_cluster.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/build/unix/buildbin.mod_cluster.windows.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.windows.sh (rev 0)
+++ trunk/build/unix/buildbin.mod_cluster.windows.sh 2008-12-09 15:33:46 UTC (rev 2098)
@@ -0,0 +1,75 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library 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 of the License, or (at your option) any later version.
+#
+# This library 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 library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+# @author Mladen Turk
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2007-07-02 16:22:00 +0200 (Mon, 02 Jul 2007) $"
+echo ""
+echo "Started : `date`"
+echo "Common : $1"
+echo "Prefix : $2"
+echo "Output : $3"
+echo "OpenSSL : $4"
+echo "Static : $5"
+echo "Sources : $6"
+echo ""
+
+
+# parameters
+# $1: Location of the common libraries.
+# $2: Destination location.
+# $3: Location where to put the binaries.
+# $4: Use OpenSSL.
+# $5: Use static build.
+# $6: Location of the sources.
+
+common_loc=$1
+prefix_loc=$2
+output_loc=$3
+has_openssl=$4
+has_static=$5
+sources_loc=$6
+current_loc=`pwd`
+
+win_common_loc=`cygpath -w -a ${common_loc}`
+win_prefix_loc=`cygpath -w -a ${prefix_loc}`
+
+echo "Configuring Httpd"
+add_conf="PREFIX=${win_prefix_loc}"
+if $has_openssl ; then
+ add_conf="${add_conf} WITH_OPENSSL=${win_common_loc}"
+fi
+
+mkdir -p ${output_loc}/httpd-2.2
+win_output_loc=`cygpath -w -a ${output_loc}/httpd-2.2`
+
+native_sources=srclib/`ls srclib | grep httpd-2.2`
+src_dir=`cygpath -w -a ${native_sources}`
+
+(cd $native_sources
+ echo "Running nmake at `pwd`"
+ nmake -f NMAKEmakefile PREFIX=${win_output_loc} ${add_conf} install
+)
+
+echo "Done"
+exit 0
Property changes on: trunk/build/unix/buildbin.mod_cluster.windows.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/build/unix/buildsrc.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildsrc.mod_cluster.sh (rev 0)
+++ trunk/build/unix/buildsrc.mod_cluster.sh 2008-12-09 15:33:46 UTC (rev 2098)
@@ -0,0 +1,109 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library 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 of the License, or (at your option) any later version.
+#
+# This library 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 library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2007-06-01 18:00:27 +0200 (Fri, 01 Jun 2007) $"
+echo ""
+echo "Started : `date`"
+echo "Tag : $1"
+echo "Target : $2"
+echo ""
+
+# parameters
+# $1: The tag to use something like 2.2.6 or trunk
+# $2: Directory where to put the sources.
+
+httpd_version=$1
+native_dist=$2
+
+#
+# Download the sources
+# http://archive.apache.org/dist/httpd/httpd-2.2.10.tar.gz
+util/ckeckdownload.sh $build_cache_dir $package_src_dir $build_top httpd-${httpd_version} http://archive.apache.org/dist/httpd/httpd-${httpd_version}.tar.gz "NONE"
+if [ $? -ne 0 ]; then
+ echo "util/ckeckdownload httpd failed"
+ exit 1
+fi
+
+dirsources=`ls ${native_dist}/srclib/ | grep httpd-`
+dirsources=${native_dist}/srclib/${dirsources}
+
+# Add mod_jk sources.
+if $has_jk; then
+ ${build_top}/util/override.sh ${build_top}/buildsrc.asf-jk.sh ${jk_version} ${package_src_dir} ${dirsources}
+ if [ $? -ne 0 ]; then
+ echo "buildsrc.asf-jk.sh failed"
+ exit 1
+ fi
+ cp ${build_top}/buildsrc.asf-jk.sh ${package_src_dir}
+fi
+
+#
+# Add mod_cluster sources.
+if $has_cluster; then
+ ${build_top}/util/override.sh ${build_top}/buildsrc.cluster.sh ${cluster_version} ${package_src_dir} ${dirsources}
+ if [ $? -ne 0 ]; then
+ echo "buildsrc.cluster.sh failed"
+ exit 1
+ fi
+ cp ${build_top}/buildsrc.cluster.sh ${package_src_dir}
+fi
+
+#
+# Copy the windows NMAKE files (and additional stuff).
+dirnmake=${build_svn_root}/httpd/httpd-2.2/
+if [ -d ${dirnmake} ]; then
+ svn export --force ${dirnmake} ${dirsources}
+ if [ $? -ne 0 ]; then
+ echo "svn export --force ${dirnmake} ${dirsources} FAILED"
+ exit 1
+ fi
+else
+ echo "Cannot find package sources in ${dirnmake}"
+ exit 1
+fi
+
+# Replace libtool by our libtool
+case ${BUILD_SYS} in
+ hpux*)
+ cp ${build_top}/util/jlibtool.c ${dirsources}/srclib/apr/build
+ ;;
+esac
+
+#
+# regenerate configure scripts
+# XXX: It seems that produces a destroyed configure (on f8 and hpux at least).
+#(cd ${dirsources}
+# autoheader && autoconf || exit 1
+#)
+
+if [ "${BUILD_SYS}" != "windows" ]; then
+ (cd ${dirsources}
+ bash buildconf
+ )
+ if $has_jk; then
+ (cd ${dirsources}/modules/jk
+ autoconf
+ )
+ fi
+fi
Property changes on: trunk/build/unix/buildsrc.mod_cluster.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2008-12-09 15:22:43 UTC (rev 2097)
+++ trunk/build/unix/package.list 2008-12-09 15:33:46 UTC (rev 2098)
@@ -23,3 +23,6 @@
rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:mod_cluster/1.0.0.Beta1
# trunk of mod_cluster...
rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:trunk
+# mod_cluster but using lastest ASF httpd.
+mod_cluster|1.0.0.dev|2.2.10|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:trunk
+
16 years
JBoss Native SVN: r2097 - in trunk/mod_cluster/src/main/java/org/jboss/modcluster: load/impl and 2 other directories.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-12-09 10:22:43 -0500 (Tue, 09 Dec 2008)
New Revision: 2097
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ModClusterListener.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProvider.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/AbstractLoadMetric.java
Log:
Use constants for default values.
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/ModClusterListener.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/ModClusterListener.java 2008-12-09 14:57:23 UTC (rev 2096)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/ModClusterListener.java 2008-12-09 15:22:43 UTC (rev 2097)
@@ -77,9 +77,9 @@
private final StringManager sm = StringManager.getManager(Constants.Package);
private Class<? extends LoadMetric<? extends LoadContext>> loadMetricClass = BusyConnectorsLoadMetric.class;
- private int decayFactor = 2;
- private int history = 9;
- private double capacity = 1;
+ private int decayFactor = DynamicLoadBalanceFactorProvider.DEFAULT_DECAY_FACTOR;
+ private int history = DynamicLoadBalanceFactorProvider.DEFAULT_HISTORY;
+ private double capacity = LoadMetric.DEFAULT_CAPACITY;
public ModClusterListener()
{
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProvider.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProvider.java 2008-12-09 14:57:23 UTC (rev 2096)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProvider.java 2008-12-09 15:22:43 UTC (rev 2097)
@@ -44,6 +44,9 @@
*/
public class DynamicLoadBalanceFactorProvider implements LoadBalanceFactorProvider, DynamicLoadBalanceFactorProviderMBean
{
+ public static final int DEFAULT_DECAY_FACTOR = 2;
+ public static final int DEFAULT_HISTORY = 9;
+
private final Logger log = Logger.getLogger(this.getClass());
private final Map<LoadMetricSource<LoadContext>, Map<LoadMetric<LoadContext>, List<Double>>> loadHistory = new LinkedHashMap<LoadMetricSource<LoadContext>, Map<LoadMetric<LoadContext>, List<Double>>>();
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-12-09 14:57:23 UTC (rev 2096)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java 2008-12-09 15:22:43 UTC (rev 2097)
@@ -28,6 +28,9 @@
*/
public interface LoadMetric<C extends LoadContext> extends LoadMetricMBean
{
+ public static final double DEFAULT_CAPACITY = 1;
+ public static final int DEFAULT_WEIGHT = 1;
+
/**
* Returns the current load. This value only has meaning when expressed as a ratio of the capacity.
* @return the current load.
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-12-09 14:57:23 UTC (rev 2096)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/load/metric/impl/AbstractLoadMetric.java 2008-12-09 15:22:43 UTC (rev 2097)
@@ -32,8 +32,8 @@
*/
public abstract class AbstractLoadMetric<C extends LoadContext> implements LoadMetric<C>, LoadMetricMBean
{
- private volatile int weight = 1;
- private volatile double capacity = 1;
+ private volatile int weight = LoadMetric.DEFAULT_WEIGHT;
+ private volatile double capacity = LoadMetric.DEFAULT_CAPACITY;
/**
* @{inheritDoc}
16 years
JBoss Native SVN: r2096 - trunk/mod_cluster.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-12-09 09:57:23 -0500 (Tue, 09 Dec 2008)
New Revision: 2096
Modified:
trunk/mod_cluster/local.properties
Log:
comment node2, node3
Modified: trunk/mod_cluster/local.properties
===================================================================
--- trunk/mod_cluster/local.properties 2008-12-09 12:38:43 UTC (rev 2095)
+++ trunk/mod_cluster/local.properties 2008-12-09 14:57:23 UTC (rev 2096)
@@ -74,8 +74,8 @@
# to test transactions distributed across multiple servers. Those tests
# need all four properties node0, node1, node2, and node3. Note that you
# will need to have four separate ips (even at the same machine).
-node2=${env.MYTESTIP_3}
-node3=${env.MYTESTIP_4}
+#node2=${env.MYTESTIP_3}
+#node3=${env.MYTESTIP_4}
#The following properties will reduce verbosity of Apache Commons HttpClient
#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
16 years
JBoss Native SVN: r2095 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-12-09 07:38:43 -0500 (Tue, 09 Dec 2008)
New Revision: 2095
Modified:
trunk/build/unix/package.list
Log:
Use trunk of mod_cluster.
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2008-12-09 10:58:13 UTC (rev 2094)
+++ trunk/build/unix/package.list 2008-12-09 12:38:43 UTC (rev 2095)
@@ -21,3 +21,5 @@
rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:trunk
rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:mod_cluster/1.0.0.Alpha
rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:mod_cluster/1.0.0.Beta1
+# trunk of mod_cluster...
+rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:trunk
16 years
JBoss Native SVN: r2094 - in trunk/build: unix and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-12-09 05:58:13 -0500 (Tue, 09 Dec 2008)
New Revision: 2094
Modified:
trunk/build/build.txt
trunk/build/unix/package.list
Log:
Arrange doc about build.sh.
Modified: trunk/build/build.txt
===================================================================
--- trunk/build/build.txt 2008-12-04 10:51:58 UTC (rev 2093)
+++ trunk/build/build.txt 2008-12-09 10:58:13 UTC (rev 2094)
@@ -2,15 +2,19 @@
Configuration file:
The build.sh parses a file name pkg.list:
-jboss-native|2.0.0|1.2.9|1.2.8|0.9.8e|TOMCAT_NATIVE_1_1_11
-jboss-sight|1.0.0|1.2.9|1.2.8||trunk
+jboss-native|2.0.0|TOMCAT_NATIVE_1_1_11|apr:v:1.2.9|apu:v:1.2.8|ssl:v:0.9.8e
+jboss-sight|1.0.0|trunk|apr:v:1.2.9|apu:v:1.2.8
The first column is the package name.
The 2d the version.
-The 3d is the APR version to use for this package.
-The 4th is the APR-UTIL version to use for this package.
-The 5th is the OpenSSL version to use for this package. A SSL and non-SSL
- version of the package could be built in this case.
-The 6th is tag of the repos we are building.
+The 3d is the tag to use to get the source of the produit.
+The following are the components the product needs, for example:
+apr:v:1.2.9
+Means apr, version 1.29.
+The subcomponents apr, apu, api, ssl, zlib, jk, cluster, iconv, expat ... are
+supported.
+The type of the subcomponent could be:
+v : version
+r : tag (revision) in the svn.
Parameters:
The lastest description of the package is the one choosen to build the package.
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2008-12-04 10:51:58 UTC (rev 2093)
+++ trunk/build/unix/package.list 2008-12-09 10:58:13 UTC (rev 2094)
@@ -16,6 +16,7 @@
# httpd
jboss-httpd|0.0.1|2.2.8|api:v:1.2.1|ssl:v:0.9.8e|zlib:v:1.2.3
jboss-httpd|2.2.10|2.2.10|api:v:1.2.1|ssl:v:0.9.8i|zlib:v:1.2.3
+# httpd based on the stack2 supported product.
rhel-httpd|2.2.3-11.el5_1.3|httpd-2_2_3-11_el5_1_3|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8
rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:trunk
rhel-httpd|2.2.8-1.el5s2|httpd-2_2_8-1_el5s2|apr:r:apr-1_2_7-11|apu:r:apr-util-1_2_7-7_el5|api:v:1.2.1|ssl:r:openssl-0_9_8b-8_3_el5_0_2|zlib:v:1.2.3|jk:v:1.2.26|iconv:v:1.11|expat:v:1.95.8|cluster:t:mod_cluster/1.0.0.Alpha
16 years
JBoss Native SVN: r2093 - trunk/mod_cluster/native/mod_manager.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-12-04 05:51:58 -0500 (Thu, 04 Dec 2008)
New Revision: 2093
Modified:
trunk/mod_cluster/native/mod_manager/mod_manager.c
Log:
If the neo doesn't stop correctly and gets restarted and is different than we must remove it.
Modified: trunk/mod_cluster/native/mod_manager/mod_manager.c
===================================================================
--- trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-12-03 17:27:59 UTC (rev 2092)
+++ trunk/mod_cluster/native/mod_manager/mod_manager.c 2008-12-04 10:51:58 UTC (rev 2093)
@@ -692,8 +692,8 @@
/* check for removed node */
node = read_node(nodestatsmem, &nodeinfo);
- if (node != NULL && node->mess.remove) {
- /* If the node is removed and recreated unchanged that is ok: network problems */
+ if (node != NULL) {
+ /* If the node is removed (or kill and restarted) and recreated unchanged that is ok: network problems */
if (! is_same_node(node, &nodeinfo)) {
/* Here we can't update it because the old one is still in */
strcpy(node->mess.JVMRoute, "REMOVED");
16 years
JBoss Native SVN: r2092 - trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-12-03 12:27:59 -0500 (Wed, 03 Dec 2008)
New Revision: 2092
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
Log:
Create socketFactory lazily - config.isSSL() may not yet be set.
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-12-03 16:03:52 UTC (rev 2091)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java 2008-12-03 17:27:59 UTC (rev 2092)
@@ -87,8 +87,6 @@
// ----------------------------------------------------------------- Fields
private final MCMPHandlerConfiguration config;
- /** Socket factory. */
- private final SocketFactory socketFactory;
/** Source for reset requests when we need to reset a proxy. */
private final ResetRequestSource resetRequestSource;
@@ -115,7 +113,6 @@
public DefaultMCMPHandler(MCMPHandlerConfiguration config, ResetRequestSource source)
{
this.resetRequestSource = source;
- this.socketFactory = config.isSsl() ? new JSSESocketFactory(config) : SocketFactory.getDefault();
this.config = config;
}
@@ -173,7 +170,7 @@
private Proxy addProxyInternal(InetAddress address, int port)
{
- Proxy proxy = new Proxy(address, port, this.socketFactory, this.config);
+ Proxy proxy = new Proxy(address, port, this.config);
this.addRemoveProxiesLock.lock();
@@ -223,7 +220,7 @@
public void removeProxy(InetAddress address, int port)
{
- Proxy proxy = new Proxy(address, port, this.socketFactory, this.config);
+ Proxy proxy = new Proxy(address, port, this.config);
this.addRemoveProxiesLock.lock();
@@ -998,7 +995,7 @@
@GuardedBy("Proxy.this")
private volatile BufferedWriter writer = null;
- Proxy(InetAddress address, int port, SocketFactory socketFactory, MCMPHandlerConfiguration config)
+ Proxy(InetAddress address, int port, MCMPHandlerConfiguration config)
{
if (address == null)
{
@@ -1011,7 +1008,7 @@
this.address = address;
this.port = port;
- this.socketFactory = socketFactory;
+ this.socketFactory = config.isSsl() ? new JSSESocketFactory(config) : SocketFactory.getDefault();
this.socketTimeout = config.getSocketTimeout();
}
16 years
JBoss Native SVN: r2091 - trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2008-12-03 11:03:52 -0500 (Wed, 03 Dec 2008)
New Revision: 2091
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/MBeanQueryLoadMetricSourceTestCase.java
Log:
Fix Java 1.6 incompatibility
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/MBeanQueryLoadMetricSourceTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/MBeanQueryLoadMetricSourceTestCase.java 2008-12-02 21:33:48 UTC (rev 2090)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/MBeanQueryLoadMetricSourceTestCase.java 2008-12-03 16:03:52 UTC (rev 2091)
@@ -68,7 +68,7 @@
{
Capture<ObjectName> capturedName = new Capture<ObjectName>();
- EasyMock.expect(this.server.queryNames(EasyMock.capture(capturedName), (QueryExp) EasyMock.isNull())).andReturn(Collections.emptySet());
+ EasyMock.expect(this.server.queryNames(EasyMock.capture(capturedName), (QueryExp) EasyMock.isNull())).andReturn(Collections.EMPTY_SET);
EasyMock.replay(this.server);
16 years