Posted By:
Christian_Ebaugh
Posted On:
Saturday, November 15, 2003 07:57 PM
While I can't pretent to be an expert in either websphere or jmx, I have gotten my programs to run.
I copied the launchClient.sh from inside the websphere directories and hacked it up so I could build and run my attempts at jmx.
Here is a copy of what I use. I called it simply "run" and to compile my program I enter "run -c", while to run my program I enter "run". (I guess I'm not too complex!) Obviously, Was5jxm.java is my program!
#!/bin/ksh
WAS_ROOT=/opt/apps/WebSphere
DEPLOY=$WAS_ROOT/DeploymentManager/lib
JMX=$DEPLOY/admin.jar:$DEPLOY/wsexception.jar:$DEPLOY/wasjmx.jar:$DEPLOY/jmxc.jar:$DEPLOY/namingclient.jar
NAMING_FACTORY=com.ibm.websphere.naming.WsnInitialContextFactory
. "$WAS_ROOT/DeploymentManager/bin/setupCmdLine.sh"
CONSOLE_ENCODING=-Dws.output.encoding=console
SHELL=com.ibm.ws.scripting.WasxShell
if [ "$1" = "-c" ]; then
$JAVA_HOME/bin/javac -classpath $JMX Was5jmx.java
else
$JAVA_HOME/bin/java
-Xbootclasspath/p:"$WAS_BOOTCLASSPATH"
$CONSOLE_ENCODING
$javaOption
"$CLIENTSAS"
"$CLIENTSOAP"
-Dcom.ibm.ws.scripting.wsadminprops="$WSADMIN_PROPERTIES"
-Dwas.install.root="$WAS_HOME"
-Duser.install.root="$USER_INSTALL_ROOT"
-Dwas.repository.root="$CONFIG_ROOT"
-Dserver.root="$WAS_HOME"
-Dlocal.cell="$WAS_CELL"
-Dlocal.node="$WAS_NODE"
-Dcom.ibm.ws.management.standalone=true
-Dcom.ibm.itp.location="$WAS_HOME/bin"
-Dws.ext.dirs="$WAS_EXT_DIRS"
-classpath .:$JMX:$WAS_CLASSPATH Was5jmx
fi
exit $?
Hope this helps a little. If it doesn't copy right, or you have questions about this script, just e-me and I'll email it too you.
Christian M. Ebaugh Jr.
Production Middleware Suport
Walt Disney World
Have a Disney Day. :~}