https://bz.apache.org/bugzilla/show_bug.cgi?id=66617

--- Comment #7 from Christopher Schultz <ch...@christopherschultz.net> ---
I'm a little confused. Tomcat ships with a shell script, catalina.sh, which can
be used as documented to start Tomcat in debugging (JPDA) mode. This is not a
"custom" shell script.

There is a script to "start Tomcat", startup.sh, which basically just invokes
"catalina.sh start". If you want more control over the startup process, you
need to call catalina.sh directly.

There is a customization script you can create, setenv.sh, which will set
environment variables before launching your JVM. This is *not* a part of the
files shipped by Tomcat and therefore the responsibility of the operator.

Invoking "catalina.sh jpda start" is basically the same thing as invoking
"catalina.sh start" with some environment variables set. Specifically, "jpda"
does this:

if [ "$1" = "jpda" ] ; then
  if [ -z "$JPDA_TRANSPORT" ]; then
    JPDA_TRANSPORT="dt_socket"
  fi
  if [ -z "$JPDA_ADDRESS" ]; then
    JPDA_ADDRESS="localhost:8000"
  fi
  if [ -z "$JPDA_SUSPEND" ]; then
    JPDA_SUSPEND="n"
  fi
  if [ -z "$JPDA_OPTS" ]; then
   
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
  fi
  CATALINA_OPTS="$JPDA_OPTS $CATALINA_OPTS"
  shift
fi

So if you *always* want to use JPDA mode, then you have two options:

1. Always run "catalina.sh jpda start" (perhaps in some script that you
maintain, no need to edit Tomcat-provided scripts)

2. Create $CATALINA_BASE/bin/setenv.sh and set the appropriate $CATALINA_OPTS
such as "-agentlib:..." and run "catalina.sh start" (or "startup.sh", which
will do the same thing).

Nothing above requires you to modify Tomcat-provided scripts. Everything is
documented.

In your opinion, how can the documentation be improved -- specifically?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to