synchronize with fedorahosted, added debugging capability for ccm install & maintenance scripts.
git-svn-id: https://svn.libreccm.org/ccm/trunk@3993 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b56da9f3af
commit
ded7d5a275
|
|
@ -17,7 +17,31 @@ CCM_HOME_DIR="../.."
|
|||
if [[ -z "$CATALINA_HOME" ]] ; then
|
||||
echo CATALINE_HOME not set. Guessing ...
|
||||
|
||||
if [ -d /usr/share/tomcat6 ]
|
||||
if [ -d /usr/share/tomcat ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat"
|
||||
elif [ -d /opt/tomcat ]
|
||||
then
|
||||
CATALINA_HOME="/opt/tomcat"
|
||||
elif [ -d /usr/share/tomcat8 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat8"
|
||||
elif [ -d /usr/share/tomcat-8 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat-8"
|
||||
elif [ -d /opt/tomcat8 ]
|
||||
then
|
||||
CATALINA_HOME="/opt/tomcat8"
|
||||
elif [ -d /usr/share/tomcat7 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat7"
|
||||
elif [ -d /usr/share/tomcat-7 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat-7"
|
||||
elif [ -d /opt/tomcat7 ]
|
||||
then
|
||||
CATALINA_HOME="/opt/tomcat7"
|
||||
elif [ -d /usr/share/tomcat6 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat6"
|
||||
elif [ -d /usr/share/tomcat-6 ]
|
||||
|
|
@ -45,6 +69,8 @@ if [[ -z "$CATALINA_HOME" ]] ; then
|
|||
echo If this doesn\'t work use
|
||||
echo export CATALINA_HOME=/path/to/tomcat/installation
|
||||
echo to point us to the correct location.
|
||||
echo
|
||||
sleep 3
|
||||
|
||||
fi
|
||||
CATALINA_LIB_DIR="${CATALINA_HOME}/lib"
|
||||
|
|
@ -78,6 +104,16 @@ CCM_HOME_DIR=`cd ${CCM_HOME_DIR}; pwd`
|
|||
CCM_CLASSPATH="${CCM_LIB_DIR}/*:${CATALINA_LIB_DIR}/*:${CCM_RES_DIR}:${CCM_CLASS_DIR}/"
|
||||
echo "Classpath is: $CCM_CLASSPATH"
|
||||
|
||||
# Handling DEBUGGING request
|
||||
# The parameter MUST be the first!
|
||||
if [ "$1" = "-D" ] ; then
|
||||
echo "Activating debug mode, waiting for debugger to attach after CCM-Tool startup."
|
||||
debug="-Xdebug -Xnoagent -Djava.compiler.NONE -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y "
|
||||
shift
|
||||
else
|
||||
debug=""
|
||||
fi
|
||||
|
||||
echo "Starting CCM-Tool..."
|
||||
if [ "$1" = "prepare" ] ; then
|
||||
echo
|
||||
|
|
@ -88,7 +124,7 @@ if [ "$1" = "prepare" ] ; then
|
|||
echo =====================================
|
||||
echo
|
||||
param="load --interactive --packagekeys-file bundle/cfg/package-key.list --parameter-file bundle/cfg/integration.properties"
|
||||
java -cp $CCM_CLASSPATH -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" $param
|
||||
java $debug -cp $CCM_CLASSPATH -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" $param
|
||||
else
|
||||
java -cp $CCM_CLASSPATH -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" "$@"
|
||||
java $debug -cp $CCM_CLASSPATH -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" "$@"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -15,7 +15,31 @@ CCM_HOME_DIR="../.."
|
|||
if [[ -z "$CATALINA_HOME" ]] ; then
|
||||
echo CATALINE_HOME not set. Guessing ...
|
||||
|
||||
if [ -d /usr/share/tomcat6 ]
|
||||
if [ -d /usr/share/tomcat ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat"
|
||||
elif [ -d /opt/tomcat ]
|
||||
then
|
||||
CATALINA_HOME="/opt/tomcat"
|
||||
elif [ -d /usr/share/tomcat8 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat8"
|
||||
elif [ -d /usr/share/tomcat-8 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat-8"
|
||||
elif [ -d /opt/tomcat8 ]
|
||||
then
|
||||
CATALINA_HOME="/opt/tomcat8"
|
||||
elif [ -d /usr/share/tomcat7 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat7"
|
||||
elif [ -d /usr/share/tomcat-7 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat-7"
|
||||
elif [ -d /opt/tomcat7 ]
|
||||
then
|
||||
CATALINA_HOME="/opt/tomcat7"
|
||||
elif [ -d /usr/share/tomcat6 ]
|
||||
then
|
||||
CATALINA_HOME="/usr/share/tomcat6"
|
||||
elif [ -d /usr/share/tomcat-6 ]
|
||||
|
|
@ -72,5 +96,15 @@ fi
|
|||
#Convert to absolute path:
|
||||
CCM_HOME_DIR=`cd ${CCM_HOME_DIR}; pwd`
|
||||
|
||||
# Handling DEBUGGING request
|
||||
# The parameter MUST be the first!
|
||||
if [ "$1" = "-D" ] ; then
|
||||
echo "Activating debug mode, waiting for debugger to attach after CCM-Tool startup."
|
||||
debug="-Xdebug -Xnoagent -Djava.compiler.NONE -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y "
|
||||
shift
|
||||
else
|
||||
debug=""
|
||||
fi
|
||||
|
||||
echo "executing ccm-run"
|
||||
java -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "$@"
|
||||
java $debug -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "$@"
|
||||
|
|
@ -178,7 +178,9 @@ public class DbHelper {
|
|||
}
|
||||
|
||||
String driver = url.substring(5, pos);
|
||||
s_log.debug("Got driver name " + driver, new Throwable());
|
||||
// ?? Why new Throwable here? No usefule information here, just junk
|
||||
// s_log.debug("Got driver name " + driver, new Throwable());
|
||||
s_log.debug("Got driver name: " + driver );
|
||||
|
||||
if ("oracle".equals(driver)) {
|
||||
return DB_ORACLE;
|
||||
|
|
|
|||
|
|
@ -33,8 +33,11 @@ public final class DispatcherConfig extends AbstractConfig {
|
|||
|
||||
private static final Logger s_log = Logger.getLogger(DispatcherConfig.class);
|
||||
|
||||
/* Toggle whether or not to use HTTP/1.1 caching */
|
||||
private final Parameter m_cachingActive;
|
||||
/* Set the default expiration time for HTTP caching. */
|
||||
private final Parameter m_defaultExpiry;
|
||||
/* Prefix used for serving static files. As of version 6.6 deprecated */
|
||||
private final Parameter m_staticURLPrefix;
|
||||
|
||||
/** Default top-level container for all Bebop components and containersPage
|
||||
|
|
@ -57,6 +60,7 @@ public final class DispatcherConfig extends AbstractConfig {
|
|||
("waf.dispatcher.default_expiry", Parameter.REQUIRED,
|
||||
new Integer(259200));
|
||||
|
||||
/* @Deprecated */
|
||||
m_staticURLPrefix = new StringParameter
|
||||
("waf.dispatcher.static_url_prefix", Parameter.REQUIRED,
|
||||
"/STATICII/");
|
||||
|
|
|
|||
|
|
@ -116,30 +116,10 @@ public class CompoundInitializer implements Initializer {
|
|||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Implementation of the {@link Initializer#init(LegacyInitEvent)} method.
|
||||
// * This implementation proceeds through the list of sub initializers in
|
||||
// * order and invokes the init(LegacyInitEvent) method of each sub initializer
|
||||
// * in turn.
|
||||
// *
|
||||
// * @param evt The legacy init event.
|
||||
// */
|
||||
// public void init(LegacyInitEvent evt) {
|
||||
// int i = 1;
|
||||
// for (Iterator it = m_inits.iterator(); it.hasNext(); i++) {
|
||||
// Initializer init = (Initializer) it.next();
|
||||
// if (m_log.isInfoEnabled()) {
|
||||
// m_log.info("Running Legacy Init for " + init.getClass() +
|
||||
// " (" + i + " out of " + m_inits.size() + ")");
|
||||
// }
|
||||
// init.init(evt);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Implementation of the {@link Initializer#init(ContextInitEvent)} method.
|
||||
* This implementation proceeds through the list of sub initializers in
|
||||
* order and invokes the init(LegacyInitEvent) method of each sub initializer
|
||||
* order and invokes the init(ContextInitEvent) method of each sub initializer
|
||||
* in turn.
|
||||
*
|
||||
* @param evt The legacy init event.
|
||||
|
|
|
|||
|
|
@ -175,6 +175,12 @@ public final class WebConfig extends AbstractConfig {
|
|||
return (String) get(m_scheme);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide the name and port that users of a site will see in URLs generated
|
||||
* by CCM for the site. (Value of parameter waf.web.server)
|
||||
* E.g. example.com:80
|
||||
* @return HttpHost object, contains public name & port of the server (site)
|
||||
*/
|
||||
public final HttpHost getServer() {
|
||||
return (HttpHost) get(m_server);
|
||||
}
|
||||
|
|
@ -207,6 +213,17 @@ public final class WebConfig extends AbstractConfig {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide the name and port of the machine on which the CCM instance is
|
||||
* running. (Value of parameter waf.web.host)
|
||||
*
|
||||
* Used to fetch some resources by a local URL avoiding external
|
||||
* internet traffic (and delay). If not specified set to the servers's
|
||||
* name redirecting all traffic to external internet address.
|
||||
*
|
||||
* @return HttpHost object, contains internal name & port of the machine
|
||||
* hosting a CCM instance
|
||||
*/
|
||||
public final HttpHost getHost() {
|
||||
return (HttpHost) get(m_host);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue